Vary a strategy's settings and walk it forward

Every setting of your rule tested at once, the best judged fairly, and its walk-forward on data it never saw.

Trial or ProAbout 4 minutesStudio

A settings grid result: verdict, heatmap and walk-forward table
EMA crosses VWAP on ES 5-minute bars, $a 5 to 15 by 2 against hold 3 to 15 by 3: one green cell among red ones, and each stretch's best setting lost in the next. No edge.

Before you start

  • Run a single strategy test first, so you know the panel. The grid comes with the free trial or Pro.

Steps

  1. 1In the Strategy test panel, choose the bars in on and set Long/Short and cost, then click vary settings….
  2. 2Write the rule with $a (and optionally $b) where a number should vary, such as crosses(ema($a), vwap(ny), up).
  3. 3Set up to two axes: $a, $b or hold, each with values such as 5-15 (every number), 5-15/2 (by twos) or 3, 5, 8 (a list). Up to 12 values each, 144 settings in all.
  4. 4Set folds, the number of stretches for the walk-forward: 5 is a good start, 0 skips it.
  5. 5Press test N settings.

⌥ is Alt on Windows and Linux.

Reading it

The verdict compares the best setting with the best of random placements: every setting's signals moved together to random stretches of the same history, 200 times. The best of 30 settings looks good by luck alone; this is the bar it has to clear. The whole grid counts as one test.

Robust: it beats that bar, its neighbours keep at least half its strength, and it made money walked forward. Fragile: it beats the bar but sits on a spike or lost out of sample. No edge: it doesn't beat the bar.

In the heatmap each cell is a setting's t (average trade over its spread, times the square root of the trades): green made money, red lost, the best is outlined. A broad green area is a real effect; one green cell in a red field is a fit to noise.

The walk-forward picks the best setting on everything before each stretch and trades it, unchanged, on the stretch. Efficiency is the out-of-sample average trade over the in-sample one: near 1 the edge carried forward, near 0 or below it was noise.

What it looks like

The settings grid's rule and axes
The rule with $a where the number should vary, and two axes: $a 5-15/2 and hold 3-15/3.
Try it in Studio Comes with the free trial or Pro.