Sub topic 5
Drawdowns: how far from the peak
This chapter assumes you can compute simple returns from a price series and that you know what volatility measures. Volatility describes how widely returns scatter. A drawdown describes something closer to what an investor lives through: how far the value has fallen from the best level it reached.
What a drawdown is
A drawdown is the percentage decline from the highest value reached so far to the current value. The highest value so far is the running peak. At each date:
drawdown = price / running peak − 1
A drawdown is zero when the price is at a new high and negative otherwise. A fall from 120 to 90 is a drawdown of 90 / 120 − 1 = −25%.
Three related terms:
| Term | Meaning |
|---|---|
| Current drawdown | The drawdown today, measured from the highest value so far |
| Maximum drawdown | The most negative drawdown in the whole period |
| Time underwater | How long the value stays below its previous peak |
The peak is always a peak so far. A drawdown never uses a future high, so it can be computed as data arrives.
Computing drawdowns from prices
The algorithm needs one pass. It keeps the highest price seen so far and compares each new price to it.
def drawdown_series(prices):
peak = prices[0]
result = []
for price in prices:
peak = max(peak, price)
result.append(price / peak - 1)
return result
def max_drawdown(prices):
return min(drawdown_series(prices))
prices = [100, 120, 90, 110, 80, 130]
for p, d in zip(prices, drawdown_series(prices)):
print(f"price {p:>3} drawdown {d:7.1%}")
print(f"Maximum drawdown: {max_drawdown(prices):.1%}")The series is 0%, 0%, −25.0%, −8.3%, −33.3%, 0%. The maximum drawdown is −33.3%, the fall from 120 to 80. Notice that the later rise to 130 does not erase it. Maximum drawdown is a record of the worst moment, not the final state.
The deepest point is the trough. The distance from a peak to its trough is a peak-to-trough decline, and "maximum drawdown" is the largest such decline in the data.
Starting from returns instead of prices
Many data sources give you returns, not prices. Convert them to a wealth index, which is the value of 1 unit invested at the start. Then apply the same logic. Include the starting value of 1.0 in the peak, or a loss in the first period will be missed.
def drawdowns_from_returns(returns):
wealth = 1.0
peak = 1.0
result = []
for r in returns:
wealth *= 1 + r
peak = max(peak, wealth)
result.append(wealth / peak - 1)
return result
print(drawdowns_from_returns([0.10, -0.20, 0.05]))Wealth goes 1.10, 0.88, 0.924. The drawdowns are 0, −20%, and −16% (up to floating-point rounding). If the first return were −10%, the starting value of 1.0 would be the peak and the first drawdown would be −10%. Without the 1.0, the code would report 0%.
Measuring time underwater
Depth is only half the story. A −20% drawdown that recovers in three months feels different from one that lasts six years. Duration counts how long the value stays below a previous peak.
def longest_underwater(prices):
peak = prices[0]
current = 0
longest = 0
for price in prices:
if price >= peak:
peak = price
current = 0
else:
current += 1
longest = max(longest, current)
return longest
print(longest_underwater([100, 120, 90, 110, 80, 130])) # 3The function returns 3 because the values 90, 110, and 80 all sit below the 120 peak. Here the unit is observations, so it means 3 days if the prices are daily. Reporting a recovery time in calendar terms requires timestamps.
Two durations are worth separating:
- Drawdown length: from the peak to the trough.
- Recovery length: from the trough back to the old peak.
A drawdown that has not recovered by the end of your data has an unknown total duration. It is incomplete, not zero.
How to read the number
Maximum drawdown answers a different question than volatility. Volatility treats upward and downward moves alike. A drawdown looks only at the loss path, and it accumulates. Several small down days in a row make a deep drawdown even if each day is within normal volatility.
This makes drawdown closer to investor experience. Most people cannot easily say what a 15% annualized volatility feels like. Seeing the account at −35% is much easier to imagine.
Some points to keep in mind:
- It depends on the window. A longer history contains more chances for a bad stretch, so maximum drawdown can only rise or stay the same as you add data. A figure computed over five calm years says little about a full cycle.
- It depends on the frequency. Daily closing prices hide intraday lows, and monthly data hides the dips between month-ends. The same asset shows a shallower maximum drawdown at monthly frequency than at daily.
- It uses the path. Two portfolios with identical annual returns and volatility can have very different drawdowns, depending on the order of gains and losses.
- It is one observed path. The maximum drawdown in your sample is not the worst possible. The next one can be deeper than any in the history you have.
- Price versus total return matters. A price series ignores dividends, so it can show deeper and longer drawdowns than a total-return series that reinvests them. Compare like with like.
Using drawdown in practice
Drawdowns are useful in several ways:
- Comparing strategies. Two funds with the same average return can differ widely in maximum drawdown. The one with the shallower drawdown is easier to hold through.
- Checking risk against your limits. If a −40% drop in a portfolio would force you to sell, or break a plan such as a down payment, that drawdown matters more than the volatility figure.
- Spotting slow losses. A strategy that loses a little every day may have low volatility and still produce a deep, long drawdown.
- Calmar-style ratios. Some analysts divide annualized return by maximum drawdown to compare return against the worst stretch. The ratio inherits every weakness of the maximum drawdown, especially window dependence.
A drawdown by itself does not tell you whether the loss is permanent. A diversified index that falls 30% and later recovers is a different case from a single company that falls 30% and never returns. That distinction is the subject of later chapters. The measurement here only tells you how far the value fell and for how long.
Common errors
- Using the average price as the peak. The peak is the highest value so far, not an average.
- Forgetting to update the peak. If the peak is fixed at the first price, a later new high will make drawdowns come out positive.
- Summing drawdowns or returns. Percentages compound. Do not add up losses to get a total.
- Looking at the last value only. A portfolio that ended at a new high can still have had a severe drawdown on the way.
- Mixing data types. Applying the price formula to a list of returns gives meaningless numbers. Convert returns to a wealth index first.
Exercise
Prices are [50, 60, 42, 55, 36, 70]. Find the maximum drawdown and the longest time underwater, counted in observations.
Show answer
The running peak is 60 from the second observation until 70 is reached. The drawdowns are 0%, 0%, 42/60 − 1 = −30%, 55/60 − 1 = −8.3%, 36/60 − 1 = −40%, and 0%. The maximum drawdown is −40%, the fall from 60 to 36. The values 42, 55, and 36 are all below the 60 peak before 70 sets a new high, so the longest time underwater is 3 observations.
Exercise
A fund reports a maximum drawdown of −18% using monthly closing values. Name two reasons the true worst peak-to-trough decline might have been deeper.
Show answer
First, monthly data hides intraday and within-month lows, so the actual trough could be lower than any month-end value. Second, the reporting window may not include a severe period, because maximum drawdown can only be measured over the data you have. A third acceptable answer is that a price series without reinvested dividends can distort the depth, though that effect usually makes the decline look worse rather than milder.