Introduction to Quant Finance · Lesson 18
Position sizing
How much on each trade? The same rule with the same trades gives very different accounts, depending on how much each trade risks.
Know the basics? Read the lesson notesThe rule doesn't say how much
A trading rule says when to buy and when to sell. How much each trade buys is a separate choice, called position sizing.
From lesson A7: a stop is the price, set before a trade is opened, at which the trade is sold if it goes wrong. The money lost at the stop is the trade's risk. A result counted in units of that risk is in R: a trade sold at its stop is −1R.
Here is a made-up rule. Each trade ends at −1R or at +1R (a gain as big as its risk), and it wins 55 trades in 100. That is an edge: an advantage that makes money on average. A simulated account starts with €10,000 and risks €100 on every trade. Play its 250 trades.
One account, €100 at risk on every trade (simulated)
Dashed: its €10,000 start.
The account won 137 trades and lost 113: 24 more wins than losses, so +24R. At €100 a trade that is 24 × €100 = €2,400, and the account ended at €12,400.
Its deepest fall from a high was a stretch with 11 more losses than wins: 11 × €100 = €1,100, from €11,300 to €10,200.
The same trades at €200
A second account takes the same 250 trades, but risks €200 on every trade.
The first account ended €2,400 up, and its deepest fall was €1,100. What about the second?
A fixed amount, or a fixed fraction
The risk per trade multiplies every result, wins and losses alike. So far it was the same number of euros on every trade: a fixed amount.
A second way is to risk the same share of the account every time: a fixed fraction. At 10%, an account that holds €10,000 risks €1,000 on its next trade. Once it holds €9,000, it risks €900.
Two made-up accounts start with €10,000. The first risks a fixed €1,000 on every trade, the second a fixed 10% of what it holds. Both lose ten trades in a row, each at −1R. Where do they end?
Ten losses in a row
Press the button ten times: ten losses for both accounts.
Two made-up accounts, ten losses in a row
Across: losses in a row. Dark: €1,000 at risk on every trade. Orange: 10% of the account.
The fixed amount lost €1,000 every time, and ten losses took all €10,000.
The fixed fraction lost 10% of what was left each time: €1,000, then €900, then €810, down to €387. It ended at €3,487. Each loss makes the next trade smaller, so by this arithmetic the account never reaches €0.
It is still a large fall: €3,487 is 65% below the start, and getting back takes 6,513 ÷ 3,487 = +187%, because a gain is measured on what is left (lesson A14).
After gains the fixed fraction risks more, not less. Most of the rest of this lesson uses a fixed fraction.
Twice the risk, twice the swing
Back to the 250 trades, now with a fixed fraction: before each trade the account risks the same percent of what it holds. A win adds that percent and a loss takes it.
From lesson A17: an account's drawdown is how far it is below its highest value so far, as a percent of that high. The deepest one is its maximum drawdown.
Slide the risk from 1% to 2%, then to 4%.
The same 250 trades at the risk you set (simulated)
Top: the account (grey: at 1% risk); circles mark its deepest fall. Bottom: its drawdown after each trade.
At 1% risk the account ended at €12,555, with a maximum drawdown of 10.5%. At 2%: €15,373 and 20.1%. At 4%: €21,390 and 36.8%.
At 2% every trade moves the account twice as far, in percent, as at 1%, wins and losses alike. So its volatility, the typical size of its moves (lesson A8), doubles.
Here the maximum drawdown grew a little less than in step with the risk, because each loss takes its percent from an account that earlier losses already made smaller. In a longer, choppier fall it can grow more than in step, because a win and a loss of the same percent don't cancel.
The climb back grew faster than the risk. After a 10.5% fall, 89.5% is left, so getting back takes 10.5 ÷ 89.5 = +12%. After 36.8%, 63.2% is left: 36.8 ÷ 63.2 = +58%.
1,000 accounts, three sizes
One list of trades is one run of luck. So the simulation drew 1,000 lists at random from the same rule, which wins 55 trades in 100, and ran an account of €10,000 on each at 1%, 2% and 4% risk. Rank the 1,000 accounts by where they ended: the middle one is the list you played.
Each square is one account. Grey: it never fell 20% below its high. Orange: at some point it was 20% or more below. Dark: 50% or more. Switch between the three sizes.
1,000 accounts on the same rule (simulated)
Sorted, deepest drawdown first.
At 1% risk, 36 of the 1,000 accounts met a drawdown of 20% or more, and none met one of 50%. At 4%, 988 met one of 20% or more, and 163 were at some point down by half.
The middle account ended above its €10,000 start at each size, because this rule was built with an edge. The 100th lowest, a tenth of the way up from the bottom, ended at €10,279 at 1% risk but at €9,607 at 4%, below its start.
From a risk to a number of shares
An order to buy needs a number of shares (small pieces of a company), not a risk in euros. The stop turns one into the other.
An account of €10,000 risks 1% on its next trade: €100. It buys at €50 a share. With the stop at €48, each share loses €2 if the trade is sold there, so €100 of risk pays for 100 ÷ 2 = 50 shares.
Move the stop until the trade buys exactly 25 shares.
One trade, €100 at risk (made-up prices)
Across: shares. Up: the price. The shaded box is the risk, shares × the fall to the stop: always €100.
With the stop at €46, each share loses €4, so the trade buys 100 ÷ 4 = 25 shares. They cost 25 × €50 = €1,250: the trade's position size.
With the stop at €49.50 the same €100 of risk buys 200 shares for €10,000, the whole account.
So position size and risk are different numbers: what the shares cost, and what the trade loses at its stop. A closer stop means more shares for the same risk.
Fixed amount and fixed fraction
Risking the same share of the account on every trade is called fixed-fractional position sizing. With a fixed amount, results add up. With a fixed fraction each result is measured on what the account holds then, so results multiply: compounding (lesson A14).
- Vt
- the account after trade t, with no money added or taken out; V0 is its starting value
- Vt−1
- the account before trade t
- Rt
- the result of trade t in R: −1 for a trade sold at its stop, +2 for one that made twice its risk
- A
- the fixed amount: the money risked on every trade
- f
- the fixed fraction: the share of the account risked on every trade, as a decimal: 2% is 0.02
The 250 trades began −1R, −1R, +1R. At a fixed 2%, f = 0.02: V1 = 10,000 × (1 − 0.02) = 9,800. V2 = 9,800 × 0.98 = 9,604. V3 = 9,604 × 1.02 = €9,796.08. At a fixed €200: 10,000 − 200 − 200 + 200 = €9,800.
- each trade's risk is set before the trade: the fixed fraction of what the account holds then, or the fixed amount, which the account must still hold;
- a losing trade loses its risk and no more: it really is sold at its stop;
- trades come one at a time.
A price jumps past the stop: a loss bigger than 1R (lesson A13, Orders: market, limit and stop). Trading costs add to every loss (lesson A16, Costs).
New numbers. An account of €8,000 risks a fixed 5% on every trade. Its next three trades end at −1R, −1R and +2R. What does it hold after them, in euros?
From risk to shares
Working out the number of shares from the share of the account at risk is often called percent-risk position sizing. For a buy with its stop below the buy price:
- N
- the number of shares to buy, rounded down to a whole number so the trade never risks more than f × V
- V
- the account before the trade
- f
- the share of the account to risk on the trade, as a decimal: 1% is 0.01
- f × V
- the trade's risk in money
- Pbuy
- the price paid for one share
- Pstop
- the stop, below the buy price: the price at which the trade is sold if it goes wrong
- Pbuy − Pstop
- what one share loses if the trade is sold at its stop, with no gap and no cost
V = 10,000 and f = 0.01, so f × V = €100. Buy at €50, stop at €46: N = 100 ÷ (50 − 46) = 100 ÷ 4 = 25 shares. Position size = 25 × €50 = €1,250.
- the stop is set before the buy, and the trade really is sold there;
- the shares cost no more than the account holds.
A price jumps past the stop (lesson A13, Orders: market, limit and stop): each share loses more than planned. With 200 shares, €1 past the stop adds €200 to a planned €100.
New numbers. An account of €8,000 risks 1.5% on a trade that buys at €20 with its stop at €19.20. How many shares does it buy?
What this means for your backtest
A backtest runs a trading rule over past prices to see what it would have made. Two things follow. Turn them over.
- A result means little without its size.
"Up 114% with a maximum drawdown of 36.8%" and "up 26% with 10.5%" were the same 250 trades, at 4% and at 1% risk. To compare two backtests, find the risk per trade each used, or count both in R (lesson A7).
- Size can't add an edge.
A coin flip wins 50 trades in 100: no edge. And a 4% win and a 4% loss don't cancel: 1.04 × 0.96 = 0.9984. So when the simulation ran the three sizes on coin flips, the middle account (125 wins, 125 losses) ended at €9,876 at 1% risk and at €8,186 at 4%: it lost at each size, and the bigger size lost more. Raising the size after losses is lesson A19, Ruin.
How many shares is that?
How many shares does that plan come to?
Hint: the risk in euros, f × V, divided by what one share loses at the stop, Pbuy − Pstop.
"Same gain, a quarter of the drawdown"
Which part of that last sentence can't be right?
The same backtest at three times the risk
About how deep would the maximum drawdown have been, and what gain would undo it?
Lesson done
Position sizing sets how much each trade risks, and that risk multiplies every result, wins and losses alike. In this lesson's simulation the same 250 trades ended up 26% with a 10.5% maximum drawdown at 1% risk, and up 114% with 36.8% at 4%. The lesson shows what a size does, not which size to use.
Key ideas
- Position sizing
- deciding how much each trade buys, and so how much it risks
- Fixed amount
- risking the same money on every trade
- Fixed fraction (fixed-fractional sizing)
- risking the same share of the account on every trade, so the money at risk shrinks after losses and grows after gains
- Position size
- what a trade's shares cost: shares × the price paid for one
- Percent-risk position sizing
- choosing the number of shares so that a sale at the stop loses a set share of the account
Formulas
fixed amount: Vt = Vt−1 + A × Rt · fixed fraction: Vt = Vt−1 × (1 + f × Rt)
N = (f × V) ÷ (Pbuy − Pstop) · position size = N × Pbuy
Account formulas: results in R, no money added or taken out. Share formula: a buy with its stop below the buy price, sold at the stop with no gap or cost, N rounded down.