For Business

Backtesting & Statistics

What Is Walk-Forward Testing

Walk-forward testing fits a rule's numbers on a window of bars, tests them on the slice that follows, steps forward and does it again, so that the joined test slices are a run of bars none of which the rule in force had seen. This paper shows you walk-forward in five lines; the idea as windows stepping along the tape; the last step on the euro in August 2026 on real daily bars, a fit of 270.3 pips and a test of minus 99.4; the chain of 23 test weeks through 2026, 52.1 pips in all; and the Optimization Results tab on your platform where each fit is read off.

Difficulty
Beginner
Reading time
5 min
Pages
8
Reviewed by
Saman Rahbar

This paper is locked

Read it in the browser and keep the PDF with Premium, or buy this one paper.

Walk-forward in five lines

Walk-forward testing is out-of-sample testing done over and over, stepping through the tape. Each step fits the rule's numbers on a window of bars, tests them on the slice that comes next, and steps forward to do it again. What it gives is a chain of out-of-sample slices joined end to end, which is the only result worth reading, and what it shows is whether refitting keeps up with the bars, and how often the numbers change. In the example, the euro's best buy-and-sell hours were refitted every week on the previous four weeks and tested on the week that followed, 23 times through 2026: 52.1 pips in all, where a pip is the fourth decimal place of the price, with 13 of the 23 weeks up.

The windows step along the tape

Picture the windows stepping along the tape. Each grey bar is a fit window, four weeks of bars on which the rule's numbers are chosen; the gold slice after it is the test week, met once with those numbers fixed. Then everything steps one week to the right and it happens again. The grey windows overlap heavily, which is fine, because they are only where the choosing happens; the gold slices never overlap, and joined end to end they are the walk-forward result, a run of bars none of which the rule in force at the time had seen.

This paper is locked