Included with TickSurfers Pro
Walk-forward analysis: test settings on bars they have not seen
Optimizing a strategy on history can fit noise. Walk-forward analysis picks settings on one window of bars, then tests them on the next window the optimizer never saw. Repeat across the data and see whether the edge survives.
A free account opens the chart and runs backtests. Optimization and walk-forward analysis require Pro.
How the windows move
Illustrative animation with synthetic numbers. You set the in-sample bars, out-of-sample bars, and step bars.
How a walk-forward run works
Optimize on a window
Settings are chosen on an in-sample window of bars, the same way a normal optimization run would choose them.
Test on the next window
The best settings are applied to the following out-of-sample bars, which the optimizer never saw. That result is recorded.
Step forward and repeat
The windows move forward by your step size, and the process repeats across the data you loaded.
Compare the folds
A per-fold table puts each in-sample result beside its out-of-sample result, so you can see whether the edge holds.
What you control
In-sample bars
How much history each optimization sees when it picks settings.
Out-of-sample bars
How many unseen bars each test covers.
Step bars
How far the windows move between folds.
Any strategy
Built-in strategies and your own JavaScript strategies, with the same trade log and metrics.
Apply to chart
Choose a fold’s settings and apply them to the chart in one click.
Run controls
Set how many bars to load, load or remove a strategy mid-session, and cancel a run in progress.
How to read the folds
Put each fold’s in-sample result next to its out-of-sample result. You are looking for consistency, not the biggest number.
A result that holds up
| Fold | In-sample | Out-of-sample |
|---|---|---|
| 1 | +18% | +9% |
| 2 | +22% | +7% |
| 3 | +15% | +11% |
| 4 | +20% | +8% |
Out-of-sample results stay positive and in a similar range. The settings are not just fitted to one stretch of history.
A result that falls apart
| Fold | In-sample | Out-of-sample |
|---|---|---|
| 1 | +24% | +10% |
| 2 | +31% | −12% |
| 3 | +27% | −6% |
| 4 | +29% | −15% |
Strong in-sample, weak out-of-sample. The settings were probably fitted to noise.
Illustrative numbers, not real results.
A good result is evidence, not a promise
Walk-forward analysis helps you spot overfitting. It does not predict the future, and markets change. Treat a strong result as better evidence, not proof.
Frequently asked questions
Is walk-forward analysis free?
No. Walk-forward analysis is part of TickSurfers Pro ($30/month or $300/year), along with optimization and auto-optimization. A free account can still code and validate strategies, run backtests, and use bar replay.
What is overfitting?
It is when settings look great on past data only because they were tuned to it, and then stop working on new data. Walk-forward analysis tests for it by checking settings on bars the optimizer never saw.
Does a good walk-forward result guarantee future profits?
No. Walk-forward results are historical simulations. They help you judge whether settings are overfit, but they do not predict future results.
How big should the windows be?
There is no single right answer. Use an in-sample window long enough to cover varied market conditions, and an out-of-sample window long enough to produce a meaningful number of trades. Try more than one setup and see whether your conclusion holds.
Can I walk-forward test my own JavaScript strategy?
Yes. Built-in strategies and your own JavaScript strategies share the same runner, trade log, and metrics.
Historical simulations do not predict future results. Educational use only; not financial advice.
Test your strategy on bars it has never seen
Walk-forward analysis is included with TickSurfers Pro, alongside optimization and auto-optimization. Backtesting is free.