Walk-forward analysis in Matana Labs
Walk-forward analysis fits a strategy on one window of history, tests it on the next window it hasn’t seen, then moves both windows forward and repeats. A strategy that only works in one lucky stretch shows up as a few positive windows among many negative ones. Matana Labs runs it on the engine, filled by the second, with the windows you choose.
What it checks
Whether the idea survives regular re-optimization, not just one lucky tail.
The question behind it: Is it overfitted to history? In the app it is in Analysis Lab → Checks, stage “Required”. Can you trust the result at all? They come first and make up most of the score.
How it works
The period is cut into consecutive windows. If parameters are marked for optimization, a grid around the current values is tried on the fitting window, and the best combination by result (only among those with at least 10 trades) is used on the next test window; then both windows move on. If none are marked, the strategy runs as it is and the windows only observe. The test window never overlaps the fitting window.
How it gets its status
These are the app’s own rules, shown on the check’s card:
- broke down: most test windows are negative, or the stitched test chunks are negative
- with a caveat: the profit sits in one or two windows
- holds: the profit isn't from a single window
- can't be computed: the period is shorter than two “optimize + test” pairs
With fewer than 30 trades or 20 days in the run, the check still shows its numbers, but its status is at most “with a caveat” and the result is marked as unreliable.
How to read the result

- The strip of windows shows each test window’s result, start date and drawdown. Hover a window to see which fitting window it came from and which values were chosen.
- The curve below stitches only the test windows together: it is the strategy as it would have been traded with re-optimization.
- The mode line says whether parameters were refitted on each window (when you mark them) or the strategy ran as it is.
- Click a window to open its first day on the chart.
What walk-forward shows across many strategies and instruments: our walk-forward study.
In the score out of 100
When it has a status, it counts toward the overall score with weight 2: “holds” earns full points, “with a caveat” half and “broke down” none; “can’t compute” is left out.
Every plan, the free one included, can run it; any engine runs it needs are counted in backtest-years.
If it breaks down
The gain lives in isolated windows. Find what sets the positive windows apart (click a window to open its day on the chart), and narrow the entry to those conditions.
This is the app’s own suggestion; under Improvement the app tests candidate changes on the engine before it shows them.
Keep reading
Questions
How long are the windows?
By default 120 days to fit and 60 days to test; you can change both on the check’s page. On a short period the app shrinks the windows rather than giving up, and says so.
Do I have to mark parameters?
No. Without marked parameters the windows only observe the strategy as it is, which still shows whether the profit comes from one stretch. Mark parameters to refit them on every window.
Why is it “with a caveat” when the total is positive?
Because the profit sits in one or two windows. A repeatable edge should be positive in many windows, not carried by a single good stretch.