Introduction to Quant Finance · Lesson 17
Drawdown
What you'd have sat through: how far an account fell from its high, how long it stayed down, and how likely it is that a deeper fall is still to come.
Know the basics? Read the lesson notesUp 28%, and the ride there
A simulated account starts with €10,000 and follows a made-up trading rule. Each trade wins or loses 1% of the account. The rule wins 55 trades in 100, so it has an edge: an advantage that makes money on average. Play its first 250 trades.
One account, 250 trades (simulated)
The account after each trade. Dashed: its €10,000 start.
The account ended at €12,808, up 28.1%. The simulation ran 1,000 accounts on this same rule; they differ only by luck. This one is typical: it ended in the middle (the median account). Now look at the ride. At trade 157 the account stood at €13,801. Then it fell: 62 trades later it was down to €11,724.
Whoever trades this rule sits through that fall without knowing how it ends. This lesson measures it: how deep, and how long.
Peak, drawdown, trough
Two words first. The peak is the highest value the account has reached so far, its starting value included. The drawdown is how far the account is below that peak, as a percent of the peak. At a new peak the drawdown is 0%.
Here is a small made-up account at the end of each of ten months. Step through them.
Ten months of a made-up account
Top: the account, with its peak so far dashed. Bottom: the drawdown, hanging below 0%.
The fall after month 3 reached its lowest point, its trough, in month 5: €960. That is €240 below the €1,200 peak, and 240 ÷ 1,200 = 20%: the drawdown's depth.
Its length is 4 months: months 4 to 7 all sat below €1,200, until month 8 set a new peak. The word drawdown is used both for the fall at one moment and for the whole spell below a peak.
A month below the peak is a month under water. Length counts one spell; time under water counts them all: 5 of the 10 months here (months 4 to 7, and month 9).
The maximum drawdown
The deepest drawdown in an account's whole history is its maximum drawdown: the number quoted for an account's worst stretch.
The ten months again: €1,000, €1,100, €1,200, €1,080, €960, €1,020, €1,140, €1,250, €1,125, €1,300. What is their maximum drawdown?
How often below its peak?
Back to the simulated account. Its rule has an edge, and it ended its 250 trades up 28.1%.
After how many of those 250 trades was the account under water, below its peak so far?
Under water
Under the account's line is its underwater chart: after every trade, how far the account sat below its peak. Where it touches 0%, the account is at a new peak. Slide through the trades and find the deepest point.
The same account and its underwater chart (simulated)
Top: the account, with its peak so far dashed. Bottom: its drawdown after each trade.
The deepest point came at trade 219: €11,724, which is €2,077 below the €13,801 peak, and 2,077 ÷ 13,801 = 15.0%. The account was still below that peak when the 250 trades ended, 93 trades later, so this drawdown is at least 93 trades long.
Slide on to trade 250 for the full count: after 217 of its 250 trades, 87 in 100, the account was under water. Only 33 trades set a new peak.
Why so few, with an edge? A new peak needs a win that takes the account beyond its old high. This rule wins 55 trades in 100 and loses 45, so on average it ends only 10 wins ahead per 100 trades. Most wins just win back earlier losses: in the simulation this account won 138 of its 250 trades (55 in 100 would be 137.5), and only 33 of those wins set a new peak.
This is normal for this rule: of the 1,000 accounts, 935 were under water after at least 8 of every 10 trades. A rule with a stronger edge spends less of its time under water.
Is the worst behind it?
A backtest runs a trading rule over past prices to see what it would have made. Treat each account's first 250 trades as its backtest, with its own maximum drawdown.
Then every account trades on for 750 more trades. The rule doesn't change: the same edge, the same 1% a trade. In how many of the 1,000 accounts do those later trades bring a drawdown deeper than the backtest's maximum?
More time, more chances
Each square is one of the 1,000 accounts. From the end of its backtest on, the peak starts fresh: the account's value at trade 250 is its first peak, as for someone who starts trading then. The square turns orange once the account has met a drawdown deeper than its backtest's maximum. Slide the trades forward to 750.
1,000 accounts after their backtests (simulated)
Orange: a deeper drawdown than the backtest's has come. The squares are sorted, so the orange ones sit together.
After 250 more trades, as many as the backtest had, 500 of the 1,000 accounts had met a deeper drawdown. After 750 more, 794 had.
Here is why. The 250 trades after the backtest follow the same rule as the backtest's 250, and luck in one stretch doesn't carry into the other: the stretches are independent. So each is equally likely to hold the deeper drawdown: 1 chance in 2.
Now take 750 trades: three stretches of 250, four with the backtest. They follow the same rule and are independent, so each of the four is equally likely to hold the deepest drawdown of all. So the chance that the backtest holds it is 1 in 4, and the chance that the worst comes later is 3 in 4: 750 accounts in 1,000. The count is a little higher, 794, because within the 750 trades a drawdown can also run from one stretch of 250 into the next.
Drawdown and maximum drawdown
The drawdown at any moment is the fall from the highest value so far, as a share of that value. The maximum drawdown is the largest one in the account's history.
- Vt
- the account's value at step t: after month t, or after trade t
- V0
- the account's starting value, before the first step, when there is one: the €10,000 before trade 1
- n
- how many steps there are
- peakt
- the peak at step t: the highest value so far, the starting value and Vt included
- DDt
- the drawdown at step t, as a decimal: 0.20 is 20%. It is 0 at a new peak
- MDD
- the maximum drawdown over all n steps
The ten month-end values have no starting value before them, so the peak begins at V1 = 1,000. Month 5: the highest value so far is 1,200 and V5 = 960, so DD5 = (1,200 − 960) ÷ 1,200 = 240 ÷ 1,200 = 0.20. All ten drawdowns: 0, 0, 0, 10%, 20%, 15%, 5%, 0, 10%, 0. The largest is the MDD: 20%. Five of the ten are above 0, so the time under water is 5 ÷ 10 = 50%.
- each value is the whole account at that moment;
- no money is added or taken out along the way: a deposit would hide a fall.
The values are far apart: month-end values miss a fall that came and went inside a month. And it is one number from one account's run of luck: other luck gives another (lesson B11, Monte Carlo).
New numbers. An account at the end of six weeks: €500, €800, €720, €600, €840, €798. What is its maximum drawdown, in percent?
Is the worst still to come?
A value more extreme than every one before it is called a record. A maximum drawdown is a record, and more trading gives more chances to break it. If the rule behaves the same after the backtest as during it:
- k
- how many times as long as the backtest the trading after it lasts: 750 trades after a 250-trade backtest is k = 3. At k = 1 the chance is 1 ÷ 2: a coin flip
- k + 1
- the number of equal stretches, the backtest included; each is equally likely to hold the deepest drawdown
- ≈
- about equal: after the backtest, drawdowns that run from one stretch into the next push the chance a little higher
250 trades after a 250-trade backtest: k = 1, so 1 ÷ (1 + 1) = 1 ÷ 2 = 50%. Measured: 500 of 1,000. 750 trades after: k = 3, so 3 ÷ (3 + 1) = 3 ÷ 4 = 75%. Measured: 794 of 1,000, a little more.
- the rule behaves the same in every stretch: the same edge, the same size of trade;
- one stretch's luck doesn't carry into the next (the stretches are independent);
- the stretches hold about the same number of trades.
The edge fades or the market changes after the backtest. Then the formula no longer applies. If the edge fades, a deeper drawdown is more likely than it says (lesson C3, Regimes and decay).
A backtest covers 2 years. The rule then trades for 8 more years without changing. About what is the chance that its deepest drawdown is still to come?
What this means for your backtest
Three things follow from this lesson. Turn them over one at a time.
- Read a maximum drawdown with its length and its climb back.
The simulated account's worst was 15.0% deep and at least 93 trades long. Getting from €11,724 back to €13,801 takes a gain of 2,077 ÷ 11,724 = 17.7%: more than the fall, because a gain is measured on what's left (lesson A14).
- For this rule, time under water is the normal state, even with its edge.
The simulated account, whose rule has an edge, was under water after 87 trades in 100. So a stretch below the peak can't tell you, on its own, whether a rule still works.
- A backtest's maximum drawdown may not be the deepest the rule will see.
If the rule behaves the same after the backtest as during it, trading k times as long as the backtest gives a chance of about k ÷ (k + 1) of a deeper drawdown, edge or no edge. How deep it gets depends on the size of each trade (lesson A18, Position sizing).
"It never dipped below its start"
What is the account's maximum drawdown, in percent?
Hint: find the peak so far at each month. Then (peak − value) ÷ peak, and take the largest.
Below its peak after 264 of 300 trades
What does that time under water tell you?
"The worst I'll see is about 9%"
If the rule keeps behaving as in the backtest, about what is the chance that those five years bring a drawdown deeper than 9%?
Lesson done
A drawdown is how far an account is below its peak, as a percent of the peak. The maximum drawdown is the deepest one. In the lesson's simulation, an account whose rule has an edge spent most of its time under water, because new peaks are rare. And if a rule behaves the same after its backtest as during it, the longer it trades on, the more likely a deeper drawdown: about k ÷ (k + 1) for k times as long.
Key ideas
- Peak
- the highest value an account has reached so far, its starting value included
- Drawdown
- how far an account is below its peak, as a percent of the peak; 0% at a new peak
- Trough
- the lowest point of a drawdown, before the account climbs back
- Maximum drawdown
- the deepest drawdown in an account's history: the largest fall from a peak to a later trough
- Length of a drawdown
- how many values in a row (months, trades) sat below its peak
- Under water
- below the peak so far; time under water is the share of an account's history spent there
- Underwater chart
- an account's drawdown drawn at every step, hanging below 0%
- Record
- a value more extreme than every one before it, such as a new deepest drawdown
Formulas
DDt = (peakt − Vt) ÷ peakt · MDD = the largest DDt · time under water = values below the peak ÷ n
chance the deepest drawdown is still to come ≈ k ÷ (k + 1)