MTC Chapter 12 — Measurement and Degeneration¶

Part IV · Week 11 · Seed 20261201

The degeneration script (Appendix B.4): the coverage ratio holds near 2.1 through five quarters of structural collapse, then cliffs to 0.8. The map dies before the money.

In [1]:
import sys, os
sys.path.insert(0, r"/home/claude/mtc/mtc-course/downloads/engine_lib")
sys.path.insert(0, r"/home/claude/mtc/nbbuild")
from mtcplot import apply_style, MTC_RED, BRASS, SLATE, MTC_RED_LITE, MTC_RED_DARK
import matplotlib.pyplot as plt
import numpy as np
apply_style()

The map dies before the money¶

The scalar the accounts report stays green until one period after the map has died.

In [2]:
from engines import mtc_engine_ch12 as e
sc = e.degeneration_script()
xlabels = [str(r["qtr"]) for r in sc]
cov = [r["coverage"] for r in sc]
chans = [r["channel"] for r in sc]
fig, ax = plt.subplots()
colors = [MTC_RED if c=="0.8" else (MTC_RED_DARK if cov[i]<1 else BRASS) for i,c in enumerate(xlabels)]
ax.plot(range(len(cov)), cov, "-o", color=MTC_RED, lw=2.4, markersize=9)
ax.axhline(1.0, color=SLATE, ls="--"); ax.text(0.1, 1.05, "solvency floor", color=SLATE)
ax.fill_between(range(len(cov)), cov, 1.0, where=[c>=1 for c in cov], color=BRASS, alpha=0.15)
for i,(x,c,ch) in enumerate(zip(xlabels,cov,chans)):
    ax.text(i, c+0.06, f"{c}", ha="center", fontweight="bold", color=MTC_RED_DARK)
    if ch in ("M","A","I"): ax.text(i, 0.55, ch, ha="center", color=SLATE, fontsize=9)
ax.set_xticks(range(len(xlabels))); ax.set_xticklabels(xlabels)
ax.set_xlabel("quarter (M=meta, A=architectural, I=informational channel)"); ax.set_ylabel("coverage ratio")
ax.set_title("Coverage holds ~2.1, then cliffs to 0.8 at the shock")
ax.set_ylim(0.4, 2.5)
plt.tight_layout(); plt.show()
print("map dies before money:", e.map_dies_before_money())
No description has been provided for this image
map dies before money: {'pre_shock_min': 2.1, 'shock': 0.8, 'green_until_shock': True, 'detection_lead_quarters': 5}

Validation¶

Every number above is reproduced by the seeded engine; the checks below must all pass.

In [3]:
from engines import mtc_engine_ch12 as _e
v = _e.validation_checks(); v.pop("_values", None)
for k, val in v.items():
    print(f"  {k}: {val}")
assert v["ALL_PASS"], "validation failed"
print("\nALL_PASS — matches notebook + workbook + API")
  V1_six_rows: True
  V2_starts_2p2: True
  V3_holds_2p1: True
  V4_cliffs_to_0p8: True
  V5_green_until_shock: True
  V6_five_quarter_lead: True
  V7_channels_MAI: True
  V8_bias_tracks_eta: True
  ALL_PASS: True

ALL_PASS — matches notebook + workbook + API