‹ Backtest Strategies Lesson 13 of 17
Contents Lesson 13 of 17

4 min read · professional

Measure drawdown properly

Total return is one number about the end. Drawdown is about the middle, which is where people actually quit.

The definition, and the loop

Maximum drawdown is the worst peak-to-trough decline in the equity curve. One pass, running maximum:

let peak = -Infinity, worst = 0;
for (const v of equity) {
  peak = Math.max(peak, v);
  worst = Math.min(worst, v / peak - 1);
}

Two mistakes that produce a smaller, friendlier number: comparing to the final value rather than the running peak, and computing on monthly samples of a daily curve — a monthly series never sees the intramonth low, so it reports a shallower hole than the one you would have lived in.

The number that makes it real

SPY, adjusted close, measured live over 2007–2014:

Peak 2007-10-09, 110.863
Trough 2009-03-09, 49.6787
Maximum drawdown −55.2%
Recovery 2012-08-16
Time under water 1,224 trading days — 4.8 years

Those are total-return figures, and the convention is half the answer. On raw close the same episode is −56.5%, from 156.48 down to 68.11, and the peak was not regained until 14 March 2013 — seven months later than the row above. The gap is dividends. A price chart shows you the second pair; a dividend-adjusted series shows you the first, and a report that does not say which is quoting a number nobody can reproduce.

Look at the last row rather than the fourth. A −55% drawdown that recovers in a month and one that takes nearly five years are identical on a return chart and completely different to live through. Almost nobody holds a rule for 1,224 trading days while it is below where it started.

Print three, not one

  • Maximum drawdown — the depth.
  • Time under water — longest run below a prior peak, in trading days. The one people omit and the one that decides whether a strategy is survivable.
  • Return divided by max drawdown — a crude but honest units-of-pain figure. It is not a Sharpe ratio and should not be called one.

Deliberately not here: Sharpe. It needs a risk-free rate, an annualisation convention and a distributional assumption you have not examined, and quoting it early gives a number more authority than the work behind it. The performance-measurement course in Portfolio Management does it properly.

Compare the middles, not just the ends

Put your strategy's three numbers beside buy-and-hold's. A rule that returns slightly less with half the drawdown is a genuinely better tool for a human, and the total-return column alone will never tell you that.

The finance behind it

Both figures are treated properly in Portfolio Management, including the one this course prints and most reports omit: What does a drawdown actually measure? and How long were you under water?. The Sharpe ratio this course deliberately skips is done there too: How do you compute a Sharpe ratio without fooling yourself?

Try it now

Add time under water to your report, then find the longest underwater stretch in your own strategy and mark those dates on the chart. Ask yourself honestly whether you would have kept running the rule through that stretch. That answer is a real result, and it is not in any statistic.