Walk forward testing takes the out of sample idea and repeats it across your entire data. You build on a chunk, test on the next unseen chunk, then do the same on the following chunks. Instead of one pass or fail, you get a string of out of sample results, which is a lot harder to pass with luck alone.
How does walk forward work?
Split your history into rolling windows. Build the strategy on the first stretch, then test it on the stretch right after, the part it never saw. Slide everything forward, re optimise, and test the next unseen stretch. Repeat to the end. Ten windows in, you're not staring at one out of sample number, you're staring at ten, and a fake edge struggles to survive all ten. It copies real life, where you tune on what you know and trade what comes next.
Anchored or rolling?
Two types. Anchored keeps the start fixed and keeps adding new data as it goes, so it always builds on all the history so far. Rolling uses a fixed size window that slides forward, dropping the oldest trades as it moves. Rolling reacts faster to a changing market. Anchored is steadier, since it never forgets old data. Which one fits depends on your edge: if it's timeless, go anchored; if it shifts over time, go rolling.
What it can and can't tell you.
Walk forward is the toughest cheap test you can run on a backtest, but it isn't magic. Re optimise on tiny windows and you just overfit many times instead of once, so keep each build big enough to mean something. And it still runs on history, which never includes the crash that hasn't happened yet. A strategy that survives walk forward has earned real trust but trust isn't proof. The market gets the final vote, always.
Frequently asked questions
References
Related terms
- Expectancy — What one average trade is worth to you, after the wins and losses cancel out.
- Overfitting — When a strategy is tuned so tightly to the past that it only works on the past.
- Out of Sample — The data your strategy never saw while you built it, kept back to test if the edge is real.
- Monte Carlo — Reshuffling your trades thousands of times to see the range of outcomes luck could have handed you.
