My backtest history table holds 12,331 configs across 127 symbols and 5 entry families — pullback_reclaim, range_bounce, volume_reversal, micro_momentum, range_bottom_reclaim. 8,718 of those rows closed net positive. Every row also carries a max_mae field: the deepest the trade went against me before it turned around, expressed as a percent of entry price, independent of how the trade eventually closed. Median across the winners: -6.75%. Mean: -7.58%. Worst single case: -29.9% on a TAUSDT volume_reversal config that still closed up nearly 30% net.
None of that matters on spot. It matters a lot the moment leverage enters the picture, because MAE is exactly the number that decides whether an exchange closes your position before the backtest's happy ending ever happens.
Running MAE against real liquidation thresholds
I already worked out where isolated margin actually liquidates you in an earlier post — roughly -19.5% at 5x, -9.5% at 10x, -4.5% at 20x, -3.5% at 25x, -1.5% at 50x. I ran each of the 8,718 winning trades' MAE against those same thresholds: if the trade's max_mae was deeper than the threshold, it would have been liquidated mid-trade, before it ever reached the win the backtest logged.
| Leverage | Liquidates at | Winners liquidated first | % of 8,718 |
|---|---|---|---|
| 5x | -19.5% | 179 | 2.1% |
| 10x | -9.5% | 1,930 | 22.1% |
| 20x | -4.5% | 6,942 | 79.6% |
| 25x | -3.5% | 8,070 | 92.6% |
| 50x | -1.5% | 8,664 | 99.4% |
8,718 net-positive backtest configs, max_mae field, checked against isolated-margin liquidation thresholds from the leverage table above.
Why 20x is the line that matters
I flagged 20x and 25x on purpose. In the leverage-cap post I pulled real exchange caps for 612 pairs — 224 of them capped at exactly 25x, another 171 capped at 20x. Those two tiers together are what most altcoins are allowed to trade at, not a hypothetical. And they're exactly where this dataset falls off a cliff: 79.6% of eventual winners liquidated first at 20x, 92.6% at 25x. The leverage exchanges hand you by default on most pairs is the leverage at which nine out of ten of my own winning setups wouldn't have survived to collect.
A concrete row: a MYXUSDT pullback_reclaim config, 2,000 trades, 89-93% win rate, profit factor around 1.7, net profit in the $375-420 range depending on the exact fold — a genuinely good-looking strategy by every number I usually rank on. Its max_mae sits at -6.75%, right at the dataset's median. At 10x that's already past the -9.5% threshold's safety margin on a bad fold; at 20x it's nowhere close to surviving. A strategy can have a 90% win rate and still be undercut by the one number win rate doesn't report.
What this changes about how I read a backtest
Profit factor, expectancy, win rate — none of them tell you if the equity curve survives contact with a margin call. Two backtests with identical net profit can have wildly different MAE, and the one with the deeper drawdown is the one that dies first the moment you add leverage instead of running it on spot or with a tiny position size. I've started treating max_mae as a hard filter before leverage sizing, not a footnote: if a strategy's median MAE is deeper than my target leverage's liquidation threshold, the leverage number is fiction regardless of what the backtest's final P&L says.
The fix isn't lower leverage in the abstract, it's matching leverage to the specific strategy's MAE, not to whatever cap the exchange happens to offer. A -6.75% median MAE wants something closer to 10x than 20x, and a strategy with -15%+ tail MAE — 5.1% of this dataset's winners went that deep — has no business running leverage past 5x-10x no matter how good its profit factor looks on paper.
Before you size a backtested strategy with leverage
- Pull max adverse excursion, not just the final result. Median MAE across 8,718 of my winning trades was -6.75% — a number the win/loss column never shows.
- Check MAE against your actual liquidation threshold, not a round number. At 20x (-4.5%) 79.6% of winners in this dataset would have been liquidated before the win.
- Don't assume the exchange's default leverage cap is safe for the strategy. 25x and 20x are the two most common caps on 612 real pairs, and also the two levels where this data falls apart.
- Size leverage to the strategy's MAE, not its win rate. A 90% win-rate config with -6.75% median MAE still needs single-digit leverage to survive its own drawdowns.
→ Liquidation calculator · → Safe leverage calculator · → Max drawdown calculator
FAQ
What is max adverse excursion (MAE) and why does it matter for leverage?
MAE is the worst drawdown a trade hits before it closes, win or lose. It's a separate number from the final result — a trade can end up profitable and still have gone deep into the red first. Across 8,718 winning trades in my backtest history, the median MAE was -6.75%. On spot or low leverage that's just a scary chart. On margin, if that drawdown crosses your liquidation threshold, the position closes for good before it ever gets the chance to become the winner the backtest recorded.
What percentage of winning backtest trades would have been liquidated at 20x leverage?
79.6% (6,942 of 8,718). At 20x isolated margin, a roughly -4.5% move liquidates the position. The median MAE across my winning trades was -6.75%, already past that line, and only 20.4% of eventual winners stayed shallower than -4.5% the whole way through. Most of the trades that made money on paper would have been forcibly closed at a loss first if they'd been running at 20x.
Does a winning trade still get liquidated if I use isolated margin?
Yes — liquidation is triggered by the drawdown during the trade, not by how the trade eventually closes. Isolated margin only caps your loss to that one position instead of your whole account; it doesn't change the price level at which the exchange closes you out. A trade with a -10% max adverse excursion that later recovers to +3% profit still gets liquidated at -10% if your leverage's threshold sits above that, isolated or not.
What leverage keeps most winning trades from getting liquidated first?
In this dataset, 5x. At 5x the liquidation threshold is roughly -19.5%, and only 2.1% of winning trades had a max adverse excursion that deep. At 10x (-9.5% threshold) it jumps to 22.1% of winners liquidated first. At 20x, the leverage most exchanges cap the majority of altcoins at, it's 79.6%. The gap between 10x and 20x is where most of the damage happens in this data.