115TRADING
Contact
All research

2 min read

The walk-forward lab

A single backtest is a memory test — it tells you a strategy could fit the past, not that it has an edge. The lab walks forward instead: optimize on what was known, test on what came next, roll, repeat.

Listen

Narrated in the writer’s own voice · 2:51

Contents4 sections

A single backtest is the easiest lie in this business to tell yourself. Fit a strategy to all of history, tune the parameters until the equity curve looks beautiful, and you have proven exactly one thing: that the strategy can memorize the past. That is not an edge. It is a strategy that has already seen the answers. The walk-forward lab exists to take those answers away.

The mechanics

The mechanics are simple, which is most of the point. Optimize a strategy on a training window — a slice of history it is allowed to learn from. Then run it, untouched, on the next window it has never seen, and record what actually happened. Roll both windows forward and do it again. And again, across years.

FIG.1 / WALK-FORWARD6 FOLDS · TRAIN 4 : TEST 1
Fig. 1 Each fold tunes only on the history it could have known and is scored on the window that came next. Roll forward and repeat, and the test windows never overlap: stitched together they form one out-of-sample record, the only part of the run that counts as evidence.

What you get at the end isn't one backtest on data the strategy was tuned to fit; it's a chain of small, honest out-of-sample tests, each one asking the same question — would this have worked on the week that hadn't happened yet?

Making the tests trustworthy

The lab is the environment that makes those tests trustworthy. Every run is deterministic replay, so the same inputs always produce the same fills and the same result — no quiet drift between what we tested and what we saw. Costs are modeled honestly: slippage, fees, the spread you actually cross. An edge that only survives frictionless trading isn't one, and the lab is built to expose that early.

Most ideas die here, and that is the lab working, not failing.

Testing the re-tuning, not the parameters

Walking forward also changes what we can trust to automation. If a strategy is re-optimized on a rolling basis — retuned as new data arrives — the thing that has to be proven isn't a single parameter set, it's the re-tuning process itself. Walk-forward tests exactly that: it replays how the strategy would have re-optimized over time and shows whether that habit held up out-of-sample. That is what lets a re-optimizing model run with a person watching rather than a person babysitting every parameter.

Evidence, not a green light

None of this makes overfitting impossible — it makes it harder, and it makes the cheating visible. You can still overfit the walk-forward process itself if you run it enough times and cherry-pick, so the lab's real output isn't a green light, it's evidence. It proposes; people decide what earns real capital. The point of walking forward isn't to be certain. It's to be honest about how little a backtest actually proves, and to keep only the edges that survive being surprised.