Skip to content
Learning path Silver Repeatable method

Time-series validation and walk-forward

Chronological rolling and expanding designs that separate development from evaluation while respecting dependence, information horizons, and the actual sequence of decisions.

Who this is for — Anyone evaluating a strategy in temporal order, without turning the future into development information and without relying on one arbitrary split.

Time-series validation evaluates a procedure on observations later than those used to estimate or select it. Walk-forward analysis repeats this principle at successive origins: at each step it uses only the past permitted by the protocol, produces a decision for the next segment, and then advances through time.

The method more closely emulates a procedure that is recalibrated during its operating life, but it is not definitive proof. The result depends on window type and length, refit frequency, label horizon, selection rules, costs, and the number of configurations considered. If fold results influence choices, they are part of development; concatenating them does not automatically create a pristine final test.

Temporal splits and walk-forwardHoldout, rolling and expanding designs answer different questions. Proportions and windows are illustrative; dependence, label horizon and regime guide design.Temporal splits and walk-forwardHoldout, rolling and expanding designs answer different questionsProportions and windows are illustrative; dependence, label horizon and regime guide design.Fixed holdoutDevelopment and final evaluation remain separate;every look consumes the test.Rolling windowTrain and test advance with a constant-lengthmemory.Expanding windowTraining accumulates history while each testremains later in time.Untouched final testKeeps evaluation apart from iterative selectionwhen the sample allows.Cyclepedia · conditional teaching diagram, not a forecast or promise
Each window answers a different question; size, step, and buffer must reflect the information process, not a universal percentage.

Main designs

Design How it uses the past When it is informative Characteristic limitation
Chronological holdout Development first, final test later Simple final decision with a preserved test One period may be unrepresentative
Rolling origin The forecast origin advances; training may grow Evaluate several successive decisions Dependent results and possible iterative adaptation
Expanding window Training retains all available history A process that learns cumulatively Remote data may not represent the current regime
Rolling window Training retains a finite history A process intended to forget the distant past Window choice and less data
Blocked cross-validation Temporal blocks preserve local structure Comparisons under a justified design Boundaries and between-block dependence require checks
Prospective final test A frozen version on future events Test of a genuinely forward-running process Time, cost, and an initially limited sample

There is no universally correct 70/30 split. An intraday system with overlapping labels, a monthly strategy, and a macro model with few recessions contain very different amounts of information and dependence, even with the same number of rows in the dataset.


Rolling or expanding

At origin t, an expanding design uses all observations allowed through t; a rolling design uses only the most recent w. The former maximizes history, while the latter lets the process forget remote data. That choice expresses an assumption about stability, not a mere technical detail.

Every configuration should state:

  • training, validation, and test start and end for each fold;
  • whether the window is rolling or expanding, and why;
  • the step between origins and the evaluated horizon;
  • the frequency of refitting, recalibration, and parameter reselection;
  • treatment of warm-up, missing values, new instruments, and discontinued instruments;
  • aggregation of results and dependence among folds;
  • the date on which a decision based on the folds is made.

If each step chooses the best parameter using the next segment, that segment is validation, not test. To estimate the procedure honestly, internal selection must be reproduced using only information available at that origin.


Overlapping labels, gaps, purging, and embargo

In financial problems, an observation can use information over an interval, not a single timestamp. If a label measures the return over the following five days, adjacent labels share days. A row formally before the test can therefore contain outcomes that enter the test information interval.

Purging removes training observations whose information intervals overlap the test. A gap or embargo leaves a justified temporal separation to reduce contamination associated with overlap or dependence. In finance, these tools are associated with the formulation popularized by López de Prado; they are not an automatic cure. Their width should depend on the horizon, feature construction, labels, and operating process, not on a fixed percentage.

Removing rows does not correct preprocessing estimated on the full sample, a universe built from survivors, or future revisions. The control must cover the entire pipeline.


The case of random k-fold

Saying that random k-fold is always invalid for time series would be too strong. Bergmeir, Hyndman, and Koo show conditions under which standard cross-validation can be valid for purely autoregressive models, particularly when errors are uncorrelated. The lesson is not that shuffling is generally safe, but that validity depends on the structure of the problem.

In trading, causal ordering, estimated transformations, changing universes, overlapping labels, and costs normally make a chronological design that reproduces intended use more prudent. Anyone choosing a non-chronological design should establish the conditions that make it appropriate and examine the residuals, rather than merely invoking the method's name.


Illustrative example

A procedure is recalibrated at the start of each month. An expanding fold uses all data available through the end of the previous month, selects a configuration through an internal temporal validation, and generates positions for the following month. Twelve months produce twelve evaluation segments.

If the analyst inspects the twelve results and changes the features, the full set has informed development. The experiment can be described and the process can be repeated on a new period, but those months should no longer be presented as a never-seen final test. The example does not establish that one month is the correct step; that depends on the strategy's horizon and frequency.


Aggregate without losing uncertainty

Adding the returns into a walk-forward curve shows the path of a simulated procedure, but it does not make the folds independent. Useful reporting includes:

  • fold-level and aggregate results, not only the mean;
  • dates, regimes, instruments, and exposures that concentrate P&L;
  • gross and net metrics against the same benchmark;
  • the error distribution and stability of the selection;
  • turnover, capacity, and recalibration frequency;
  • every configuration considered in the process.

Variation across folds can be informative even when the mean is positive. A result dominated by one origin or one crisis calls for a narrower conclusion.


Checklist

  1. Reconstruct the complete temporal diagram before calculating metrics.
  2. Align windows and step size with actual use and the information horizon.
  3. Perform preprocessing, feature selection, and tuning inside each training set.
  4. Apply a gap or purging only when justified by interval structure.
  5. Count every reuse of fold results as development information.
  6. Where possible, preserve a separate final test or prospective phase.
  7. Report dependence, dispersion, and concentration of results.

Sources