← All posts
Methodology9 min read

Walk-Forward Optimisation: The Only Way to Know If Your Edge Is Real

In-sample optimisation without out-of-sample validation is just curve fitting with extra steps. Walk-forward testing is what separates research from wishful thinking.

Imagine you're fitting parameters for a moving-average crossover strategy. You test 200-day/50-day, 150-day/30-day, 100-day/20-day, and 50 other combinations. You pick the one with the best Sharpe. Congratulations — you have just found the optimal parameters for that specific historical window. Whether they work going forward is a separate question entirely.

The problem with full-sample optimisation

When you optimise parameters on the same data you use to evaluate, you are guaranteed to find parameters that describe the noise as well as the signal. The more parameters you tune, the worse this gets. Harvey, Liu & Zhu (2016) estimated that a strategy needs a Sharpe above ~2.0 to survive standard multiple-testing corrections when you've run more than a handful of parameter combinations.

Walk-forward testing: the structure

Walk-forward optimisation (WFO) simulates the real-world research process:

  1. Divide history into overlapping windows: an in-sample (IS) optimisation period and an out-of-sample (OOS) evaluation period.
  2. Optimise parameters on the IS window.
  3. Apply those parameters — frozen — to the OOS window and record performance.
  4. Roll both windows forward and repeat.
  5. Concatenate all OOS periods. That concatenated equity curve is your honest estimate of real-world performance.

What to look for

A robust strategy should show IS/OOS efficiency above 50% (OOS Sharpe ≥ 50% of IS Sharpe). If your IS Sharpe is 2.4 and your OOS Sharpe is 0.3, you have a curve-fitting problem, not a strategy.

Monte Carlo permutation

Even WFO can produce spurious results by chance. Pair it with a Monte Carlo permutation test: shuffle your signal random N times, run the same WFO, and see where your real result sits in the distribution. If 30% of random permutations outperform your strategy, you don't have edge — you have luck.