November 15, 2026 · Michael Shane
Liquidation Price Explained: Why Your Backtest Needs It
What a liquidation price is, how leverage moves it closer, and why a backtest that never checks for liquidation can look much safer than it is.
Every leveraged perp position has a liquidation price. Hit it, and the exchange closes your trade. Your margin is gone, even if the price bounces back a minute later.
Many quick backtests, including many an AI writes for you, never check for it. Every trade runs to its planned exit, no matter how far it dropped on the way. That can make a risky idea look fine.
This guide explains liquidation in plain words and shows how to test it honestly. If you're new to leverage, start with Position Sizing for Beginners.
What is a liquidation price?
When you open a leveraged trade, you put up margin. With 10x leverage, $100 of margin controls a $1,000 position.
Your margin covers your losses. If the trade moves against you until your margin is almost used up, the exchange closes it. That price is your liquidation price.
The exchange also wants a small cushion left over. That cushion is called maintenance margin. It's usually a small percentage of the position size, and it varies by exchange, coin and position size.
How leverage moves it closer
For a simple isolated long position, a rough rule is:
Liquidation price ≈ entry price × (1 − 1/leverage + maintenance margin rate)
Using an example maintenance margin of 0.5%:
- 3x: liquidation about 32.8% below entry
- 5x: about 19.5% below
- 10x: about 9.5% below
- 20x: about 4.5% below
For a short, flip it: the liquidation price is above your entry.
This is only an estimate. Exchanges add fees, use a mark price, and have their own margin tiers. Check your exchange's docs and the liquidation price on its order screen.
Doubling leverage roughly halves the distance. At 20x, a normal day in crypto can be enough.
Why backtests get this wrong
There are three common mistakes:
- No liquidation check at all. The trade is held to its planned exit. A drop of 15% at 20x is treated as a temporary loss instead of a wiped-out position.
- Checking only the closing prices. The backtest looks at hourly or daily closes. But liquidation can happen on a quick wick inside the candle that recovers before the close.
- Ignoring the costs that pull it closer. Fees and funding come out of your margin. Over a long hold, they move the liquidation price toward you. See How Funding Rates Change a Perp Backtest.
A quick simulation
We ran a simple test. 100 runs of 200 long trades each, held for 24 hours, on random 1-minute price paths with about 4% daily volatility and a small built-in edge. We used example numbers, not any one exchange's: 0.05% fee per side and 0.5% maintenance margin. A liquidated trade lost its whole margin.
We tested the same trades three ways: with no liquidation check, checking only hourly closes, and checking every 1-minute low.
All numbers below are simulated, not real trading results.
- 3x and 5x: no trades liquidated. All three versions showed 89 of 100 runs net positive.
- 10x: about 1 in 100 trades liquidated. 89 of 100 runs net positive with no check, 88 of 100 with the checks.
- 20x: the no-check backtest still showed 89 of 100 runs net positive. Checking hourly closes, 18% of trades were liquidated and 87 of 100 runs were net positive. Checking every 1-minute low, about 22% of trades were liquidated and 81 of 100 runs were net positive.
So at 20x, the no-check backtest hid that about 1 in 5 trades would have been closed out. Hourly closes missed part of it, because of wicks inside the hour.
Then we removed the edge. At 20x, the no-check backtest showed 41 of 100 runs net positive. With the 1-minute check, it was 30 of 100.
Real markets have sharper wicks and gaps than random paths, so the real difference can be bigger.
How to test liquidation honestly, step by step
1. Write down leverage and margin mode
Isolated or cross margin? What leverage? Lock them in before you test.
2. Compute a liquidation price for every trade
Use your exchange's maintenance margin rate for your size, not a guess. Store the price with each trade.
3. Check it on the lowest price, not the close
For longs, check the candle low. For shorts, the candle high. If you can, use smaller candles than your strategy uses, so wicks inside the bar count.
4. Count a liquidation as a full loss
Don't let the trade recover. Once liquidated, the margin is gone, often plus a liquidation fee.
5. Put your stop loss before your liquidation price
A stop that sits beyond the liquidation price never gets used. If your stop is 6% away at 20x, liquidation hits first. See How to Test a Stop Loss.
6. Run the same idea at lower leverage
If it only looks good at high leverage, it is mostly a leverage bet. A real pattern should still show up at 2x or 3x, just smaller. Also compare the maximum drawdown at each level.
7. Confirm it on new data
Then watch the idea forward on paper with real fees, margin rules and timestamps. See Paper Trading vs Live Trading.
Where AI fits
AI tools like ChatGPT, Claude, Grok or Cursor can write a leveraged backtest in seconds. Ask yours: did you check for liquidation? On closes or on lows? What maintenance margin did you use? What happens at half the leverage? If it can't answer, don't trust the result yet. For more checks, see How to Backtest Without Fooling Yourself.
How Pickled Lizard tests ideas like this
Pickled Lizard is an AI trading and research platform. You bring the idea, or your own AI does, and we test it the same way every time:
- Backtest on the full data set we have, with fees and next-candle timing.
- Paper forward testing on new market data, with real fees, margin rules and timestamps. The idea shows as "still collecting" while it builds a record.
- Verified only when its forward results reach 80% of its own backtest trade rate and 80% of its backtest win rate.
Results show on the public paper trading leaderboard. Pickled Lizard isn't an exchange and doesn't hold your money. It's a non-custodial aggregator that connects to your own exchange accounts. The beta is free.
Test it free at pickledlizardz.com/join
Quick recap
- Your liquidation price is where the exchange closes your leveraged trade and your margin is gone.
- Doubling leverage roughly halves the distance to it. At 20x it's only about 4.5% away (example numbers).
- In our simulation at 20x, a backtest with no check showed 89 of 100 runs net positive. Checking every 1-minute low, it was 81 of 100, with about 1 in 5 trades liquidated (simulated).
- Check liquidation on lows, count it as a full loss, keep stops inside it, and test at lower leverage too.
New here? Start with How to Test an AI Trading Strategy Before You Use Real Money.