Overfitting & ValidationIntermediate· 8 min read· Last reviewed 15 Jun 2026

Walk-forward validation

A transparent way to separate true behaviour from optimisation bias.

Educational only. Nothing in this note is investment advice, a recommendation, a trading call, a tip, a signal, or a price target. Examples are illustrative — never live market guidance.

Key takeaways

  • Walk-forward evaluates rolling out-of-sample windows.
  • Each window is judged using only information available at its start.
  • Per-window variation matters as much as the aggregate metric.
  • Non-overlapping windows separated by structural breaks are most informative.

The idea

Walk-forward validation re-fits or re-evaluates a rule on rolling windows, with each window evaluated using only information available at its start. It is one of the most honest tests a backtest can offer because it explicitly separates the act of choosing parameters from the act of measuring performance.

Train, test, roll

A typical setup splits the data into in-sample (train) and out-of-sample (test) segments and rolls forward. For example: train on 2014-2016, test on 2017; train on 2014-2017, test on 2018; and so on. Each test segment is data the rule has never been tuned on.

Non-overlapping windows matter. If each test segment overlaps the next train segment, evaluations are not independent and the validation is weaker than it looks.

Reading the output

The aggregate metric across all test windows is one number. The per-window distribution is more informative. A rule whose edge lives in one window and disappears in the others is not robust, even if the aggregate looks fine.

For Indian markets, windows separated by structural breaks (introduction of weekly expiries on a given index, lot-size revisions, peak-margin changes, STT changes) are particularly informative because they test whether the rule's edge survived the change.

Parameter stability

If parameters are re-fit per window, the stability of the chosen parameters across windows is itself a signal. Parameters that bounce around widely are evidence that the in-sample optimum is unstable — a soft form of overfitting.

Common mistakes

  • Using overlapping windows so each evaluation sees the next one's data.
  • Reporting only the aggregate, hiding per-window variation.
  • Re-fitting parameters per window without disclosing it.
  • Choosing window boundaries to flatter the result.

How this appears in OptionScience reports

Each report's Robustness tab on the Performance dashboard summarises walk-forward window behaviour and parameter stability.

Practical educational example

Splitting a 2014–2024 dataset into six rolling windows and reporting metrics window-by-window quickly shows whether the rule is consistent or whether its 'edge' lives in one regime.

Checklist

  • Are the windows non-overlapping?
  • Are per-window metrics shown alongside the aggregate?
  • Is the rule consistent across regimes or concentrated in one?
  • Are parameters re-fit per window, and is that disclosed?
Apply the method

Read a full historical study using this discipline.

Browse the Strategy List →
Educational only. Nothing in this note is investment advice, a recommendation, a trading call, a tip, a signal, or a price target. Examples are illustrative — never live market guidance. OptionScience publishes historical research material for independent study. We do not offer investment advice, trading advice, recommendations, signals, calls, tips, or price targets.