Walk-Forward

Tune a strategy's settings on one stretch of history, test that choice on the months after, and repeat, so every result comes from data the settings never saw.

How-toBy AlgoLiftUpdated 2 min read
On this page 4Before you startPlan and run a walk-forwardRead itIf it doesn't work

A walk-forward does what a trader does: choose settings from the history you have, trade them on the months that come next, then choose again. It cuts the backtest into windows; in each, a search picks the best settings on the first stretch, and that pick then trades the following months untouched. Every result it reports comes from months the chosen settings never saw.

It is the strongest evidence Optimize can give, but it is not the final test: its windows still use months you built and tuned the strategy on. The project's holdout, tested once in Forward Test, is.

Before you start

  • A project with a base run on Build, with enough months and trades for several windows. The Optimize stage says when a walk-forward fits, and what it would need when it doesn't.
  • Credits: each window's search runs every combination on its fitting months, and each window's pick runs once on its test months.

Plan and run a walk-forward

  1. 1

    Open the plan

    On the project's Optimize stage, press Plan a walk-forward, or the Plan button with Walk-forward chosen.

    You should see the Walk-forward plan opens in place of the canvas, drafted by the copilot from your run.
  2. 2

    Choose what to vary

    Under What to vary, keep the rows few and their ranges tight: each window tries every combination on its fitting months, and those months hold fewer trades than the whole run.

  3. 3

    Choose how each window picks

    Under Each window keeps, Plateau takes the middle of a strong region and is recommended when a setting tries three or more values; Best takes the top score.

  4. 4

    Set the windows

    Under Windows and budget, choose Rolling or Anchored and the months to fit and to test, such as 12 / 3. The calendar shows every window. Aim for at least four test windows: with fewer, one window decides the verdict.

  5. 5

    Check the budget and the price

    For a walk-forward, the budget is judged on the thinnest window's fitting trades.

  6. 6

    Run it

    Press Run walk-forward, name it, and confirm the price.

    You should see its row appears under Searches, with each window's progress.

Read it

The results open on the Walk Forward tab, and the other tabs show the stitched record: every window's test months joined, as you would have traded them. Reading Walk-Forward Results goes through the verdict, the windows and the rest.

Then decide:

  • It held. Promote the walk-forward's pick: the last window's settings run once over your base window and become the project's champion.
  • It didn't. When the test months lose money, or most windows do, change the strategy in Build: different windows won't fix an edge that isn't there.
  • Adjust it. Adjust and relaunch opens the walk as it ran, to plan its next version.

If it doesn't work

  • The stage doesn't recommend a walk-forward. The run has too few months or trades for enough windows. The Walk-forward door says how many more months it needs.
  • "No window fits this run with these lengths." Shorten the months to fit and to test, or run a longer backtest.
  • Some windows failed. The results cover the windows that finished and say which failed. Those aren't a fair sample: re-run before trusting it.