Time-Series Cross-Validation (Rolling/Expanding Window)
Also known as: Rolling-Origin Cross-Validation, Walk-Forward Validation, Expanding Window Evaluation, Zaman Serisi Çapraz Doğrulama
Time-series cross-validation is a resampling procedure designed for sequentially ordered data. Instead of randomly partitioning observations — which would destroy temporal structure and introduce data leakage — it advances a forecast origin one step at a time, fitting a model on all past data up to that origin and evaluating it on the immediately following out-of-sample period. Economists, financial analysts, and meteorologists use it whenever an honest, operationally realistic estimate of predictive accuracy is required for a time-ordered process.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use time-series cross-validation whenever you need an unbiased estimate of forecast accuracy for temporally ordered data — macro-economic forecasting, stock return prediction, energy demand, or epidemiological surveillance. The method is valid under stationarity or covariance-stationarity; apply differencing or detrending beforehand if the series is non-stationary. Avoid standard k-fold cross-validation for time series, as it violates the temporal ordering constraint and produces optimistically biased error estimates. For very short series (fewer than 50 observations) the number of usable evaluation windows may be too small to yield stable estimates; bootstrap-based evaluation is a common alternative in that setting.
Strengths & limitations
- Strictly respects temporal ordering, eliminating look-ahead bias and data leakage.
- Provides a realistic simulation of deployment conditions across many evaluation windows.
- Model-agnostic: applicable to parametric models (ARIMA), machine-learning regressors, and neural networks alike.
- Yields a distribution of per-origin errors that enables statistical testing via the Diebold-Mariano test.
- Computationally expensive for large datasets or slow-to-fit models, since the model is re-estimated at every origin.
- Early evaluation windows may be too short to fit complex models reliably, biasing early-origin errors upward.
- Consecutive forecast errors are serially correlated, so treating them as independent overstates statistical precision.
- Choice of minimum window size t₀ and window type (rolling vs. expanding) is subjective and can materially affect reported accuracy.
Frequently asked
What is the difference between rolling-window and expanding-window cross-validation?
In the rolling (fixed-window) variant the training set always contains the most recent w observations; older data are dropped as the origin advances. In the expanding variant the training set grows monotonically — every historical observation is retained. The expanding window is generally preferred when data are scarce or when long-run patterns matter; rolling windows are preferred when structural breaks make old data misleading or when computational budget is tight.
Can I use time-series cross-validation for multi-step forecasts?
Yes. At each origin you generate forecasts for horizons h = 1, 2, …, H and record separate error sequences for each horizon. Accuracy is then reported per horizon. Be careful not to pool errors across horizons into a single metric without weighting, because short-horizon and long-horizon errors have very different magnitudes and volatility structures.
How many evaluation windows do I need for reliable accuracy estimates?
Bergmeir and Benítez (2012) do not prescribe a minimum, but practical guidance from the forecasting literature suggests at least 20–30 out-of-sample origins to achieve stable error estimates. For seasonal data this typically means at least two or three full seasonal cycles in the evaluation period. Fewer windows produce high-variance accuracy estimates that should be accompanied by wide uncertainty intervals.
Sources
- Bergmeir, C., & Benítez, J. M. (2012). On the use of cross-validation for time series predictor evaluation. Information Sciences, 191, 192–213. DOI: 10.1016/j.ins.2011.12.028 ↗
How to cite this page
ScholarGate. (2026, June 2). Time-Series Cross-Validation (Rolling/Expanding Window). ScholarGate. https://scholargate.app/en/econometrics/ts-cross-validation
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- ARIMAEconometrics↔ compare
- Bootstrap InferenceStatistics↔ compare
- Diebold-Mariano TestEconometrics↔ compare