GUIDE

Does your setting hold up?

Testing a strategy · 5 min read

A backtest gives you one number for one set of settings. A parameter search keeps the strategy exactly as it is and runs every combination of up to three of its settings — an EMA period, an RSI level, a stop distance — as its own backtest over the same history. The result is a map, and the map answers a question a single backtest cannot.

The question it answers

Suppose a backtest with a 50-period EMA looks good. Would it have looked good with 45? With 55? If the answer is yes, the result holds across a neighbourhood of settings and is less likely to be fitted to one particular stretch of history. If the answer is no — if 50 is the only number that works — then you found a coincidence, not a strategy. A parameter search shows you which.

Step by step

  1. Start from a strategy, or from a result. From a strategy you choose the market, the exit and the costs as you would for a backtest. From a finished backtest or Refine result, Check these settings carries all of that over unchanged and centres the grid on the settings that run used.
  2. Tick the settings to vary. Up to three. Each one you tick starts centred on its current value — nine values when it is the only one, five once there are others — and you can edit the range. Up to nine values per setting, and up to 343 combinations in one search.
  3. Check the price and run. Every combination is a backtest, and the total is shown in testing credits before you start, updating as you change the ranges.

Reading the map

Two settings make a grid, each cell coloured by the measure you choose — return, profit factor, expectancy, max drawdown, win rate, and so on. A third setting adds a slider that steps through the grid one layer at a time. Cells with too few trades to mean anything are hatched out.

The headline is the best cell with its neighbours, not the best cell. The best single cell in any grid is biased upward: it is the maximum of many noisy measurements, and something always comes top by luck. A cell whose neighbours — one step either way on each setting — measured much like it is a plateau, and that is the result worth taking seriously. The best single cell is marked beside it so you can see how far apart the two are.

A spike is the opposite: one bright cell surrounded by dull ones. It is the look of a setting that was tuned to this history. If your own settings sit on a spike, the backtest that led you here was flattering you.

Tap any cell for its numbers. From there a cell can be opened as a full backtest, or — if it moved a condition's setting rather than only the exit — saved as a strategy of its own.

How it differs from Refine

Refine changes the strategy itself: it breeds variations, swaps conditions and checks the survivors on history they were not chosen on. A parameter search changes nothing but the numbers you pick, and measures every cell rather than a sample. Use it to see whether the settings you already have sit somewhere stable; use Refine when you want new versions of the idea to test.

What it does not do

It does not pick the setting for you. A plateau is a description of how the measure behaved across this history, not a promise that it behaves the same next year, and a map of 343 backtests is 343 descriptions of the past. It also cannot see a spike narrower than a step: the grid moves a setting in fixed increments, so what happens between two values is not measured.

Next