Backtest Strategies checkpoint — the claim, with its assumptions attached
Course capstone. Four units ago a backtest was a curve that went up. It is now one sentence — under these assumptions, on this data, a rule stated in advance would have produced this — with every word in it something you built, tested and reported.
The course in one architecture
- The sandbox comes before the strategy —
/eodreturns a bare array of bars, returns are ratios onadjusted_close(on raw close, Apple's 2020 split is a −74.2% day that never happened), and the buy-and-hold baseline with costs on is drawn before any rule exists (Unit 1). - A rule is a sentence that cannot see the future — one unambiguous line before any code; every constant lifted into a params object the report prints; signals on bar i, positions on bar i+1; both curves starting on the same bar with the same costs (Unit 2).
- Honesty is a set of tests you wrote — 10 basis points a trade as a stated choice, next open as the execution price, three leak tests and a shuffle test, and a universe that includes the 32,854 delisted names against the 18,012 living (Unit 3).
- Robustness is what survives out of sample — drawdown against the running peak (SPY 2007–2009: −55.2% and 1,224 trading days to recover), tune in-sample and run out-of-sample once, know where your history wall is, and publish the number of parameter sets you tried (Unit 4).
The sentence, decoded
"The strategy returned 18% a year with a Sharpe of 1.4 in the backtest." Run it through the instruments. 18% a year — net of what cost, at what execution price, against which baseline starting on the same bar? Sharpe of 1.4 — in-sample or out-of-sample, on data that reaches back to 2008 or stops at the history wall? In the backtest — after how many parameter sets, with which leak tests passing, on a universe that includes the companies that died? The sentence is not wrong. It is unfinished, and this course is the rest of it.
Where this connects
The statistics course in the Market Data domain is the mathematics under every number in your report — the standard error that decides whether an 18% mean over five years is distinguishable from zero at all — at 30% annual volatility it is not, at 15% it is — the fat tails that make a normal Sharpe optimistic. The factor course is what happens when a rule is published and followed by everyone. And the next course in this track ships the tool: a dashboard around the report you now know how to write.
Checkpoint
The exam ahead draws on all four units. The bar: a backtest report in front of you, and the ability to say which line is missing before saying whether the result is good.
Before you sit it
Each of these is a minute at your desk. Any one that is not names the lesson to reopen first.
- Write a rule in one English sentence that uses only what existed at the bar — State a rule that cannot see the future
- Name the three leak tests and say what the shuffle test does and does not detect — Find the leaking bar
- Say what 10 basis points a trade bundles and what fifty round trips a year costs — Transaction costs, and why the default is on
- Say why an out-of-sample result that matches in-sample is a leak until proven otherwise — In-sample, out-of-sample, and the honest way to tune
Try it now
- Write the one-sentence version of each unit from memory — four sentences, your pocket card. Do this before opening anything.
- Then take the report your backtester generates and read it against the checklist: claim, parameters, data, assumptions, results, robustness, tests, limitations, and the number of parameter sets tried. Any section missing is a section the exam will ask about.
- Finally, one measurement to close the course — the drawdown every strategy on US equities is measured against:
Measure 9 October 2007 to 9 March 2009, then to the day the line first exceeded the 2007 peak. Compare with the −55.2% and 1,224 trading days from unit 4; if your reading disagrees, the drawdown lesson says which convention you used.