Introduction to Quant Finance · Lesson 1
Expectancy
Why win rate isn't the point: a strategy can win 9 trades in 10 and still go broke.
Know the basics? Read the lesson notesA strategy that wins 9 trades in 10
A trading strategy is a rule that decides when to trade. This one wins most of its trades: each trade has a 9 in 10 chance to win. The share of trades that win is called the win rate, so this strategy's is 90%. Call it strategy A.
We count money in R: one R is a fixed amount, the same on every trade, like €10. All the trades here are simulated: made by a computer, not real. Each win makes 1R. Each loss costs 10R, because the rule lets a losing trade run a long way before it gives up. The account starts at 100R. Take ten trades.
Strategy A, one simulated account
Account in R. A win adds 1R, a loss takes 10R.
Trades 0 · wins 0 · account 100R
Ten trades, nine wins: a 90% win rate, and the account is at 99R, below the 100R it started with. One loss took back more than all nine wins.
Which one makes money?
Here is a second strategy, B. It wins less often than it loses, but its wins are twice the size of its losses. Picture each one taking 1,000 trades. Which one ends up above its 100R start at the end?
The two strategies
10,000 accounts of strategy A
One account can be lucky or unlucky, so give strategy A to 10,000 simulated accounts. Each starts at 100R and takes 1,000 trades. An account that falls to 0R is ruined: it has nothing left, so it stops trading. Press play.
Strategy A: 10,000 simulated accounts, 1,000 trades each
200 of the accounts are drawn. The numbers below count all 10,000.
The win rate ended at 90.0%. Yet after 1,000 trades 85.0% of the accounts are below their start (the ruined ones included), and 65.8%, about 2 in 3, hit zero. The other 19.2% are down but still trading.
On the next screen, the reason.
The reason fits in one line
Take ten typical trades of strategy A: nine wins and one loss, like the ten you took at the start. Add them up. What do the ten trades make together?
−1R over ten trades is −0.1R a trade. The average result per trade is called expectancy. Written for any strategy, it is one line. The loss rate is the share of trades that lose, 100% minus the win rate, and the average win and average loss are the sizes of the wins and of the losses:
Expectancy = win rate × average win − loss rate × average loss
Strategy A: 0.9 × 1R − 0.1 × 10R = 0.9R − 1R = −0.1R a trade
(Average win: the size of a typical winning trade. Average loss: the size of a typical losing one.)
Over 1,000 trades, −0.1R a trade adds up to −0.1R × 1,000 = −100R: about the whole 100R start. Luck spreads accounts around that: a few end well up, but most hit 0R before trade 1,000 and stop there. A 90% win rate can't fix it, because the 10% that lose cost more than the 90% that win.
Now strategy B
Strategy B wins 40% of its trades, so it loses 60%. Its wins pay 2R and its losses cost 1R. Use the same line: what is its expectancy?
10,000 accounts of strategy B
The same test: 10,000 simulated accounts, 100R each, 1,000 trades. Strategy A's accounts stay in the background in light grey. The dashed line is where +0.2R a trade leads on average: 100R + 200R = 300R after 1,000 trades.
Strategy B: 10,000 simulated accounts, 1,000 trades each
200 of the accounts are drawn. The numbers below count all 10,000.
B won only 40.0% of its trades, and none of its 10,000 accounts ended below the start. On average they ended at 299.9R, next to the 300R the dashed line points to.
Build your own
Set a win rate with the first slider. The second slider sets the size of a win and the size of a loss together. The dashed line is the expectancy: where the account heads on average, trade after trade. The solid line is one simulated account taking 250 trades with those settings. Find a setting that wins less than half the time and still makes money on average.
Your strategy, 250 trades
Account in R, starting at 100R. Dashed: the average path. Solid: one simulated account.
Found one. Now press Run again a few times: the same settings, different luck. The account wanders around the dashed line, but the line itself moves only when you change the settings.
What would A need?
Strategy A's wins pay 1R and its losses cost 10R, so each loss wipes out ten wins. What win rate would A need just to break even? Break-even means the average trade makes nothing: an expectancy of zero.
The chart below puts every strategy on one map. Across is the win rate. Up is how big a win is compared with a loss: at the bottom, 1 : 10 (wins of 1R, losses of 10R, like A); in the middle, 1 : 1; at the top, 10 : 1. The line marks the win rate where the average trade breaks even. It curves because the bigger the wins are compared with the losses, the fewer wins are needed: 90.9% at 1 : 10 (like A), 33.3% at 2 : 1 (like B).
Where the average trade breaks even
Across: the win rate. Up: the size of a win against the size of a loss. On the line, expectancy is zero.
B's 40% clears its line at 33.3%. A's 90% misses its line at 90.9%. A high win rate is only good enough when it clears the line for its own sizes.
Expectancy, and why it decides the long run
Here is the one line from earlier in the symbols most books use. The average result per trade is the expectancy, also called the expected value, E. Over n trades, the total is about n × E.
Why does an average decide the long run, when every single trade is luck? The law of large numbers: as trades add up, the average result per trade settles toward E. So over enough trades, whether E is below zero or above it decides where most accounts end: below zero, most end down; above zero, most end up.
Set E = 0: p × W = (1 − p) × L = L − p × L, so p × (W + L) = L, which gives the break-even win rate p* = L ÷ (W + L).
- p
- the win rate, as a share (0.9 for 90%); 1 − p is the loss rate
- W
- the average win, in R
- L
- the average loss, in R, as a positive size (10, not −10)
- E
- the expectancy: the average result per trade, in R
- n
- the number of trades
- p*
- the break-even win rate: the p at which E = 0
Strategy B: E = 0.4 × 2R − 0.6 × 1R = +0.2R. Over n = 1,000 trades, n × E = +200R. Its 10,000 accounts gained 299.9R − 100R = 199.9R on average.
The settling: in 9 of B's accounts in 10 (all but the luckiest and unluckiest 1 in 20), the average per trade was between −0.40R and +1.10R after 10 trades, and between +0.12R and +0.28R after 1,000, close to +0.2R.
Break-even for A: p* = 10 ÷ (1 + 10) = 0.909, or 90.9%. For B: p* = 1 ÷ (2 + 1) = 0.333, or 33.3%.
- trades are independent: one result doesn't change the next one's chances;
- p, W and L stay the same through the whole run;
- the account lasts: one that hits 0R stops trading, so its long run never comes.
The account hits 0R first (lesson A19, Ruin). Costs come off every trade and lower E (Costs (lesson A16)). p, W and L measured from only a few trades are estimates, not the true values (Sample size (lesson A10)).
About how much does it make over the 400 trades, on average, in R?
Hint: first E = p × W − (1 − p) × L, with p = 0.25. Then multiply by n = 400.
What this means when you test a rule
Running a trading rule over past prices to see what it would have done, trade by trade, is called a backtest. Its report usually lists the number of trades, the win rate, the average win and the average loss. Three habits follow. Turn them over one at a time.
- Never judge by the win rate alone.
Put the win rate, the average win and the average loss into the expectancy line. Here a 90% win rate lost on average and a 40% one made money.
- Multiply by the number of trades.
Expectancy times the number of trades, n × E, is what the whole test makes on average: a small expectancy over many trades is a big total.
- Look hard at a high win rate with big losses.
A rule like A is decided by its rare, big losses, and a short backtest can miss them. A's wins are small (1R) and its losses big (10R), so a short run of wins says little. Ask whether the backtest has enough trades to include the losses.
One last check
Two backtests both win 60% of their trades. Can one make money on average while the other loses?
The 85% signal service
Do its own numbers say the average trade makes money?
Your own backtest
What is its expectancy per trade, in R?
Hint: win rate × average win, minus loss rate × average loss. The loss rate is 100% − 45% = 55%, which is 0.55.
Thirty out of thirty
What do 30 wins out of 30 tell you about the rule's expectancy?
Lesson done
Win rate tells you how often a strategy wins. Expectancy tells you what the average trade pays. Here a 90% win rate with big losses lost money on average, and a 40% win rate with bigger wins made it.
Key ideas
- R
- a fixed amount of money, the same on every trade; results are counted in it
- Win rate / loss rate
- the share of trades that win / lose; together they make 100%
- Average win / average loss
- the size of a typical winning / losing trade
- Expectancy (expected value)
- the average result per trade
- Break-even win rate
- the win rate at which the average trade makes nothing: an expectancy of zero
- Law of large numbers
- as trades add up, the average result per trade settles toward the expectancy
- Ruined
- an account that falls to 0R: it stops trading
- Backtest
- a trading rule run over past prices to see what it would have done, trade by trade
E = p × W − (1 − p) × L
total ≈ n × E
p* = L ÷ (W + L)