So far, each lesson has filled one box of the plan. The boxes were the question and benchmarks (Lesson 581), the asset list (Lesson 582), timing (Lesson 583), data (Lesson 584), costs (Lesson 585), execution assumptions (Lesson 586) and cash returns (Lesson 587). Then came the trial record (Lesson 588), errors and corrections (Lesson 589), splitting the period (Lesson 590), robustness (Lesson 591), risk measures (Lesson 592), size (Lesson 593) and regimes (Lesson 594). This lesson fills all of those boxes for one rule, from start to finish, and produces one complete test report.
The subject is hypothetical teaching rule v1.0, the 20-period moving-average rule of Lesson 583 applied exactly as written in the pre-registered plan. The data are synthetic data made with a fixed seed: prices for 2,520 periods (about 10 years if read as daily data), with daily returns drawn from a normal distribution with mean 0 and standard deviation 1%. The data were built to have no edge, so the point to check in this lab is whether the report shows that fact properly.
The report has a one-page summary and an appendix. The summary gives the question, data, rule version, costs, split, number of trials, metrics and their errors, robustness and the verdict. The appendix gives the seed, the scripts and the file hashes so that anyone can reproduce the same numbers. The verdict is one of the four in Lesson 306: pass, performance failure, validation failure or not checked.
1. What goes at the top of the first page
At the top of the first page of the report, first write what this report is not. This report is an exercise that tests a hypothetical teaching rule on synthetic data, and even a good result would not be grounds for real trading. Even if the verdict is a pass, it only means that the rule cleared criteria set in advance on these data (in Lesson 306, too, the step after a pass was paper trading).
Test report v1.0 (2026-11-03). Question: out of sample, does the 20-period moving-average rule v1.0 have better risk-adjusted performance than holding the same asset throughout? Data: synthetic data (seed 20261115). This report is not a basis for trading decisions.
2. The pre-registered plan
The plan follows the format of Lesson 581. In a real report, this table would be fixed with a date and a version before any result is computed, and any later change would raise the version.
| Box | Content of plan v1.0 (hypothetical) |
|---|---|
| Rule | If the close is above the 20-period moving average, hold for the next period; otherwise cash (cash return 0) |
| Timing | Decided on the close of period t and applied to the return of period t + 1 (a one-period shift) |
| Costs | One-way 0.1%, multiplied by turnover and subtracted in the period of the trade; also computed at double (0.2%) |
| Split | In-sample periods 1 to 1,680, out-of-sample periods 1,681 to 2,520 (840 periods) |
| Number of trials | 1 (the period of 20 fixed in advance; other values computed only as robustness checks) |
| Benchmarks | Holding throughout, cash, 1,000 runs of random entry with matched holding periods |
| Verdict criteria | Pass if all five criteria below are cleared |
The verdict criteria fill in the verdict box of the Lesson 581 plan (primary metric, threshold, minimum number of trades), and only out-of-sample numbers are used. The primary metric, as written in the question, is one number: the annualized Sharpe ratio after costs (daily returns, 252-day basis, risk-free rate 0). The thresholds come from the three benchmarks of Lesson 581 and the doubled-cost check. First, the primary metric is higher than the Sharpe ratio of holding throughout. Second, the primary metric is above 0 (cash return is set to 0, so this criterion asks whether the rule beats cash). Third, the Sharpe ratio before costs is at or above the 95th percentile of the 1,000 random-entry runs. Fourth, the primary metric stays above 0 at double costs. Fifth, there are 30 or more out-of-sample entries (the same minimum number of trades as the Lesson 306 example; with fewer, the verdict is not checked).
Among the thresholds, the easiest to adjust to fit the result are the places where you set a number directly. In this plan there are only two, the 95th percentile and the 30 entries: 95 is a commonly used convention, and 30 is taken unchanged from the Lesson 306 example. Taking criteria from another document in this way leaves less room to pick numbers after seeing the result. The probabilistic Sharpe ratio, which expresses the error, is written in section 4 as well, but it is not one of the verdict criteria.
3. Results: in-sample and out-of-sample in separate columns
| Metric (synthetic data) | Rule, in-sample | Rule, out-of-sample | Holding throughout, out-of-sample |
|---|---|---|---|
| Annual compound return | −5.7% | −9.4% | −9.0% |
| Annualized Sharpe ratio | −0.45 | −0.87 | −0.52 |
| Maximum drawdown | 39.5% | 29.8% | 32.4% |
| Share of time held | 49.1% | 47.3% | 100% |
| Number of entries | 108 | 59 | Not applicable |

If in-sample and out-of-sample are merged into one column, the difference between the two segments disappears. In this report the rule was below 0 in both segments. Holding throughout also had an annual compound return of −9.0% out of sample, so the same table shows that the asset itself fell in that segment. In sample, holding throughout had an annual compound return of 0.1% and a Sharpe ratio of 0.09.

The rule's maximum drawdown of 29.8% is slightly smaller than the 32.4% of holding throughout. That may be because the share of time held was 47.3%, about half, so this difference alone says nothing about the part played by timing. That part is checked with the random-entry comparison in section 4. Out-of-sample annual turnover was 35.4, so the one-way cost of 0.1% alone takes about 3.5% of the account each year.
4. Benchmarks and errors
For random entry, we kept the lengths of the 59 spells in which the rule held out of sample, placed them at random without overlap, and computed this 1,000 times. The number of trades is the same, so the comparison uses the Sharpe ratio before costs. The rule's Sharpe ratio before costs of −0.54 was at the 31.3rd percentile of the 1,000 random-entry runs; the median of random entry was −0.34 and the 95th percentile was 0.31. These data give no grounds to say that the timing of holding did better than random.
The error is attached with an approximation (Lesson 589). The out-of-sample daily Sharpe ratio is −0.0548, with 840 observations, skewness −0.087 and kurtosis 6.84. The approximation of the standard error computed from these values is 0.0345 daily, or about 0.55 annualized. The annualized −0.87 is about 1.6 standard errors away from 0. The probabilistic Sharpe ratio against a benchmark of 0 is about 0.06. This approximation is a number that rests on the assumptions that returns are independent and that their distribution does not change. The kurtosis is high, at 6.84, because there are many zero returns in the cash spells.
Fill in the number-of-trials box too. This plan fixed the period of 20 in advance, so the number of trials is 1. Write down as well what would have happened if the best of 20 values from 5 to 100 had been picked in sample. The variance of the 20 in-sample daily Sharpe ratios was 0.000170, and by the approximation the expected maximum of 20 trials with no edge is 0.0248 daily, about 0.39 annualized. The best of the 20 was 0.0064 daily (about 0.10 annualized), short of even this benchmark.
5. Robustness and the checks not done
Robustness uses the methods of Lesson 591 and is kept as a record, not used for the verdict.
- Neighboring values: period 15 gives in-sample −0.38 and out-of-sample −0.55; period 25 gives −0.55 and −0.93
- Block bootstrap (the out-of-sample asset returns resampled 1,000 times in blocks of 20): Sharpe ratio 5th, 50th and 95th percentiles of −1.48, −0.59, 0.22; annual compound return median of −6.5%; paths with an annual compound return above 0 of 9.4%; maximum drawdown median of 28.7% and 95th percentile of 43.3%
- Double costs: out-of-sample Sharpe ratio −1.20, annual compound return −12.5%

Checks that were not done are not deleted; they are recorded as not checked. In this report, these are not checked: confirmation on real market data, recomputing with conservative execution assumptions (Lesson 586), using an actual Treasury rate as the cash return (Lesson 587), and results under other interest-rate regimes (Lesson 594). Size was fixed at 100% of the account when held, and no leverage was used (Lesson 593). There are no parameters to reselect, so walk-forward testing (Lesson 590) is recorded as not applicable; the data are synthetic data for a single asset, so the asset list (Lesson 582) and corporate actions (Lesson 584) are also not applicable.
6. The verdict, the conditions that would change it, and the appendix
The verdict is performance failure. The test ran as planned, so it is not a validation failure. There were 59 out-of-sample entries, more than the minimum of 30, so it is not "not checked". Of the five criteria, it cleared only 1 (number of entries). The primary metric of −0.87 is lower than holding throughout at −0.52 and lower than 0, and the rule did not clear the random-entry comparison or the doubled-cost check either. The data were built to have no edge, so this verdict matches what was expected.
Write down in advance, too, the conditions that would change the verdict. If an error in the order of calculation is found, such as a missing one-period shift, the verdict becomes validation failure, and after the fix the same plan is recomputed. If the rule or the criteria are changed and the same out-of-sample segment is run again, that is v2.0 and the second trial (Lesson 306). A new version is evaluated only on data not yet seen.
The appendix lists only what is needed to recompute. The file hashes are the first 16 characters of the sha256 copied from the record saved next to each file.
| Appendix item | Content | First 16 characters of sha256 |
|---|---|---|
| Synthetic prices | Seed 20261115, 2,520 periods, mean 0, standard deviation 1% | 44fd7075dabc30f0 |
| Results table | Every number in sections 3 to 5, pass or fail for each criterion, the verdict | 5bd5b7f95b63d435 |
| Curves table | Equity curves and drawdowns of figures 1 and 2 | a9bd513df43939b9 |
| Price script | Generates the synthetic prices | 04dc76abed5a2208 |
| Calculation script | Rule, benchmarks, bootstrap, approximations, verdict criteria | d926316779b59d08 |
| Shared calculation tool | Functions for metrics and approximations | f6fe43cef0b96d7c |
The record for this lesson is this one complete report. Keep it in one document: the warning and the question on the first page, the plan, and the results table split into in-sample and out-of-sample. Add the benchmarks and errors, robustness and the list of items not checked, the verdict and the conditions that would change it, and the seed and hashes of the appendix.
Try it yourself
- The out-of-sample results of another hypothetical rule are as follows (assumptions). Annualized Sharpe ratio after costs 0.42 (holding throughout 0.20), Sharpe ratio before costs at the 93rd percentile of random entry, Sharpe ratio at double costs 0.18, 34 entries. Give the verdict using the five criteria of section 2.
- After the report in question 1 was issued, you find that the code left out the one-period shift in the first 20 out-of-sample periods. How does the verdict change, and what do you need to do?
- If there were only 24 out-of-sample entries and every other criterion was cleared, what is the verdict?
- Convert an annualized Sharpe ratio of 0.5 into a daily value, use the approximation to find the standard error for an out-of-sample segment of 840 periods, and annualize it (skewness 0, kurtosis 3). By the approximation, about how many periods are needed to say that it exceeds a benchmark of 0 with 95% probability?
Answers
First, 0.42 is higher than the 0.20 of holding throughout and above 0, so it clears the first and second criteria. The 93rd percentile of random entry falls short of the 95th percentile. The 0.18 at double costs is above 0, and 34 entries are 30 or more. It failed one of the five, so the verdict is performance failure. Do not lower 95 to 90 after seeing the result to turn it into a pass. To look at this rule further, write the revised plan as v2.0 and evaluate it on data not yet seen.
Second, the test did not run as planned, so the verdict becomes validation failure. Keep the rule and the criteria as they are, fix only the order of calculation, recompute with the same plan, and record the error and the date of the fix in the report. Whatever the corrected calculation gives is the verdict of this plan.
Third, not checked. It fell short of the minimum of 30 set in advance, so it is not counted as a pass even if the other numbers are good, and the verdict waits until new data accumulate.
Fourth, the daily value is 0.5 ÷ √252 = about 0.0315. The approximation of the standard error is 0.0345 daily, about 0.55 annualized, which is about the same size as 0.5. The approximate number of observations needed is about 2,729 periods, or about 10.8 years if read as daily data. This means a single out-of-sample segment of 840 periods makes it hard to tell a difference of about 0.5 annualized apart from 0.
Data: synthetic data (fixed seed 20261115, daily returns from a normal distribution with mean 0 and standard deviation 1%, 2,520 periods). Random entry and the block bootstrap were also computed with random numbers set from the same seed. Every number was read from the results tables computed from these data, and the approximations were computed with the rounded numbers of the results tables as inputs.
Related lessons
- Lesson 470. Writing an investment policy statement
- Lesson 476. Will rules fitted to the past work in the future?
- Lesson 479. How should you keep an investment journal so that you improve?
- Lesson 306. Reading out-of-sample tests and performance metrics
- Lesson 307. Running an investment journal and weekly review
