Skip to content

Non ancora disponibile in italiano. Vedi tutto ciò che è disponibile in italiano

Stockertim Dictionary · Technology · Markets

Walk-forward validation

Also called walk-forward analysis, rolling-origin validation

In short

Testing a time-series model by training on an earlier period, testing on the next one, then rolling both windows forward, so the model is never tested on data from before its training period.

  • Advanced
  • Process
  • Checked

In detail

Walk-forward validation mirrors how a forecasting or trading model is actually used. The model is fitted on a block of history, say five years, then asked to predict the following year, which it has not seen. Next, the window moves forward: the model is refitted with that year included and tested on the year after, and so on. The test results from each step are stitched together into one out-of-sample record.

Windows can be rolling, keeping a fixed length and dropping the oldest data, or expanding, keeping all history from the start. Many practitioners leave a gap between the end of training and the start of testing so that overlapping labels, such as one-month returns, do not leak information across the boundary. Tuning choices are made inside each training window only.

The method respects time order, so it avoids the look-ahead problem of shuffled cross-validation, and it shows how performance varies across different market conditions. It still has limits. If the researcher tries many strategies and reports the best walk-forward result, the overall process overfits. And a strong record over past regimes does not ensure the next regime behaves the same way.

Worked example

A researcher has 10 years of daily data from 2016 to 2025 and uses a 5-year expanding window with one-year test periods.

  1. First step: train 2016 to 2020, test 2021
  2. Second step: train 2016 to 2021, test 2022
  3. Number of test years: 10 − 5 = 5

The model is tested on five unseen years in turn, each time using only earlier data for training.

In practice

Quantitative fund researchers, risk modellers forecasting losses and economists testing forecasts use walk-forward schemes. Reviewers compare walk-forward results with simple benchmarks and check that every parameter was set inside the training window.

Watch out

  • A good walk-forward record can still be overfitted if many variants were tried and only the best was kept.
  • Overlapping labels need a gap between training and test windows to prevent leakage.

Learn it properly

Official sources

Facts last checked on 4 November 2026.

Education, not advice: the Stockertim Dictionary explains what terms mean. It never recommends buying or selling anything.

English