Skip to Content
Optimization & WFAWalk-Forward Analysis

Run walk-forward analysis

Test optimized strategy parameters on historical data that was not used to select them.

Watch the one-minute walkthrough .

Before you start

Walk-Forward Analysis (WFA) requires Pro, Premium, or Quant. You need a saved strategy, one or two numeric parameter grids, and data covering both the training and test periods. Run an ordinary backtest first to check the strategy and execution settings.

Each window optimizes the parameter grid on in-sample (IS) data, then tests the selected combination on the next out-of-sample (OOS) period. The parameters stay fixed during that OOS test.

Configure the analysis

  1. Open Walk-forward in the sidebar and select Run a walk-forward, then choose a saved strategy. You can also use Run WFA from an optimization.
  2. In Data, select your symbols. In Execution, choose their common frequency, date range, initial cash, commission, leverage, and execution settings.
  3. In Parameters, configure one or two grids and keep the remaining parameters fixed. In Objective, choose the metric and direction used to select each IS combination. CAGR and Calmar are not available as WFA targets.
  4. In Windows, review Settings; use Edit settings if you need to change the data, grid, or objective.
  5. Under Window structure, set IS start, IS end, and Last date. Choose the Step (out-of-sample length) in hours, days, months, or years. The step also controls how far the next window advances.
  6. Choose Rolling or Anchored, then open Show dates to inspect the complete window schedule.

In Rolling mode, both IS edges move forward and the training length stays fixed. In Anchored mode, IS start stays fixed and the training history grows with each window. Only complete OOS windows that fit within the chosen period are included.

Read the OOS share

The share is OOS duration / (IS duration + OOS duration), not OOS divided by IS alone. Four years IS followed by one year OOS is approximately 20% OOS.

Rolling mode shows the share of each cycle. Anchored mode shows the first cycle’s share; later shares decrease as IS grows. The preview warns about shares below 10% and schedules with fewer than 10 windows. Review the proposed adjustments rather than treating the warning as a performance assessment.

Check the dates

The displayed IS and OOS date ranges include their first and last dates. For example, IS ending 31 December 2023 is followed by OOS starting 1 January 2024. Hourly schedules show UTC times. The training and test periods within a window do not overlap; later windows may train on data that was OOS in an earlier window.

Review credits and run

The preview shows Windows, Backtests, Credits, and Balance after run. Previewing does not start simulations or consume execution credits.

For W windows and G parameter combinations:

  • Planned backtests: W × (G + 1); every window includes one OOS backtest.
  • Estimated credits: W × G × 0.2; only IS optimization iterations are charged.

For example, 10 windows with 9 combinations plan 100 backtests and cost 18 credits. OOS backtests do not add a separate charge. WFA does not use the Free plan’s optimization entitlements.

Check that your balance covers the estimate, then select Run WFA. If credits become insufficient while the analysis is running, a later window can fail. You can leave the page and reopen the run from Walk-forward to check progress.

Read the results

After all windows complete, review:

  • Stitched out-of-sample equity and Stitched out-of-sample drawdown: the OOS periods combined in time order, excluding IS optimization performance.
  • OOS total return and OOS max drawdown: metrics for that combined OOS path.
  • Profitable windows: the number of windows with an OOS return above zero, out of all windows.
  • Windows: each period’s dates, selected parameters, IS/OOS results, and status. Use these to investigate an unusually strong or weak period.

Understand walk-forward efficiency

Walk-forward efficiency (WFE) is mean OOS daily return / mean IS daily return × 100. Each window’s return is divided by its duration in days before the window values are averaged.

WFE of 50% means mean OOS daily return is half the mean IS daily return; it is not a 50% investment return. WFE is N/A when mean IS daily return is zero or negative. The How to read WFE section describes the displayed bands; none establishes profitability or predicts future performance.

For agent tool names and the preview-before-run workflow, see Agent workflow.

Last updated on