Walk-Forward (temporal validation)
Tests your algorithm on data it never saw during training, moving forward in time as it would in real life. The filter against overfitting to the past.
When you optimize an algorithm over the whole history, you cheat without meaning to: the system «sees» the future because you tuned it with data that in reality wouldn't have happened yet. Walk-Forward removes that cheat. It splits history into segments, optimizes on one segment and tests on the NEXT —which the algorithm didn't see— and walks forward through the whole series. It's the most honest simulation of how your system would have behaved trading month by month in real time.
Where it lives: Walk-Forward is a validation you run on a saved algorithm or on the candidates of an exploration, from the Algorithm Tester. It appears next to the Multiverse as one of the robustness tabs.
In-sample and out-of-sample: the core idea
The whole method revolves around two concepts:
- In-sample (IS): the segment where the algorithm is optimized. It's «what the system studied».
- Out-of-sample (OOS): the next segment, which the algorithm didn't see when optimizing. It's «the surprise exam». Only the performance here counts.
Step by step
- 1
Split history into windows
For example, optimize with 12 months and validate with the next 3. You define those proportions.
- 2
Optimize on IS, measure on OOS
The system finds the best parameters in the 12 months, then —without touching them— applies them to the next 3 months and records the result.
- 3
Slide the window and repeat
Move the whole block forward and re-optimize/validate. That way you cover entire years chaining surprise exams.
- 4
Stitch all the OOS together
The equity curve that matters is the union of all OOS segments: the real out-of-sample performance, chained.
The key metric: WFE (Walk-Forward Efficiency)
WFE compares out-of-sample performance against in-sample: how much of the «lab» performance survives in the real exam.
| WFE (OOS ÷ IS) | What it means |
|---|---|
| Near 1 | Excellent: the algorithm barely inflates in training. It generalizes very well. |
| > 0.5 | Sign of robustness. Some out-of-sample degradation is normal; over half is healthy. |
| < 0.3 | Severe overfitting: the algorithm shone in the lab and goes dark in the exam. Discard. |
Don't expect a WFE of 1. There will always be some out-of-sample degradation — that's honest and expected. Be more suspicious of an algorithm with a suspiciously perfect WFE than of one with a stable 0.6 WFE across the years.
Walk-Forward validates that the algorithm works in the temporal FUTURE; the Multiverse validates it works in ALTERNATIVE markets; the Deflated Sharpe Ratio discounts the luck of having tried many combinations. They're orthogonal: each catches a different self-deception. Use them together.