Skip to content

C2 — A reusable walk-forward validator #445

Description

@eaitbrahim

PRD §3 C2.

Today

keel ran a walk-forward procedure manually, once, to choose turtle_breakout's 40/20 lookback (keel/strategy/rules/turtle_breakout.py:181, docs/experiments/2026-07-20-trials-backfill.md). There is no reusable rolling-origin validator shipped as a command or module.

Competitors — parity with a weak field

  • Jesse — a mandatory train/test split in its optimizer: every trial's fitness is computed on a training window, then re-run on held-out test data. Docs recommend a third untouched validation window (60–70 / 15–20 / 15–20).
  • Freqtrade — has none either; overfitting control is manual (--timerange splits, --min-trades, --early-stop).
  • Hummingbot — no walk-forward or Monte Carlo anywhere.

So this is parity with the best of a weak field, which is why it ranks below C1.

Fit with keel

The existing research stack is unusually well-suited:

  • keel/research/deflate.py already computes Minimum Backtest Length — years/trades needed before an observed Sharpe is distinguishable from luck given N trials. That is the right stopping rule for choosing window sizes.
  • implied_independent_trials discounts a correlated sweep's effective trial count — directly applicable to overlapping walk-forward windows.
  • The hash-chained trials ledger gives every fold durable provenance.

The constraint that shapes the design

This must not become a parameter search. The Strathern rail exists so a PBO score can never be a ranking key (keel/research/cscv.py), and a walk-forward validator that reports "best window" reintroduces exactly that. It should validate a given parameter set across folds and report stability — never select among sets.

Scope

  • Rolling-origin folds with configurable train/test lengths and step.
  • Per-fold metrics plus a degradation trend across folds.
  • Ledger every fold with provenance.
  • Explicitly refuse to rank configurations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    researchMeasurement, validation or KB work (Research & validation)

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions