Anchored vs Rolling Walk-Forward Backtests: Which Trading Validation Method Fits?
Anchored walk-forward testing expands the training history as time advances. Rolling walk-forward testing keeps a fixed-length training window and drops older observations. Both evaluate a trading strategy on later, unseen periods, but they answer different questions about how much historical information remains useful.
How the two walk-forward designs work
In an anchored test, train on months 1–12, test on month 13, retrain on months 1–13 and test on month 14. In a rolling 12-month test, train on months 1–12 and test month 13, then train on months 2–13 and test month 14. Both produce a sequence of out-of-sample results. Only the rolling version forgets month 1 when month 14 is evaluated.
Worked example: the difference in sample sizes
Suppose there are 100 usable observations per month. The first training window contains 1,200 observations. At the second evaluation, anchored training uses 1,300 observations, whereas rolling training still uses 1,200. At the sixth evaluation, anchored training uses 1,700 observations and rolling training 1,200. These counts assume no missing observations and no purging or embargo; real event-based labels may reduce usable samples.
When anchored training is more useful
Anchored training may suit relatively stable relationships and data-hungry models, because more observations can reduce estimation noise. It can also retain obsolete regimes. More data is not automatically better when exchange structure, transaction costs or participant behaviour has changed.
When rolling training is more useful
Rolling windows can respond more quickly to structural breaks by excluding old regimes. The trade-off is fewer observations and more unstable parameters. A six-month rolling window can look agile yet generate high turnover and fragile estimates if there are few independent trades.
Avoid selection bias in the comparison
Choose candidate window lengths, refit frequency, features and cost assumptions using development data only. Evaluate the final selected design on a genuinely untouched later period. If you compare 20 window lengths and report the best, the selection process itself can overfit. Account for overlapping trade outcomes across training and test boundaries.
A practical test protocol
Record the earliest timestamp at which each feature was known. Define fixed test blocks, for example one month each. For each block, fit preprocessing and model parameters only on permitted training observations; exclude overlapping labels where relevant. Generate executable signals, then subtract realistic spreads, fees, financing and slippage. Aggregate net returns, drawdown, turnover and worst-period performance across all test blocks rather than highlighting one winning period.
Apply the same prediction horizon, test dates, transaction-cost model and tuning budget to both training-window designs. Where outcomes overlap a test boundary, purge the affected labels before fitting. Selecting the better window after inspecting all out-of-sample results introduces another research choice that requires independent validation.
For broader education in evaluating market evidence and developing testable trading ideas, explore the Trade Idea Generation Masterclass.
Interpret the results responsibly
A rolling design outperforming an anchored design does not prove that markets have changed permanently. Compare dispersion across folds, the number of trades and sensitivity to small window changes. If performance flips when the training window changes by one month, treat the result as unstable rather than as a precise optimum. Neither method prevents survivorship bias or the repeated reuse of a final holdout.
Related learning: Purged cross-validation and data leakage; Traders MBA Education knowledge base. Further reading: scikit-learn cross-validation documentation, Investor.gov: market orders, and Investor.gov: limit orders.
Educational material only. Illustrations are hypothetical, not investment recommendations or evidence of future results.
Stay Ahead of the Markets
Get market analysis, financial news and practical trading insights delivered straight to your inbox.