← Backtesting guide

Walk-Forward Analysis

Walk-forward analysis is a backtesting method that divides the historical period into rolling windows, optimises strategy parameters on each in-sample window, then validates them on the immediately following out-of-sample window. The process repeats across the full history. It is the most rigorous widely-used defence against overfitting.

How does walk-forward analysis work?

The dataset is split into alternating in-sample (IS) and out-of-sample (OOS) windows. On each IS window you search for the best parameters. You then apply those exact parameters — without re-fitting — to the OOS window. The OOS windows are concatenated to form the walk-forward equity curve. If the OOS curve is profitable, the parameters generalise; if it is not, the in-sample optimisation was spurious.

Why is it better than single-period backtesting?

A single-period backtest that searches over parameters and reports the best result will always look good — it has seen the future. Walk-forward analysis enforces that each OOS result was generated by parameters chosen without peeking at that period.

Next: Monte Carlo simulation →

© 2026 backtester.run · All rights reserved · support@backtester.run

Backtest results are hypothetical and do not guarantee future performance.