Max drawdown explained: how to read a trading bot's worst-case loss
TopTradingBots editorial team · Published 22 Nov 2026 · Updated 22 Nov 2026 · Editorial policy
Max drawdown is the largest fall in account value from a peak to the lowest point before a new peak, shown as a percentage of that peak. For a trading bot it is the closest thing to a worst-case loss you have already seen. Read it together with how long the drawdown lasted and whether open positions were counted, and expect a live bot to go deeper than its backtest over time.
What max drawdown measures
A drawdown is a fall from a high point. The CFA Institute’s Enterprising Investor defines it as “the decline in value from the previous local maximum to a subsequent trough,” and notes that an investment “may have many drawdowns over a period of time but has only one MDD,” the maximum drawdown.
Max drawdown = (peak value − lowest value after that peak) ÷ peak value
For a trading bot, the value is the equity of the account or the capital assigned to the bot. Max drawdown answers a simple question: what is the worst stretch this bot has already put its owner through?
It is one of several numbers in a bot report. Our guide to trading bot performance metrics covers win rate, profit factor and Sharpe ratio. This guide goes deeper on drawdown alone: how to calculate it, how long it lasts, what a report can hide, and how to use it to size and stop a bot.
Calculating it step by step
Example, made-up numbers: a bot starts with 10,000 USDT. Here is its equity at the end of each week.
| Week | Equity (USDT) | Peak so far | Drawdown from peak |
|---|---|---|---|
| 1 | 10,400 | 10,400 | 0% |
| 2 | 10,900 | 10,900 | 0% |
| 3 | 10,100 | 10,900 | 7.3% |
| 4 | 9,600 | 10,900 | 11.9% |
| 5 | 10,300 | 10,900 | 5.5% |
| 6 | 11,200 | 11,200 | 0% |
| 7 | 10,750 | 11,200 | 4.0% |
The max drawdown is 11.9%, from 10,900 in week 2 to 9,600 in week 4. The fall in week 7 is a second, smaller drawdown. Freqtrade’s backtesting docs compute the same thing as “Max % of account underwater”: the maximum of (Max Balance − Current Balance) ÷ Max Balance.
Two details change the result:
- Measurement frequency. The CFA article points out that drawdowns measured on daily data can be “significantly” deeper than those measured on monthly data over the same year, because there are more data points. In the table above, a mid-week low below 9,600 would not show up at all. Compare bots only on the same frequency.
- The window. Max drawdown only covers the period in the report. A bot tested from a market low through a rally may show almost none.
Recovery math: why deep drawdowns hurt more
Losses and gains are not symmetrical. After a fall of D, you need a gain of D ÷ (1 − D) just to get back to the peak.
| Drawdown | Gain needed to recover |
|---|---|
| 10% | 11.1% |
| 20% | 25% |
| 30% | 42.9% |
| 50% | 100% |
| 75% | 300% |
This is arithmetic, not a forecast. It is why a bot with a smaller drawdown and a lower return can leave you better off than a bot with a bigger return and a deeper hole: the deeper hole takes much longer to climb out of, and many owners switch the bot off before it does. The CFA article makes a similar point: strong drawdowns “may force traders to temporarily stop trading.”
Drawdown duration: how long you stay underwater
Depth is half the picture. The other half is time. Freqtrade reports a drawdown duration for the largest drawdown, with its start and end dates and the profit at each end. Its sample report shows a drawdown of 8.19% that lasted 9 days and 8 hours.
Duration matters for bots because:
- Fees and subscriptions keep running while the account is below its peak.
- You judge a bot by recent weeks. A bot that spends three months under its old high is easy to abandon even if the depth was moderate.
- Long, shallow drawdowns hide risk. A DCA or grid bot holding a losing position can sit underwater for a long time without closing a single losing trade.
When you read a report, write down both numbers: how deep, and for how long.
Closed trades vs open positions
The most common way a drawdown figure understates risk is by counting only closed trades. Freqtrade reports two sets of numbers. The standard ones are based on closed trades. A second block of “wallet based metrics” uses the balance including capital tied in open trades, and its absolute drawdown is “based on the unrealized balance.”
For a bot that closes every trade quickly with a stop, the two numbers are close. For bots that hold losers open, they can be far apart:
- DCA bots keep averaging down and close only in profit, so closed-trade drawdown can stay near zero while the open position is deep in the red.
- Martingale bots do the same with growing size, which is why their equity drawdown can be sudden and large (see martingale).
- Grid bots report grid profit from completed cycles separately from the floating loss on coins they hold. Our grid bot settings guide explains how the range drives that.
If a platform or seller shows a max drawdown, ask whether open positions are included. If they are not, the number describes the trades the bot chose to close, not the account.
Why your live drawdown will probably be deeper
A backtest’s max drawdown is a minimum, not a ceiling. Three reasons:
- Time. In a mathematical study of drawdowns, Magdon-Ismail and co-authors show that for a random process with drift, the expected maximum drawdown keeps growing as the observation period gets longer: roughly in proportion to the logarithm of time with positive drift, the square root with zero drift, and linearly with negative drift. A bot that has run for six months has simply had less time to hit its worst stretch than one that has run for five years.
- Tuning. Parameters chosen because they did well on past data fit that past best. Freqtrade even offers loss functions such as MaxDrawDownHyperOptLoss and CalmarHyperOptLoss in its hyperopt tool. Those are useful, but optimizing for a low drawdown on one period makes that period’s drawdown look better than the strategy deserves.
- Costs and fills. Live slippage, fees and outages rarely match a simulation.
Our backtesting guide covers out-of-sample tests, and paper trading adds a forward check before real money.
Calmar ratio: return per unit of drawdown
The Calmar ratio divides annual return by max drawdown. Freqtrade’s backtest summary reports it for closed trades and, in the wallet block, including unrealized profits. Its CalmarHyperOptLoss optimizes “trade returns relative to max drawdown.”
Example, made-up numbers: Bot A returns 24% a year with a 12% max drawdown, a Calmar of 2.0. Bot B returns 40% with a 40% max drawdown, a Calmar of 1.0. Bot B earns more, but each point of return came with a deeper fall.
Treat Calmar with the same caution as drawdown itself. Freqtrade’s own sample report shows a Calmar above 40 from one month of data, which says more about the short window than about the strategy.
Using max drawdown to size and stop a bot
Max drawdown is most useful when you turn it into rules before the bot runs.
1. Set your own limit first. Decide the most you could lose on this bot without switching it off at the worst moment. Our trading risk management guide covers account-level limits.
2. Size from the drawdown, with a buffer. Example, not a recommendation: your limit is 1,500 USDT. The bot’s backtest shows a 20% max drawdown. Because live drawdowns tend to be deeper, you plan for 30%. 1,500 ÷ 0.30 = 5,000 USDT allocated to the bot, not your whole 10,000 USDT account. The position size calculator helps with per-trade sizing.
3. Add an automatic drawdown stop. Some bots can pause themselves. Freqtrade’s MaxDrawdown protection can “stop trading if max-drawdown is reached,” and its docs recommend the “equity” mode, a standard peak-to-trough drawdown on the account equity curve. The documented sample pauses trading for 12 candles if drawdown exceeds 20% over the last 48 candles, once at least 20 trades have closed. Protections in backtesting must be switched on with a separate flag. Our Freqtrade guide covers setup.
4. Watch leverage. The CFA article notes that with leverage, “drawdowns have a much larger effect on portfolio performance.” On futures, a drawdown can turn into liquidation before any drawdown stop fires. Keep leverage low enough that your planned worst case leaves margin to spare.
5. Decide in advance what a breach means. If the bot passes its historical max drawdown, that is information: the market may have changed, or the backtest was too kind. Write down whether you will pause, reduce size or stop, and do it.
Max drawdown will not tell you what a bot will earn. It tells you what it has already cost someone to hold, and that is the number most likely to decide whether you stay with it.
FAQ
How do you calculate max drawdown?
Track account equity over time. At each point, compare it with the highest value reached so far: (peak − current) ÷ peak. The largest of those numbers over the whole period is the max drawdown. Freqtrade calculates its underwater figure the same way.
What is a good max drawdown for a trading bot?
There is no universal number. Decide the loss you could sit through without switching the bot off, then size the bot so that a drawdown deeper than its historical one still fits inside that limit. A low figure from a short or calm test period is weak evidence.
Why is my live drawdown bigger than the backtest?
Several reasons add up: a backtest covers one stretch of history, the expected maximum drawdown of a random process grows with the length of time observed, daily data shows deeper drawdowns than monthly data, and parameters tuned on the past fit that past best. Live fees and slippage add to it.
What is the Calmar ratio?
It compares return with max drawdown: annual return divided by the maximum drawdown over the same period. Freqtrade reports a Calmar ratio in its backtest summary and can optimize for it. A higher value means more return per unit of worst fall, measured on the same window.
Sources
- CFA Institute Enterprising Investor — Sculpting Investment Portfolios: Maximum Drawdown and Optimal Portfolio Strategy ↗checked 19 Nov 2026
- Magdon-Ismail, Atiya, Pratap, Abu-Mostafa — On the Maximum Drawdown of a Brownian Motion (Journal of Applied Probability, 2004; author copy) ↗checked 19 Nov 2026
- Freqtrade — Backtesting (summary metrics) ↗checked 19 Nov 2026
- Freqtrade — Plugins: Protections (MaxDrawdown) ↗checked 19 Nov 2026
- Freqtrade — Hyperopt (loss functions) ↗checked 19 Nov 2026
Related guides
- Are crypto trading bots profitable? What actually decides the result
- What is a crypto trading bot, and how does it actually work?
- Stop loss for a trading bot: where to set it on grid, DCA and futures bots
- Trading bots in a bear market: how each bot behaves when prices keep falling
Not financial advice. Trading bots do not remove market risk.