DocsOptimization

Walk-Forward Analysis

Walk-Forward Analysis

5 windows · Anchored
W1
IS
OOS
+8.2%1.14
W2
IS
OOS
+5.7%0.98
W3
IS
OOS
+12.1%1.41
W4
IS
OOS
+3.8%0.72
W5
IS
OOS
+9.4%1.18
WFE
72%
OOS Sharpe
1.09
Pass Rate
4/5
Verdict
Pass

Walk-Forward Analysis (WFA) is the most important validation step. It tests whether optimization results hold up on data the optimizer has never seen.

How WFA Works

WFA divides your data into rolling windows:

  1. In-sample window — The optimizer finds the best parameters on this period
  2. Out-of-sample window — The strategy runs with those parameters on the next unseen period
  3. Roll forward — The window shifts, and the process repeats

Each out-of-sample period is a genuine forward test. The strategy cannot see this data during optimization.

Why This Matters

A strategy that performs well in-sample but fails out-of-sample is overfitted. WFA catches this before you risk real capital.

The out-of-sample results are the ones that matter. In-sample results show what the optimizer found; out-of-sample results show whether those findings are real.

Configuring WFA

In the WFA tab of the Research Lab:

SettingDescription
Window sizeLength of each in-sample optimization window
Out-of-sample sizeLength of each out-of-sample test period
Step sizeHow far to roll the window each iteration
Target metricWhat to optimize for in each window

Window Size Guidelines

  • Too small: Not enough data for meaningful optimization
  • Too large: Fewer windows, less validation
  • A good starting point is 60-70% in-sample, 30-40% out-of-sample

Reading WFA Results

After WFA completes, you see:

  • Window-by-window breakdown — Performance for each in-sample and out-of-sample period
  • Aggregate out-of-sample metrics — Combined performance across all forward tests
  • Consistency score — How stable the results are across windows
  • Parameter drift — Whether the optimizer picks similar parameters in each window or wildly different ones

Key Indicators

  • Positive out-of-sample returns — The strategy has predictive value
  • Consistent parameters — The optimizer finds similar values each time
  • In-sample / out-of-sample alignment — Forward test results resemble optimization results

Warning Signs

  • Out-of-sample results are significantly worse than in-sample
  • Parameters change dramatically between windows
  • Some windows are highly profitable while others lose money

Multi-Asset WFA

Pack WFA runs Walk-Forward Analysis across multiple assets simultaneously, using a common parameter set. This is the strongest test of strategy robustness — if the same parameters work across different markets, the idea is likely genuine.

Saving WFA Results

WFA results can be saved for later review and comparison. Saved results are accessible from the WFA Results page in the main navigation.

Next Steps

wfawalk-forwardout-of-samplevalidationrolling windows