Does one run's result survive its trades in another order, some of them missing, worse fills and random entries — and on which kind of day did it make its money? Each test with its definition, every draw from one fixed seed.
What it tests
A single run's result is one sample. The same trades could have come in another order. A few of them might not have happened. Every fill could have been a little worse. And a strategy that enters at random might have done as well. Test robustness asks each of these of a run that has ended.
Open the run's Run window and its Validation tab, and press Test robustness. The answer is kept as robustness.json beside the run's own record. Every draw comes from one fixed seed, so the same run always gives the same answer.
The tests read the run's trades with their entries, off its workbench. So they answer for a run of this session whose workbench is still there.
01The tests
Each distribution is answered as its 5th, 50th and 95th percentiles over 1,000 draws.
| Test | What is drawn | What to look for |
|---|---|---|
| Reshuffle | The trades' order, drawn again; the maximum drawdown of each order | The run's own drawdown is one order of many. If the 95th percentile is twice the drawdown you saw, plan for that one |
| Skipping | Each trade left out with a probability of one in ten; the net of what is left | A result that collapses when a tenth of its trades are missing rested on a few of them |
| Fill degradation | Each trade's net lowered by a draw from nothing up to a tenth of the median trade's size (its absolute net); the net | A result that disappears with slightly worse fills was made of the fills. Your own fills measure how much worse they really are |
| Random entry | As many trades as the run, each held as long as one of the run's, entered at a random minute in a random direction on its first market | The percentile: the share of random runs whose sum of price moves is below the run's. Near 50 %, entries at random did as well as the strategy. Near 100 %, its entries mattered |
02By the kind of day
The run's days are cut into thirds by their range over their open: quiet, middle and busy days. Each trade is tagged with its entry day's third. The answer gives the trades, net and wins in each. A strategy that made all its money on busy days is a busy-day strategy: it will be quiet, or lose, in a calm month.
03Its metrics
- The system quality number (SQN), Van Tharp's: √min(N, 100) × the mean trade net over its standard deviation. The cap at 100 trades is his.
- Expectancy: the mean trade net, and its parts — the share of winning trades, the mean win and the mean loss.
- The longest drawdown: the longest time the money stood below a high it had reached, until it stood at that high again, or until the end if it never did.
- The market's trading days a year, measured from the recording, which every yearly figure takes.
04What it is not
A robust run is not a profitable strategy. Robustness tests one result against the ways it could have been luck or an artefact. A strategy that passes every test here can still have no edge on the days to come.
05From a program
run_robustness with the run's address. See the SDK guide on testing honestly.