Lesson 9 of 15

Drawdown Analysis

Drawdown Analysis

A drawdown measures the decline from a historical peak to the current value of an equity curve. It quantifies ongoing losses from the high-water mark.

Drawdown Formula

For each time step t:

peak_t = max(equity_curve[:t+1])
drawdown_t = (equity_t - peak_t) / peak_t

Drawdowns are always ≤ 0 (or 0 when at a new peak).

Maximum Drawdown

max_drawdown = min(drawdowns)

This is the single largest peak-to-trough decline over the entire history — a key metric for strategy risk.

Example

Equity curve: [100, 110, 105, 95, 100, 108, 115]

tValuePeakDrawdown
01001000.0
11101100.0
2105110−0.0455
395110−0.1364
4100110−0.0909
5108110−0.0182
61151150.0

Max drawdown = −0.1364

Python runtime loading...
Loading...
Click "Run" to execute your code.