Appearance
Walk-Forward Optimization
Walk-forward optimization splits your historical data into multiple in-sample (IS) training windows and out-of-sample (OOS) test windows. It answers the question: "If I had optimized my parameters on past data and then traded the next period, would the strategy have held up?"
It is the most rigorous validation available in MarketHeist, and it is the closest simulation to how a real strategy would have been deployed.
In-sample vs. out-of-sample
| Term | Meaning |
|---|---|
| In-sample (IS) | The window used to find the best parameters. The optimizer can "see" this data. |
| Out-of-sample (OOS) | The subsequent window the optimizer never saw. Performance here reflects real predictive value. |
The key insight: any strategy can look good in-sample if you test enough parameters. The out-of-sample period is the only honest measure of whether the strategy has genuine predictive power.
How walk-forward works in MarketHeist
- Open the Walk-Forward panel (available after loading data and selecting an indicator).
- Set the IS window — the number of bars (days/weeks) used to optimize parameters.
- Set the OOS window — the number of bars to test on after each optimization.
- Click Run Walk-Forward.
MarketHeist steps through the full history in non-overlapping OOS windows:
|──────── IS ────────|── OOS ──|
|──────── IS ────────|── OOS ──|
|──────── IS ────────|── OOS ──|For each step, the tool finds the best-performing parameters on the IS window, then records performance on the following OOS window. The final result is a concatenation of all OOS periods.
TIP
A common IS/OOS split is 4:1 — four parts training for every one part testing. For daily data, a 252-day IS window with a 63-day OOS window (roughly 1 year : 1 quarter) is a reasonable starting point.
Interpreting the results
IS vs. OOS Sharpe degradation
The most important output is the comparison of IS Sharpe to OOS Sharpe:
| IS Sharpe | OOS Sharpe | Interpretation |
|---|---|---|
| 2.0 | 1.5 | Good — modest degradation, strategy likely has real signal |
| 2.0 | 0.8 | Moderate — significant degradation, may be regime-specific |
| 2.0 | 0.2 | Poor — near-random OOS, likely in-sample overfitting |
| 2.0 | -0.5 | Very poor — strategy performs worse OOS than doing nothing |
Some degradation from IS to OOS is expected and normal — you can't optimize on data you haven't seen yet. The question is how much degradation. A rule of thumb: OOS Sharpe should be at least 50–60% of IS Sharpe for the strategy to be worth trading.
% windows positive
This metric counts what percentage of the individual OOS windows produced a positive Sharpe. It tells you whether performance is consistent across different market periods, or concentrated in one lucky sub-period.
| % Positive | Interpretation |
|---|---|
| > 70% | Strong — strategy works across most market conditions |
| 50–70% | Moderate — works more often than not, but regime-dependent |
| < 50% | Weak — fails more often than it succeeds out-of-sample |
A strategy with 80% IS Sharpe based on just 2 good OOS windows out of 10 is far less trustworthy than one with 60% IS Sharpe spread evenly across 8 out of 10 windows.
OOS equity curve
Examine the cumulative OOS equity curve. Healthy walk-forward results show:
- Gradual, consistent growth without dramatic cliff-edges
- No single OOS window dominating all gains
- Drawdowns in line with the IS-simulated drawdowns
If the OOS equity curve is flat or declining except for one spike, the strategy's apparent "average" OOS performance is not representative of what you'd typically experience trading it.
When to trust the result
Walk-forward results are most trustworthy when:
- The number of OOS windows is at least 8–10 (enough for statistical significance)
- % windows positive is above 60%
- OOS Sharpe degradation from IS is less than 50%
- The OOS equity curve grows smoothly without cliff-edges
Be skeptical when:
- The full data history is short (fewer than 5 OOS windows)
- The OOS Sharpe is driven by a single exceptional period
- The IS window is extremely long relative to OOS (you're fitting 5 years to predict 1 month)
Next steps
- Parameter Sweep — find robust parameters before running walk-forward
- Monte Carlo — stress-test the OOS equity curve further