Regime gate (plan 011): deploy-wire the shadow pipeline + on-demand admin trigger + prod backtest
The session-level metalabel P(our ORB profits today) — the one lever that survives out-of-sample. Backtested on 266 prod sessions (walk-forward): trade-always (trained subset): -0.111R/session, 36% hit meta_v1 GATED (trades best ~32% of days): -0.004R/session, 48% hit delta +0.107R in-sample, +0.128R OOS (recent 80 sessions), improves across folds It does NOT make the bot profitable — it takes a bleeding strategy to roughly flat by sitting out the worst ~2/3 of sessions. threshold_v1 rule gates too little to matter; meta_v1 (walk-forward GBM) is the signal. Leaky full-fit (+0.61R) >> walk-forward confirms the discipline was load-bearing; the OOS holding is the evidence the +0.078R is real, not look-ahead. Changes: - research/regime.py: batch minute-bar load per session (64k per-fire round-trips -> ~266 queries; fixed a >5min build to ~3min) + incremental label pass (skip already-labeled sessions; --rebuild forces full). Nightly cost now ~one new day. - docker-compose.yml + truenas-compose.yml: scheduler runs build-features + score (both models) before `experiments run`, nightly. ALL-SHADOW — does NOT gate live trading (that stays owner-gated Step 5). - admin_api.py + admin.html: POST /api/regime/run (detached) + GET /api/regime/status + a Run/Status button — the panel had no way to trigger this. - plans/011 + docs/research/regime_notes.md (6-book distillation) + plans 008/009 docs. Prod state (shadow, rollback = DROP regime_features/regime_scores + DELETE experiments WHERE id LIKE 'regime%'): 266 feature rows, 532 scores, 2 experiments registered. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
275c56b545
commit
092d6072e8
11 files changed
+666
-13
No files matched your search
@@ -205,6 +205,14 @@ services:
|
||||
# NOT look-ahead (replay is a labeling job, not a live gate).
|
||||
python eod_replay.py || echo "[scheduler] eod_replay FAILED"
|
||||
python nightly_tune.py || echo "[scheduler] nightly_tune FAILED"
|
||||
# Regime gate (plan 011, ALL-SHADOW): a session-level metalabel
|
||||
# P(our ORB profits today). build-features labels each session from its
|
||||
# OWN realized expR; score writes the WALK-FORWARD favorable flag the
|
||||
# experiments' regime_gate intervention reads. Must run BEFORE
|
||||
# experiments run. Does NOT gate live trading (that is owner-gated).
|
||||
python -m research.regime build-features || echo "[scheduler] regime build-features FAILED"
|
||||
python -m research.regime score --model threshold_v1 || echo "[scheduler] regime score threshold FAILED"
|
||||
python -m research.regime score --model meta_v1 || echo "[scheduler] regime score meta FAILED"
|
||||
# Experiment OS (plan 006, ALL-SHADOW): replay running experiments over
|
||||
# newly-logged fires, then adjudicate against pre-registered bars.
|
||||
python -m research.experiments run || echo "[scheduler] experiments run FAILED"
|
||||
|
||||
Reference in new issue
Block a user