Skip to content

Add purged rolling model refits to the research pipeline - #91

Merged
initial-d merged 4 commits into
mainfrom
codex/walk-forward-training-20261124
Nov 24, 2026
Merged

initial-d merged 4 commits into
mainfrom
codex/walk-forward-training-20261124

Conversation

@initial-d

Copy link
Copy Markdown
Owner

Summary

The main pipeline currently trains one model at a chronological split and keeps it frozen. Add opt-in mlquant train --walk-forward to refit fresh models/optimizers on rolling or expanding history for adjacent prediction windows, with strict original-row label gaps and best inner-validation checkpoint selection.

Forecast coverage uses only signal-date factor availability, never future labels. Each prediction batch contains one date. Reports retain each fold's training/validation boundaries, losses, selected epoch, seed and checkpoint hash. Existing portfolio and cost-aware rebalancing consume valid forecast coverage; new portfolio artifacts record forecast hashes so backtest/capacity reject stale targets after retraining. Sequential OOS reports explain that earlier test observations may enter later refits. Legacy static training remains the default.

Validation

  • 611 local tests passed, including an independent one-step Adam gradient oracle, best-vs-last checkpoint selection, original-clock gaps for longer labels/missing dates, future-mutation invariance, RNG restoration and failed-refit artifact preservation.
  • Ruff and diff checks passed.
  • Actual 500×200×213 synthetic pipeline: four fresh models, 200 covered prediction dates, 29,759 valid forecast cells; all constrained-backtest and cost-aware stages complete. Cost-aware planning has 200 optimized dates and zero failed holds; plan/fill and plan/fee differences remain below 5e-17 and 4e-19 respectively.
  • Predeclared stationary, sign-switch and no-signal controls retain both seeds, both window policies and all quality directions against exactly the first fold's frozen best checkpoint. Refitting is not uniformly better and no market alpha is claimed.
  • CI adds rolling-training, portfolio and constrained-backtest smoke steps for Python 3.9/3.10/3.11.

Raw audit, all controls and exact full-pipeline runner. Large tensors/checkpoints/account pickles are kept outside Git. These are synthetic engineering controls, with mark-price execution assumptions and no new market-performance validation.

@initial-d
initial-d merged commit 5759dee into main Nov 24, 2026
3 checks passed
@initial-d
initial-d deleted the codex/walk-forward-training-20261124 branch November 24, 2026 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant