Introduction to Quant Finance · Lesson 24
Capstone: read a strategy claim
One invented sales page, five claims, and the tools of course A: what each number can show, and what it leaves out.
Know the basics? Read the lesson notesA sales page, written for this lesson
This last lesson of course A teaches nothing new. The page below is invented: it was written for this lesson, and its trading system (also called a strategy), a fixed set of rules for when to buy and sell, belongs to no real product, firm or person. A computer simulated (made up) the system's full trade list: the result of each of its 400 trades, in order. A trade is one buy and the sale that ends it.
An invented sales page
Example System 17
- Wins 7 trades in 10.
- Backtested on 400 trades over two years.
- Made €2,000 on a €10,000 account.
- Lowest point: only €300 below the starting balance.
- Risk four times as much per trade and it would have made €8,000.
A backtest runs a system over past prices to see what it would have made. All five claims are accurate: each matches the trade list. But the page leaves out what each trade costs to make; the lesson assumes a cost and says so.
A guess first. Once a cost is taken off every trade, how did the €10,000 account end the two years?
Claim 1: the win rate
The share of trades that win is the win rate: here 70%. What does this claim leave out, so that it can't yet say whether the system makes money?
The trade list has the sizes: every win made €50 and every loss took €100. So ten typical trades, 7 wins and 3 losses, make 7 × €50 − 3 × €100 = +€50, which is +€5 a trade.
This average result of one trade is the expectancy (lesson A1). It is positive, but thin. One loss takes 2 wins to pay for, so the system must win 2 trades in every 3, or 66.7%, for its average trade to make nothing: its break-even win rate. Its 70% is 3.3 points above that (a point is one percentage point).
Claim 2: the number of trades
Is 3.3 points more than luck? A backtest's trades are a sample: the trades that happened to come up, out of all the system could make. Luck moves a sample's win rate away from the system's true win rate, the one it would settle at over very many trades. Lesson A10 measured how far: for samples of n trades, about 95 in 100 land within 100 ÷ √n points of the true win rate. That range is the band: a rule of thumb when one trade doesn't change the next one's chances, the true win rate is about 30% to 70%, and there are a few dozen trades or more. (√400, the square root of 400, is 20: 20 × 20 = 400.)
Picture a system with the same €50 wins and €100 losses but no edge: its average trade makes nothing, so its true win rate is the break-even 66.7%. Over 400 trades, where does its band reach?
The claim's 70% is inside that band. So this trade list can't tell Example System 17 from a system that makes nothing. In the lesson's simulation, 80 of 1,000 trade lists from such a system won 280 trades or more (280 is 70% of 400).
That is "can't tell", not "no edge": the system was built with a true win rate of 70%, a small edge before costs.
Claim 3: the result
The sum is right: 400 trades × €5 = €2,000. But costs are not in it: the trade list holds each trade's result before costs.
From lesson A16: every trade pays transaction costs, win or lose: a fee, and prices a little worse than the ones shown. What is left after costs is the net result.
Slide the cost of one trade up from €0. Find the cost that leaves nothing of the €2,000, then go on to €7.
The same 400 trades at the cost you set (simulated)
Grey: the account before costs. Orange: after costs. Dashed: its €10,000 start.
At €5 a trade the cost equals the average trade, and nothing is left: 400 × (€5 − €5) = €0.
This lesson assumes a cost of €7 a trade. That makes the average trade €5 − €7 = −€2, and 400 × −€2 = −€800: the account ended at €9,200. So the answer to the opening guess was "down".
Claim 4: the lowest point
Play the 400 trades. Grey is the account before costs, as the invented page counts it; orange, after the €7 cost.
The account over the 400 trades (simulated)
Dashed: the €10,000 start. Circles, at the end: each line's peak and the low after it. First grey circle: the lowest value before costs.
Before costs the claim is accurate: the account's lowest value was €9,700.
But lesson A17 measures a fall from the peak, the highest value so far, and not from the start. Before costs the account climbed to €11,550 and then fell to €10,500. That is €1,050 down, and 1,050 ÷ 11,550 = 9.1% of the peak. A fall from a peak is a drawdown, and the deepest one is the maximum drawdown.
After costs the maximum drawdown ran from €10,217 down to €8,330: 1,887 ÷ 10,217 = 18.5%.
Claim 5: four times the risk
A trade's risk is what it loses when it loses: here €100. At four times the risk every loss takes €400 and every win makes €200, so before costs the €2,000 becomes 4 × €2,000 = €8,000, as the claim says.
Before costs the deepest fall was €1,050. What would it have been at four times the risk?
From lesson A18: risking more makes every result bigger, wins and losses alike. In euros, four times the risk gives four times the fall, which the claim leaves out. As a percent of the peak it grows less, because the peak grows too: the same fall, at four times the risk, is 25.9% of its peak (€4,200 from €16,200), against 9.1%.
Per euro risked nothing changes: +€5 on €100 risked is +€20 on €400, the same 5% of the risk. So for trades like these, which don't change each other's chances and keep the same win rate, win and loss, risking more can't add an edge. Nor can raising the risk after losses (lesson A19), for the same reason. A risk limit, a loss set in advance at which trading stops (lesson A20), caps what can be lost and, by stopping trading, changes which trades happen. It adds no edge to the ones taken.
The tools for the average trade
The tools from claims 1 to 3.
- E
- the expectancy (lesson A1): the average result of one trade, before costs
- p
- the win rate: a share in E and p* (0.7 for 70%), with 1 − p the loss rate; a percent in the band (66.7, not 0.667)
- W, L
- the average win and the average loss, as positive sizes
- p*
- the break-even win rate (lesson A1): the win rate at which E = 0
- c
- the cost of one trade, paid win or lose (lesson A16)
- n
- the number of trades
- band
- the range that holds about 95 sample win rates in 100, for samples of n trades from a system whose true win rate is p (lesson A10)
E = 0.7 × 50 − 0.3 × 100 = +€5. p* = 100 ÷ (50 + 100) = 66.7%. Average net total = 400 × (5 − 7) = −€800. Band for a true win rate of 66.7%: 100 ÷ √400 = 5 points, so 61.7% to 71.7%.
- one trade's result doesn't change the next one's chances, and p, W and L stay the same throughout;
- every trade pays the same cost;
- for the band: p is the true win rate, between about 30% and 70%, with at least a few dozen trades.
A backtest's p, W and L come from one sample: they are estimates, not the true values (lesson B5, Sampling error and confidence intervals).
New numbers. A second invented page says: "Wins 45% of its trades. Average win €120, average loss €80. 500 trades." At a cost of €6 a trade, what is its average net total, in euros?
The tools for the fall and the risk
The tools from claims 4 and 5.
- Vt
- the account's value after trade t; V0 is its starting value
- peakt
- the highest value up to trade t, the starting value included
- DDt
- the drawdown after trade t (lesson A17), as a decimal: 0.20 is 20%
- MDD
- the maximum drawdown (lesson A17)
- A
- the fixed amount risked on every trade (lesson A18)
- Rt
- the result of trade t as a multiple of its risk (lesson A18): −1 for a loss of the whole risk, +0.5 for a win of half of it
Before costs, the largest DD = (11,550 − 10,500) ÷ 11,550 = 9.1%, the MDD. Risk: a win is R = +0.5 and a loss R = −1. With A = €100 a win adds 100 × 0.5 = €50. With A = €400 a loss takes 400 × 1 = €400, so the deepest fall is four times as big in euros (€4,200) but 25.9% of its higher peak.
- no money is added or taken out, and every trade's value is counted;
- for the fixed amount: a loss is never bigger than the risk set for it.
Values far apart, such as year-ends, miss a deeper fall in between.
New numbers. A third invented page gives its starting balance and then five year-end values: €20,000, €25,000, €21,000, €24,000, €19,000, €23,000. It says: "Lowest point: only 5% below the starting balance." What is the maximum drawdown of the six values, in percent?
What course A can't check
Every check so far took the trade list as given. Three things can make a trade list look better than its system is, and none of them shows in the list's own numbers. Course B, Backtesting Essentials, teaches each one, and course E, Testing Popular Ideas, uses them on well-known trading ideas. Turn them over.
- How many versions were tried.
If many versions of a system are backtested and only the best is shown, part of its result is luck. Lesson B7, The best of many.
- Whether the backtest saw the future.
A backtest can by mistake use something not yet known when a trade was made, such as a day's last price before the day is over. That is look-ahead bias. Lesson B2, Look-ahead bias.
- Whether any data was held out.
A system adjusted until it fits past prices has only shown that it fits them. A fair check uses held-out data: prices kept aside and never used for the adjusting. Lesson B9, In-sample, out-of-sample and walk-forward.
"Wins 60% of its trades"
With wins and losses of the same size, the break-even win rate is 50%. Could a system with no edge, truly at 50%, show 60% over 64 trades? (√64 = 8.)
"Risk €200 a trade and it makes €12,000"
With the same trades at €200 a trade, what would the deepest fall have been, in euros?
Hint: how many times €50 is €200? Risking more makes every result bigger, wins and losses alike.
"Losses are capped"
What can that limit do?
Lesson done
A claim can be accurate and still leave out the number that decides it. A win rate needs the sizes of the wins and losses. A result needs its trade count, its costs and its fall from the peak. A bigger risk multiplies the losses too. On the invented page, five accurate claims came with an average trade of −€2 after an assumed cost.
Key ideas
- Trade list
- the result of every trade a system made, in order
- Look-ahead bias
- a backtest using something not yet known when a trade was made (lesson B2)
- Held-out data
- prices kept aside while a system is adjusted, to check it on prices it never used (lesson B9)
Formulas
expectancy: E = p × W − (1 − p) × L · break-even win rate: p* = L ÷ (W + L)
average net total = n × (E − c) · band ≈ p ± 100 ÷ √n points
maximum drawdown: MDD = the largest (peakt − Vt) ÷ peakt · fixed amount: Vt = Vt−1 + A × Rt
Conditions: trades that don't change each other's chances, with the same win rate, sizes and cost throughout; for the band, p the true win rate (about 30% to 70%) and a few dozen trades or more; no money added or taken out; a loss never bigger than its risk.