Quant research and backtesting

Walk-forward analysis

Also called walk-forward optimisation, walk-forward testing, rolling-origin evaluation

Repeatedly fitting a strategy on a window of past data, testing it on the next unseen period, rolling both forward, and joining the test periods into one out-of-sample record.

How it works

Each step mimics what a trader would do live: calibrate on what is known, trade the next period, then recalibrate. The windows can be rolling (fixed length) or anchored (expanding from the start). The joined test periods give an out-of-sample equity curve that also reflects how unstable the fitted parameters are. It was set out for trading systems by Robert Pardo in 1992. Its limit is that it uses each period for testing only once and along a single path, so the result can depend on where the windows happen to fall; cross-validation methods such as combinatorial purged cross-validation produce many paths instead.

Worked example

Optimise on months 1 to 3, test on month 4; optimise on 2 to 4, test on 5; and so on. With 60 months of data this gives 60 - 3 = 57 out-of-sample test months.

Put it to work in a timed game.

Practise with Find the Bug

Sources

  1. en.wikipedia.org/wiki/Walk_forward_optimization
  2. davidhbailey.com/dhbpapers/backtest-pseudo.pdf

Last checked November 2026.

← All 281 glossary terms

Was this definition clear?