feat(research): add durable walk-forward validation workflows

This commit is contained in:
Boki 2026-10-24 12:34:39 -04:00
parent abd1c5b83d
commit 3ed7b98f7c
45 changed files with 5188 additions and 199 deletions

View file

@ -12,7 +12,7 @@ Scheduling source of truth: [manifest entry R08](../manifest.json). No task is a
## Intended behavior and implementation scope
First implement bounded chronological parameter selection and nonoverlapping walk-forward recipes for deterministic registered strategies. Explicit warmup and evaluation windows; each validation segment starts from its declared initial capital and empty positions with warmed indicators, not carried money/state. Aggregate segment returns as a labelled reset-segment research series, never claim one continuous tradable equity curve. Cost/parameter sensitivity reuses grid expansion. Reject trainable/overlapping-label models until their fit-artifact and declared horizon/embargo contracts are supplied; do not invent general ML infrastructure for SMA.
First implement bounded chronological parameter selection and nonoverlapping walk-forward recipes for deterministic registered strategies. Explicit warmup and evaluation windows; each validation segment starts from its declared initial capital and empty positions with warmed indicators, not carried money/state. Aggregate segment returns as a labelled reset-segment research series, never claim one continuous tradable equity curve. Parameter sensitivity reuses the existing bounded grid. Cost sensitivity needs a separate explicit immutable financial-policy admission contract; costs are not strategy parameters and must not mutate saved templates. Reject trainable/overlapping-label models until their fit-artifact and declared horizon/embargo contracts are supplied; do not invent general ML infrastructure for SMA.
Persist the immutable validation manifest/report as experiment-owned JSON on the R06 experiment (or a focused child row if immutability requires it), keyed by experiment/report version and containing every contributing run ID, selection rule and segment policy. This is not R03 research-findings storage. Reopening an experiment must recover the same report; new inputs require a new experiment/report identity.
@ -79,7 +79,7 @@ This component is explicitly **prepared input, not durable experiment evidence**
### Validated preflight handoff
The first component is independently reviewed and `component_validated_uncommitted`; full R08 remains `in_progress`. Exact bars and legacy conversion provenance survive slicing; immediate source lineage stays in the outer preview. Warmup diagnostics respect actual availability and retained strategy ordering, including observations at/after the evaluation end. Existing account-clock calculation is reused for each phase without changing financial policy.
The first component is independently reviewed and committed as `67ab30c`; full R08 remains `in_progress`. Exact bars and legacy conversion provenance survive slicing; immediate source lineage stays in the outer preview. Warmup diagnostics respect actual availability and retained strategy ordering, including observations at/after the evaluation end. Existing account-clock calculation is reused for each phase without changing financial policy.
Full repository checks passed (786 integration /150 Rust tests), PostgreSQL (194 tests /1655 assertions), Chromium (12 workflows /306 assertions), strict test types, lint and formatting. Native regressions prove independent initial cash/positions/state, no warmup orders/fills and earlier-phase invariance to a changed test suffix. Browser/database tests prove preview makes no retained-data/job/template writes. Hashes and logs: `manifest.json` → `twenty_ninth_wave_validation`.
@ -95,6 +95,22 @@ The web supports saved validations, training admission, selection, heldout progr
### Validated durable handoff
The single-recipe component is independently accepted and `component_validated_uncommitted`. Shared Rust economics, ordinary runs/outbox, SQL22/23 retry semantics and original evidence are preserved. All repository gates pass (825 integration /150 Rust tests), PostgreSQL/Redis 205 tests /1773 assertions, Chromium 13 workflows /357 assertions, strict test types and lint. Exact source hashes and review evidence: `manifest.json` → `thirtieth_wave_validation`.
The single-recipe component is independently accepted and committed as `abd1c5b`. Shared Rust economics, ordinary runs/outbox, SQL22/23 retry semantics and original evidence are preserved. All repository gates pass (825 integration /150 Rust tests), PostgreSQL/Redis 205 tests /1773 assertions, Chromium 13 workflows /357 assertions, strict test types and lint. Exact source hashes and review evidence: `manifest.json` → `thirtieth_wave_validation`.
The UI supports the complete staged lifecycle and immutable report reopening. Native regressions prove unchanged training scores/winner after modifying only future test prices; malformed or missing candidate evidence cannot seal selection. Atomicity, SQL tamper, receipt/cancel races, migration preservation and phase retries pass. Full R08 remains incomplete for repeated walk-forward windows/reset-series aggregation and bounded cost sensitivity. R09 remains blocked. No performance or trading/default/AI activation occurred.
## Authorized repeated-window component — 2026-10-24
The durable single-window workflow is accepted and committed as `abd1c5b`. Implement bounded walk-forward series now; cost sensitivity remains separate because it needs an explicit financial-policy admission branch. Freeze 2–10 ordered recipes and common source/build/grid/policies before any member runs. Count every planned training candidate and both future holdouts against the 100-run bound. Training starts cannot decrease, training cutoffs strictly increase, and each test end must be no later than the next validation start. Existing per-window boundary/warmup checks remain authoritative.
A focused series header and immutable train-root memberships preserve existing single-window semantics; SQL22–24 files remain unchanged. Admission of all member roots/slices/runs/outbox is atomic. Reuse per-window actions and ordinary retries; no bulk-select scheduler or general workflow framework. Whole-series cancellation reaches all windows, while local member cancellation only blocks series completion. Historical finalization verifies every sealed report and its canonical result facts, copying ordered validation/test reset segments without new financial or statistical formulas. Receipt replay precedes mutable eligibility.
The web provides explicit windows, preview, submission, member links, report save/reopen and honest missing/failed/cancelled states. Required proofs include total budget/chronology, later-suffix independence, partial-admission rollback, exact immutable membership, receipt/cancel races, old evidence preservation, pool1 transactions and the full two-window native browser lifecycle. Full R08 remains partial for bounded cost scenarios after this component.
### Validated walk-forward handoff
The repeated-window component is independently accepted and `component_validated_uncommitted`. Forty-one source/test/config files preserve the existing Rust financial engine, worker/run/outbox model and SQL22–24 behavior. New SQL25 headers and exact train-root membership guards keep all-window admission atomic; full native evidence is checked again before sealing an immutable ordered reset-segment report. Member cancellation stays local; series cancellation prevents new member actions without changing completed evidence.
The web supports explicit 2–10-window recipes, full promised-run counts, synchronous shared submission ownership, member actions through existing pages, and saved report reopen. Native tests prove future-suffix independence, unchanged old migrations/receipts/leases, partial-admission rollback, actual lock contention, finalization receipt races and rejection of corrupted financial/analytics evidence. Repository test gates pass (882 integration /150 Rust), PostgreSQL/Redis 215 tests /1881 assertions, Chromium 14 workflows /412 assertions; final source and authored-test lint/types pass. Exact commands, formatting-only corrections and old fixture lint limitations are recorded in `manifest.json` → `thirty_first_wave_validation`.
Full R08 remains partial for bounded cost sensitivity; R09 remains blocked. Next scope should define supported fee/slippage scenarios as immutable execution-policy inputs and reuse canonical runs/results, without template mutation, strategy-parameter hacks, a second simulator or a window×cost scheduler. No regime/finding integration, performance work or AI/default/trading activation is included.