Engine Sanity Checks (Stage S0)
MANDATORY; blocks everything. Four contract checks that prove the certification engine is trustworthy before any design work. Each has a STOP-and-report failure mode — a failure here means the engine itself is broken (bug-protocol), and no downstream number can be trusted. These S0 runs (and S1 baseline scoring) explicitly DO NOT COUNT toward the certification-body minimum — they are contract checks and benchmarks, not candidate certifications.
The four checks
-
Walk-forward sweep smoke.
create_portfolioa trivial book (e.g.SPY > SMA50). Runrun_walk_forward_studywithmode:"validation",fold_count:2,engine_kind:"sweep", onegene_intent× 3 values,certification:false. It must start and complete with per-fold OOS + aggregate. Proves: the certification engine actually runs end-to-end. -
Window fidelity (one fold). Backtest the materialized fold winner on its validation and OOS windows; the fold's
validationStatistics/oosStatisticsmust match standalone backtests within rounding. Confirm disjointness: train∩validation, train∩OOS, validation∩OOS all empty, and OOS starts after validation ends. Proves: the walk-forward windowing isn't leaking. -
Persistence.
get_walk_forward_study_resultsreturns a realselectedChatPortfolioIdfor every completed fold. Proves: fold winners materialize as real objects you can inspect/deploy. -
Dead-name handling. Tiny 2022-window backtest on the full universe including a name not yet listed then (e.g. SNDK). Pass: the name is absent, or appears in a not-yet-listed reject list with no fabricated price/indicator values. Fail: the engine errors, or returns any non-null reading for a name that didn't trade. Proves: the engine doesn't fabricate data on not-yet-listed names.
On failure
Any failed S0 check → STOP, file the bug-protocol hand-off doc, and do not proceed to design work. A broken engine invalidates everything downstream; there is no point certifying strategies on it.