• ?
    Account
    no-email@account
  • Logout

Walk-Forward Strategy Optimizer

Validate strategies against overfitting by splitting historical trades into rolling in-sample (IS) optimisation windows and out-of-sample (OOS) validation windows. The engine performs a position-sizing grid search on IS data and applies the optimal scale to unseen OOS trades, then chains results into a combined equity curve.

IS Optimisation OOS Validation Overfitting Detection Strategy Workspace Linked
1 Select a strategy 2 Set window sizes & optimisation metric 3 Click Run Walk-Forward 4 Check the Walk-Forward Factor & OOS equity curve
Strategy to test for overfitting. Uses only linked simulator closed trades and needs enough data to fill at least one IS and one OOS window.
Window Settings
Rolling: each IS window covers the same fixed number of recent trades and slides forward. Anchored: IS always starts from trade #1 and grows with each step.
Metric used to rank position scales on in-sample data. Sharpe balances return vs risk; Profit Factor suits trend strategies; Win Rate is simple.
In-Sample window size — trades used to find the best position scale. Needs to be large enough to be meaningful (30–60 recommended).
Out-of-Sample window size — unseen trades the optimised scale is applied to. Typically 25–50% of the IS window. A WFF > 0.5 suggests the strategy is real.
Scale Grid (position sizing candidates)
Smallest position scale to test. 0.5 = half normal size. The grid tests all values from Min to Max in Step increments to find the best.
Largest position scale to test. Keep this conservative (2.0–3.0 max) to avoid fitting to extreme leverage scenarios.
Increment between tested scale values. Smaller = finer grid search but slower. 0.25 is a good balance between accuracy and speed.
Cost Model
Starting balance for the chained OOS equity curve. Does not affect IS optimisation, only the final equity chart.
Flat commission deducted from each trade's P&L during simulation. Enter zero if your broker charges no flat fee.
Execution slippage per trade. 1 basis point = 0.01% of trade value. 2–5 bps is typical for liquid instruments.
Waiting for simulation input.
Walk-Forward Factor -- avg OOS return / avg IS return
Total OOS Return -- chained equity curve
OOS Sharpe Ratio -- annualised across all OOS
OOS Max Drawdown -- combined OOS equity
Profitable Windows -- OOS windows with +ve return
Windows Run -- IS / OOS window pairs

Combined Out-of-Sample Equity Curve

Chained OOS equity segments. Each segment uses the position scale optimised on its preceding IS window. The trajectory reveals whether the strategy generalises to unseen data across time.

Per-Window IS vs OOS Return

Blue bars show in-sample return at optimal scale; green/red bars show what actually occurred out-of-sample. A large IS/OOS gap indicates overfitting.

IS Return OOS Positive OOS Negative

WFF interpretation: ≥0.8 Excellent  •  0.5–0.8 Good  •  0.2–0.5 Marginal  •  <0.2 Likely Overfit

Window-by-Window Detail

Per-window breakdown of IS optimisation results and OOS performance. Compare IS vs OOS metrics to identify windows with high overfitting risk.

Win # IS Trades OOS Trades Opt. Scale IS Return OOS Return IS Max DD OOS Max DD IS Sharpe OOS Sharpe IS Win% OOS Win% OOS Profit Factor
Run the optimizer to see results.