TradehouseBuyer guides & toolsPricingPart of TradeHouse

TradeHouse Fidelity Lab · Buyer resources

How does walk forward validation work?

Walk-forward validation tests a strategy the way it would have been run in real time: tune on the past, trade the next stretch you have not touched, then roll forward and repeat. The mechanics are simple enough to do on paper, so this page walks through a concrete schedule and the decisions at each step.

A worked 36-month schedule

Assume monthly data for three years, a 12-month training window and a 3-month test window that rolls forward 3 months at a time.

FoldTrain monthsGapTest months
11 to 12month 1314 to 16
24 to 15month 1617 to 19
37 to 18month 1920 to 22
410 to 21month 2223 to 25
513 to 24month 2526 to 28
616 to 27month 2829 to 31
719 to 30month 3132 to 34

Seven folds produce 21 months of out-of-sample results. Each test block was scored by a rule tuned only on earlier data. The stitched test blocks form the walk-forward curve. The first 13 months only ever serve as training or gap, which is why a walk-forward always shows less history than a full-sample backtest.

What happens inside each fold

  1. Fit. Choose parameters, thresholds or model weights using the training window only.
  2. Freeze. Write down the rule. Nothing about it may change during the test block.
  3. Gap. Skip a short period if your signals or labels look ahead by more than a day, so training outcomes do not overlap test entries.
  4. Trade. Apply the frozen rule to the test window with realistic fees and slippage.
  5. Record. Store the out-of-sample result and the parameters chosen. Unstable parameters across folds are a warning in themselves.

Choosing window lengths

Training windows must be long enough to estimate the rule with reasonable stability and short enough to adapt to regime change. Test windows must be long enough to contain a meaningful number of independent trades; a test block with five trades says almost nothing. A common starting point is a training window three to five times the test window, but the right ratio depends on how quickly the edge decays.

Reading the results

What walk-forward does not fix

Walk-forward guards against using the future inside a fold. It does not guard against the choice of strategy family, indicators or markets that you made after seeing the full history, nor against the number of variants you ran. If you tried 30 variants and walk-forwarded each, the best of the 30 still needs multiplicity control.

How Fidelity Lab performs it

For an uploaded trade file, Fidelity Lab splits at a date, freezes the threshold on the training split, scores it on test data with a one-day gap, reports the test net return and t-statistic, and then adds the effective sample size and Benjamini-Hochberg control across the cohorts you submitted. Where the file has too few independent days, the verdict is UNTESTABLE rather than a number. The related page on what walk-forward validation is covers the concept and variants.

Frequently asked questions

Rolling or anchored windows?

Rolling windows forget old data and suit changing markets. Anchored windows keep all history and suit stable relationships. Test both only if you count them as separate trials.

How many folds do I need?

Enough that the average is not dominated by one block. Five to ten is common, subject to having enough independent trades per fold.

Related guides

All buyer guides and tools

Data and research only. Not investment advice, not a recommendation to buy or sell, and not an offer of any security, swap or event contract. TradeHouse is not a registered investment adviser, broker-dealer or exchange. Any backtested, hypothetical or historical results are shown for illustration, have limitations (including hindsight and no trading costs or slippage unless stated), and do not guarantee future results. Prediction markets and options carry risk of loss.