"This rule earned 12% a year for five years." This sentence has no question in it. If you do not know what simply holding the asset would have earned over the same period, what cash paid, and whether a rule with no edge often earns about 12% too, the 12% tells you nothing.
In Lesson 305 you wrote a rule as a specification that gives the same list of trades whoever computes it, and in Lesson 306 you split the period into three segments and gave the result one of four verdicts. This lesson covers the step before that. You turn an idea into a question that can be tested, decide what to compare it with, and fix both in a plan before you see any result. Every number in this lesson is a hypothetical example for explanation.
1. Turning an idea into a question
A testable question fills four boxes: what (the rule and its version), compared with what (the benchmarks), where (the asset and the period), and by which measure (the metric and the decision threshold). If even one box is empty, any result leaves room for a different reading.
| Box | The idea as stated | A testable question (hypothetical) |
|---|---|---|
| What | Holding only above the moving average avoids declines | Hypothetical teaching rule v1.0: if the close is above the 20-period moving average, hold for the next period; otherwise cash |
| Compared with what | None | Holding the same asset throughout, cash, random entry with matched holding periods |
| Where | None | Daily data for one asset chosen in advance, with a fixed start date and end date |
| By which measure | Avoids declines | Is the maximum drawdown smaller than for holding throughout, and how much annual compound return does it give up in exchange |
As a question, "avoids declines" becomes two numbers: the difference in maximum drawdown and the difference in annual compound return. Looking at only one of them can lead to the opposite conclusion, so the question also states which one is the primary metric.
2. The null comparison: is this result common even without an edge
The hypothesis is "this rule has something in it." Testing starts from the other side. First you ask how often a result as good as the one you saw appears in a world where the rule has no edge at all. This is called the null comparison.
Assumptions: the rule's annualized Sharpe ratio was 0.6. On the same data, 1,000 comparison rules with no edge were built, and 230 of them reached 0.6 or more. Then this result is at a level that appears with a probability of 230 ÷ 1,000 × 100 = 23%, even with no edge. A result that appears about once in four tries is weak grounds for saying the rule has something in it.
In Lesson 583 you will compute directly that even on synthetic prices built to have no edge, the same rule's results scatter widely from path to path. So before you look at any single number, the plan states how you will compute where that number sits in the distribution of the null comparison.
3. Three benchmarks
Benchmarks are chosen before you see the results. This testing framework uses three benchmarks by default.
| Benchmark | What it asks | Points to watch |
|---|---|---|
| Holding the same asset throughout | Is the rule better than simply holding | Compare total returns that include dividends (Lesson 584) |
| Cash | Is the rule better than doing nothing | Interest in cash periods, the same risk-free rate (Lesson 587) |
| Random entry with matched holding periods | Did the timing of holding create the result | Same share of time held and same lengths of holding spells as the rule |
The third is the one most often left out. A rule that holds for only half the period tends to swing less and to have smaller drawdowns than holding throughout. That may be because it held less, not because it chose good times. Only a benchmark that holds for the same amount of time, with the timing chosen at random, shows the part of the result that comes from timing.
Here is how to match the holding periods. Assumptions: out of 1,260 periods, the rule held for 580 periods, in 29 holding spells. The share of time held is 580 ÷ 1,260 × 100 = about 46.0%, and the average length of one spell is 580 ÷ 29 = 20 periods. The random-entry benchmark keeps the lengths of these 29 spells, places only their start points at random without overlap, and is computed many times.
The trap at this step is changing the benchmark after seeing the result. One example is comparing only with cash once the result turns out worse than holding throughout. Another is judging only by the fact that the rule made money. Write the benchmarks in the plan and report the results of all three together.
4. Metrics and sample size
The definitions of the metrics were covered in Lesson 660 and Lessons 465 and 478. The plan does not repeat the definitions; it records the choices that can differ from one calculation to another.
| Metric | What the plan records |
|---|---|
| Annual compound return | That it is a compound annual rate, not an arithmetic mean, and how the number of years is counted |
| Volatility | Return frequency (daily, monthly) and how it is annualized |
| Maximum drawdown | Written as a positive %, and whether it uses daily closes |
| Sharpe ratio | Frequency, whether annualized, and the risk-free rate |
| Number of trades | The minimum number of trades needed for a verdict |
Choose only one primary metric, and write the decision threshold in that metric. If you compute several metrics and then make the one that came out well the primary metric, that too is a choice made after seeing the result.
Consider the sample size in advance as well. By the approximation in Lo's 2002 paper "The Statistics of Sharpe Ratios," an annualized Sharpe ratio of 0.5 estimated from 1,260 daily returns (five years) has a standard error of about 0.45. This means the Sharpe ratio of the same rule could swing by about that much if you tested it on a different five years, and 0.5 is a number that is hard to tell apart from 0. This approximation assumes that returns are independent of each other and close to normally distributed; Lesson 589 covers the detailed calculation and its corrections.
5. The pre-registered plan: what to fix before seeing results
A pre-registered plan is a document you write before seeing any results, with a date and a version number. The Lesson 305 specification goes straight into the rule box of this plan, and the three segments and verdict criteria of Lesson 306 go into the segment and verdict boxes.
| Box | What to write (hypothetical example) | Where this course covers it |
|---|---|---|
| Question | The four boxes of section 1 | This lesson |
| Rule | The six boxes of the specification and the version | Lesson 305 |
| Data | Source, download date, type of price | Lesson 584 |
| Asset list | The list on each date, how delistings are handled | Lesson 582 |
| Timing | Decision, availability and execution times | Lesson 583 |
| Costs | Parts of the one-way cost, the doubled-cost check | Lesson 585 |
| Segments and trials | How the period is split, the record of trials | Lesson 588, Lesson 590 |
| Verdict | Primary metric, threshold, minimum number of trades | Lesson 306 |
If you revise the plan, write down the reason and the date and raise the version number. If you changed the benchmark, the period or the threshold after seeing the result, that result is a new trial, and a re-evaluation on the same data is not called the original test. Lesson 306 and Lesson 588 cover how to count trials.
The record for this lesson is one pre-registered plan with a date and a version number. Fill in the four boxes of the question, the three benchmarks, and the primary metric and decision threshold before you see any result.
Try it yourself
- Turn the idea "returns are better in the month after a low-volatility month" into the four-box question of section 1.
- Assumptions: out of 1,260 periods, the rule held for 504 periods, in 18 holding spells. Find the share of time held and the average length of a holding spell, and describe how you would build the random-entry benchmark.
- Assumptions: the random-entry comparison was computed 1,000 times, and 87 of them reached the rule's annual compound return or more. Find this share, and explain how to read it compared with the 23% of section 2.
- A backtest report kept only the comparison "it beat cash" after its annual compound return came out lower than holding throughout. Which box of the plan was empty, and how should the verdict be written?
Answers
First, here is one example. What: hypothetical teaching rule v1.0, which holds for the next month if the standard deviation of the previous month's daily returns is below a threshold set in advance. Compared with what: holding the same asset throughout, cash, and random entry with the same number of months held. Where: daily data for one chosen asset, with a start date and an end date. By which measure: the primary metric is the difference between the average monthly return in months held and in months not held, with the threshold and the minimum number of months written down.
Second, the share of time held is 504 ÷ 1,260 × 100 = 40%, and the average spell length is 504 ÷ 18 = 28 periods. Keep the lengths of the 18 spells, place only their start points at random without overlap, and compute many times on the same data.
Third, 87 ÷ 1,000 × 100 = 8.7%. This result appears close to 9 times in 100 even for a benchmark with no edge. It is rarer than 23%, but that alone is too early to say it is not chance. Record how many comparisons you ran (the number of trials) and when you set the threshold.
Fourth, the benchmark box was empty, or it was changed after the result was seen. If the plan listed three benchmarks, report all three results, and if the rule fell short of a benchmark set in advance, record that as it is. A report that picked its benchmark after seeing the result, without a plan, is a test with a method problem, so under the Lesson 306 verdicts it is recorded as a validation failure, neither a pass nor a performance failure.
Related lessons
- Lesson 445. How to read asset-allocation backtests, and their traps
- Lesson 470. Writing an investment policy statement
- Lesson 474. Why a backtest with great-looking results can be dangerous
- Lesson 476. Will rules fitted to the past work in the future?
- Lesson 478. Which measures matter more than the win rate?
- Lesson 267. Judging decision quality separately from outcomes
- Lesson 305. Testable trading rules and data checks
- Lesson 306. Reading out-of-sample tests and performance metrics

