Skip to content
Rows of books on softly lit library shelves

How do you design a realistic walk-forward test?

Turn a sequence of historical fits into an executable training, prediction and model-update policy.

The key idea

A walk-forward test repeatedly fits a model using information available at a historical cutoff and evaluates predictions on later observations. Its purpose is to simulate the proposed update policy, including training windows, label availability and model replacement. A chronological split alone is insufficient if preprocessing or tuning still uses future data.

The statistical issue

Choose between an expanding window, which retains older observations, and a rolling window, which discards them. This is a model assumption about how much past information remains useful. The training frequency, holding horizon and time required to observe a target jointly determine which rows can enter each fit.

The model tested should include transformations, feature selection, hyperparameter search and the decision threshold. Refitting only the final estimator while keeping features chosen from the entire dataset gives the test an advantage that the historical investment process did not have.

A worked example

Suppose a strategy is retrained monthly and predicts a five-trading-day return. At a Friday training cutoff, labels for Monday through Friday of the same week may still be incomplete, depending on entry timing. They cannot be treated as known simply because their feature timestamps precede the cutoff.

An illustrative design uses 36 months of training history and the next month for evaluation, advancing one month at a time. Across twelve evaluations, concatenate the twelve strictly forward prediction streams. Do not average twelve annualised returns and describe the average as the realised return of one continuous account.

Practical review and implementation

Write down the update schedule before evaluating it. At each cutoff, rebuild the information set, fit transformations only on eligible training observations and finish any inner tuning without touching the outer test month. Save the selected parameters, model artifact and predictions with their timestamps.

Evaluate both predictive quality and the portfolio generated after turnover, costs and risk controls. Report results by test period so a strong aggregate does not hide repeated failures. A final untouched interval can assess the full policy after design choices have been settled.

Assumptions and limitations

Historical walk-forward performance is conditional on the markets and operational assumptions represented in the test. Frequent redesign after looking at each test month turns the forward sequence into a development sample. The method also cannot recreate unavailable delisted assets or unknown historical data revisions. Maintain a clear boundary between simulated forward evidence and genuinely unseen future observations.

Primary references

Further detail on the underlying concepts and data definitions: