Walk-Forward Validation Calculator

Design reliable walk-forward experiments, compare validation windows, calculate fold schedules, inspect leakage risks, evaluate predictions, and export practical time-series model reports easily for teams.

1. Dataset and time settings

CSV row count overrides this value.
Recognised headers include date, actual, predicted, target, forecast, and yhat.
Loads previously exported form settings in your browser.

2. Validation windows

Used by rolling and sliding strategies.
Enter zero to generate every valid fold.
Use this to exclude holidays, outages, or unavailable forecast origins.

3. Retraining and forecasting setup

4. Time-series preprocessing

5. Actual and predicted values

Enter a complete dataset series or sequential fold predictions. Classification probabilities must remain between zero and one.

6. Scenario comparison

Formula used

Folds = floor((N − I − H − G) ÷ S) + 1

N is the observation count. I is the initial training size. H is the test window, G is the effective gap, and S is the step size.

For rolling validation, each training start moves forward. Expanding validation keeps the original training start.

How to use this calculator

  1. Enter the observation count or upload a CSV file.
  2. Select an expanding, rolling, sliding, anchored, or prequential strategy.
  3. Set training, testing, horizon, step, gap, and embargo values.
  4. Choose the model, retraining policy, preprocessing, and primary metric.
  5. Optionally provide actual and predicted values for metric calculations.
  6. Review folds, leakage notices, charts, recommendations, and exports.

Example validation schedule

FoldTraining indicesTesting indicesPurpose
10–5960–71Initial twelve-period forecast
20–7172–83Expanded training history
30–8384–95Later out-of-sample evaluation

Frequently asked questions

What is walk-forward validation?

It evaluates time-ordered models using repeated training and future testing windows. The method imitates real forecasting more closely than random splitting.

When should I use an expanding window?

Use it when older observations remain informative. Every new fold adds more historical training data.

When should I use a rolling window?

Use it when recent behaviour matters more. It limits training history and can respond better to drift.

How should I choose the initial training size?

Include enough observations for stable fitting and seasonal coverage. Complex models usually require longer initial windows.

What does the step size control?

It controls how far the validation origin advances. Smaller steps create more folds and possible overlap.

Why add a train-test gap?

A gap helps separate training features from future labels. It can reduce leakage with delayed or overlapping targets.

What is an embargo period?

An embargo excludes nearby observations around validation boundaries. It is useful when target information overlaps through time.

Can this calculator train an ARIMA or LSTM model?

It plans validation and evaluates supplied predictions. Model training should run in your preferred machine-learning environment.

How are per-fold metrics assigned?

Complete dataset predictions use test indices directly. Shorter series are assigned sequentially when every fold horizon is present.

Related Calculators

Moving Average Forecast CalculatorExponential Smoothing CalculatorForecast Error CalculatorTime-Series Train-Test Split CalculatorLag Feature CalculatorMean Absolute Scaled Error Calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.