Files
signal-platform/reports
dennisthiessenandClaude Opus 5 c3ae5ad949 feat(research): commit the regime-monitor replay harness, and reproduce v2/v3
v3 was calibrated by replaying the series offline, but that harness was never
committed -- so its published numbers could not be re-derived, and a v4 cut would
have had to choose anchors by argument rather than measurement. This is that
harness, and it reproduces the published figures.

scripts/run_regime_monitor_calibration.py replays State/Warning session by
session from the same inputs the live job uses (Alpaca for all 33 symbols, FRED
for VIX and HY OAS), with no database: breadth and divergence come from
breadth_service's pure helpers. It never reimplements an unchanged live sensor --
_compute_index, _score_pillars, P2, P4 and the Warning sensors are imported and
called. Only candidate formulas (proposed v4) and retired ones (v2, gone from the
codebase) are defined here and patched onto the module for a variant's duration.

Reproduction of the 408 sessions ending 2026-07-24, against the figures in
docs/research/regime-monitor-v3.md:

  v2 State avg      22.6   ->  22.68
  v2 State p80      35.1   ->  35.1     exact
  v2 State max      91.2   ->  91.2     exact
  v2 P3 pegged        39   ->    39     exact
  v2 W1 live         108   ->   108     exact
  v3 State max      87.4   ->  87.4     exact
  v3 band shares  73.3/15.0/8.3/3.4 -> 73.0/15.4/8.1/3.4

Three things the harness had to get right to reach that, each of which was
initially wrong and caught by a gate rather than by inspection:

  - "W1 live 108" counts NONZERO sessions, not non-null ones. v2's divergence
    gate returned 0.0 during any decline (v3 tapers instead), so the retired
    divergence formula had to be reconstructed too.
  - v2 sliced HY_OAS_REFERENCE_YEARS = 10.0 per session, not v3's 700 days. The
    percentile leg ranks against that window, so replaying it short shifted the
    middle of the distribution while leaving the max exact.
  - The published v2 numbers correspond to FULL OAS coverage. Replaying v2 with
    the 400-calendar-day fetch it shipped with yields max 100.0 and 133
    credit-less sessions -- so that truncation was not in force when the figures
    were taken. Recorded rather than assumed.

The script refuses to emit a band recommendation unless every hard gate passes
(33 symbols fetched, per-symbol warm-up and final bar, full basket on every
session, calendar anchors, 100% coverage, and a row-wise state_v4 <= state_v3
invariant), and exits non-zero. It is meant to be structurally impossible to read
a calibration result out of a run whose pipeline did not validate. No v4 code
ships in this commit.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 20:05:12 +02:00
..
2026-07-18 15:29:10 +02:00
2026-07-13 14:07:42 +02:00
2026-07-13 14:07:42 +02:00
2026-07-17 15:22:58 +02:00
2026-07-17 17:42:13 +02:00
2026-07-18 16:57:19 +02:00
2026-07-18 16:57:19 +02:00
2026-07-19 10:40:19 +02:00
2026-07-18 15:29:10 +02:00
2026-07-18 15:29:10 +02:00
2026-07-13 10:58:40 +02:00
2026-07-13 10:58:40 +02:00
2026-07-13 08:18:40 +02:00
2026-07-13 08:18:40 +02:00

Backtest report index

Reports dated 2026-07-11 or earlier are the historical production research record and remain untouched.

The completed 2026-07-12/13 S/R and Gate Target Ladder research is preserved as compact decision evidence instead of full per-arm replay output:

  • sr-v2-validation-comparison.json and sr-v2-validation-cohorts.csv record the held-out detector comparison.
  • sr-full-production-vs-candidate-comparison.json and its cohort CSV record the full-period clean-structure replacement decision.
  • sr-explicit-target-ladder-comparison.json and its cohort CSV record exact GTL parity: 202,765 candidates, 1,086 qualified setups, 321 book trades, Sharpe 2.03, CAGR 50.0%, and max drawdown 21.4% in both arms.
  • The three backtest-20260713-gtl-*.json/.md pairs record the tuning, confirmation, and strength-sensitivity decisions. No stable improvement was found, so the production GTL stayed frozen.

The large backtest-sr-*.json replay files were removed after consolidation. They duplicated hundreds of thousands of candidate rows while adding no decision information beyond the compact comparisons and the narrative in docs/research/sr-levels-and-exits.md. The original raw files remain available in Git history if a forensic reconstruction is ever necessary.

The initial untracked backtest-20260712-sr-detector-rewrite.json is local-only and is intentionally not part of the repository.

The 2026-07-17 post-stop re-entry decision is preserved in daily_reentry_matrix.json. It is the canonical source for the nine-policy daily replay, production-like full-universe ranking, the disjoint 2025+ book, and the cost/capacity sensitivity matrix. The interpretation and production decision live in docs/research/post-stop-reentry.md.

The earlier post-stop-reentry-20260717.json, post-stop-cooldown-sweep-20260717.json, and gate-protected-stop-20260717.json reports were removed as superseded intermediate experiments. They used weekly/hybrid entry cadence or tested the rejected stop-adjustment path, and add no decision evidence beyond the final daily matrix and narrative. Their matching one-off runners were removed too. All remain recoverable from Git history. Rebuildable candidate pickle caches are intentionally ignored and must not be committed.

Phase B fip breadth IC (2026-07-18/19) — compact evidence

Canonical artifacts:

  • fip-reconcile-20260719-000520.json — single-sourced authoritative ICs (unconditional liquid fip, tiers, prod-subset, mom-conditional, context signals). Membership symbol dumps stripped after the decision; narrative in docs/research/fip-breadth-ic.md.
  • fip-breadth-20260718-211440-fingerprint.json — prod-snapshot fingerprint pass (fip IC 0.045 / t 2.91).

Removed as superseded / dangerous intermediate noise (recoverable from Git):

  • fip-breadth-20260718-211440-breadth.json (+ wrapper) — orphaned +0.0575 / t +5.12 from racing a partial research.sqlite. Kept out of the tree so it cannot be re-mythologized.
  • fip-breadth-20260718-194828*.json — fingerprint-only partial run.
  • fip-breadth-diagnostics-20260718-213705.json and …-213908.json — dual-path diagnostics superseded by the single-sourced reconcile.