backtesting

Walk-Forward Analysis

A sequential backtesting method: fit on a training window, test on the next period, roll forward — simulating live deployment.

Walk-forward analysis (WFA) simulates the experience of deploying a strategy in real-time by repeatedly:

  1. Fitting the model (or optimizing parameters) on a fixed-length historical training window
  2. Testing the fitted model on the immediately following out-of-sample test period, using no future information
  3. Rolling the window forward by the length of the test period
  4. Concatenating the out-of-sample test results to form a single walk-forward performance series

Each test period's evaluation uses only data that would have been available at that historical date — there is no look-ahead bias in the final performance series, unlike a simple backtest where the full history is visible.

Anchored vs rolling training windows

  • Rolling window — fixed-length training window (e.g., 252 days) that slides forward. Responsive to structural change; avoids contamination from data many years in the past.
  • Expanding (anchored) window — training window grows over time, always starting from the same origin. Uses more data as time passes but may be affected by regime changes that make early data unrepresentative.

WFA is the most practical alternative to Purged Cross-Validation for strategies where full combinatorial CV is computationally expensive.

Related terms

Related articles