LEARN · EN · easyquanttrading.com

Maximum drawdown calculation: the formula, worked by hand, and in code

Maximum drawdown is quoted on every strategy report and calculated wrongly often enough to matter. The idea is simple — the worst fall from a high point to the low that follows — but the details decide the number: whether you measure on equity or balance, whether you use percentages or currency, and whether you include the trades that were open when the fall happened.

By the EasyQuant Research Team·Published 2026-09-26·We publish the tests our own strategies fail. Nothing here is a return promise.

The formula

For an equity series E(0), E(1), … E(T), define the running peak at each point as the highest equity seen so far: peak(t) = max(E(0) … E(t)).

The drawdown at time t is DD(t) = E(t) / peak(t) − 1, which is zero or negative. Maximum drawdown is the smallest (most negative) value of DD over the whole series: MDD = min over t of DD(t).

Expressed as a positive percentage, MDD is the largest fall from a prior high. That is the entire calculation. There is no averaging, no smoothing, and no parameter to tune — which is one of its virtues and one of the reasons it is so easy to compute inconsistently with someone else's report.

If you prefer currency units, the same series gives the magnitude of the fall in money terms. The two are not interchangeable: the percentage version divides by a peak that changes over time, so a 1,000 fall is a different percentage depending on when it happens.

Worked by hand

Take an equity curve: 10,000 → 11,000 → 12,000 → 10,800 → 10,200 → 11,500 → 12,300.

Track the running peak: 10,000, 11,000, 12,000, 12,000, 12,000, 12,000, 12,300.

Compute the drawdown at each point: 0%, 0%, 0%, −10.00%, −15.00%, −4.17%, 0%.

Maximum drawdown is −15.00%: the fall from the 12,000 peak to the 10,200 trough.

Note what the running peak does after the trough. It stays at 12,000 through the recovery to 11,500 — the strategy is still in drawdown at that point, even though it just made money on the last three steps. That is correct and it is the part people get wrong when they compute drawdown by eye: a drawdown ends only when equity exceeds the previous peak, not when it stops falling.

Also note the recovery requirement. From the 10,200 trough back to the 12,000 peak is +17.6%. The asymmetry is worse at larger numbers: a 50% drawdown needs a 100% gain to recover, and a 75% drawdown needs a 300% gain. This is the single most useful number to put next to a maximum drawdown, because it converts a risk statistic into a statement about how long you will be waiting.

The two mistakes that give the wrong answer

**Mistake one: using balance instead of equity.** Balance is closed trades only; equity includes open positions. A strategy that holds a losing position for three weeks shows no balance drawdown at all until the trade closes, and then shows it all at once. Equity drawdown captures the risk you were actually carrying. For a strategy that holds positions overnight, the equity figure is the honest one, and it is usually larger.

**Mistake two: resetting the peak too early.** If you compute drawdown over each calendar month and report the worst month, you have not computed maximum drawdown — you have computed the worst monthly drawdown. A fall that starts in March and bottoms in May is split in two by the month boundary and looks smaller in both halves. Maximum drawdown is computed over the whole curve with a single running peak.

Two more that are less obvious. Excluding the warm-up period can hide a genuine early drawdown. And reporting drawdown as a percentage of the initial deposit rather than the running peak understates it whenever the account has grown — a 5,000 fall from a 20,000 peak is 25%, not 50% of the original 10,000.

In code

The calculation is a running maximum and a division:

peak = equity[0]; mdd = 0; for each value v in the series: if v > peak then peak = v; dd = v / peak − 1; if dd < mdd then mdd = dd. At the end, mdd is the maximum drawdown as a negative fraction.

Two details make it robust. Resample to a fixed interval first — daily closes, say — because tick-level equity curves contain intraday noise that inflates the figure without representing a persistent loss. And keep the drawdown series, not just the minimum, because the duration of the worst drawdown matters as much as its depth: 30% for two months and 30% for two years are not the same experience.

What to look at alongside it

Maximum drawdown on its own is a minimum-bar statistic: it tells you the worst that has happened, and the worst that will happen is by definition at least that. A single number from one historical window is a lower bound on future drawdown, not an estimate of it.

The three things worth putting next to it are recovery time, the number of trades the drawdown took, and how the drawdown compares to the strategy's typical drawdown. If the maximum is 30% but the typical is 4%, you are looking at a tail event and you should expect the study period to be unrepresentative of the tail. If the maximum is 30% and the typical is 25%, the strategy simply spends most of its life underwater and you should decide whether you can hold it there.

It is also worth computing the drawdown on the same curve with realistic costs and on a different historical window. Two curves with the same reported maximum drawdown can be quite different objects: one may have a single sharp fall and a fast recovery, the other a long grinding decline. The number is identical and the experience is not.

What maximum drawdown cannot tell you

It is backward-looking. It says what the worst fall was over the period measured, and nothing about the worst fall ahead.

It is sensitive to the sample. Extend the window and the number can only stay the same or get worse — adding data cannot reduce a historical maximum. Anyone quoting a maximum drawdown from a short backtest is quoting a number that is structurally too small.

It ignores probability. Two strategies with a 20% maximum drawdown are not equivalent if one reached it once in ten years and the other every eight months.

And it depends on the resolution of the data. Compute the same strategy on tick data and on daily closes and you will get different numbers, usually with the tick figure larger. Neither is wrong; they answer different questions, and a report that does not state the resolution has not told you which one it means.

Current platform facts

Read live from the strategy library when this page was generated. These are the same counts published on our transparency page, and they change as strategies are added and rejected.

Strategies in the audited library3672
Flagged by the audit2011
Flag rate54.8%
Checks still pending1651
Passed the DSR overfitting check1
Passed the significance check504
DSR threshold used0.90

FAQ

What is the formula for maximum drawdown?
MDD = min over the series of (equity ÷ running peak) − 1, where the running peak is the highest equity seen so far. In practice you track the peak, compute the percentage fall at each point, and keep the worst value.
Should I calculate drawdown on equity or balance?
Equity if the strategy holds positions open, because it includes the unrealised losses you are actually exposed to. Balance shows nothing until trades close, so it understates the risk carried during long holds.
Why is my maximum drawdown different from my platform's?
Usually one of four reasons: equity versus balance, the data resolution (tick versus daily close), whether the warm-up period was included, or whether the peak was reset at interval boundaries. Check which convention each report uses before comparing numbers.
What is a good maximum drawdown?
There is no universal answer, but the recovery arithmetic constrains it: a 50% drawdown needs a 100% gain to recover, and a 75% one needs 300%. The practical question is not whether the number is good but whether you would keep trading through it, and it will last longer than you expect.
Does adding data lower a maximum drawdown?
No. A historical maximum can only stay the same or increase when you extend the window, because it is a maximum. This is why a maximum drawdown from a short sample is a lower bound rather than an estimate.

More guides

Not investment advice. Historical results do not guarantee future performance. EasyQuant is a research factory — you execute on accounts you control.

Maximum drawdown calculation: the formula, worked by hand, and in…