At 5× leverage, a $10,000 position starts with $2,000 of initial margin. A 10% adverse move is roughly $1,000 of loss before fees and funding. If the maintenance requirement is 0.5% of notional, that’s $50 at the starting size. The surprising number is the $50: it is not the amount of room the position has before liquidation.
Liquidation depends on the exchange’s margin rules and the equity available to support the position. A backtest that gets the trigger price approximately right can still report the wrong survival rate if it treats margin as a fixed deposit, ignores other positions, or assumes every dollar of collateral is worth a dollar.
Why isn’t liquidation just entry price minus maintenance margin?
For an isolated linear perpetual, a rough long-position sketch is: liquidation occurs when wallet margin plus unrealized P&L falls to the maintenance requirement, after accounting for fees and other exchange adjustments. If a trader puts up $2,000 for a $10,000 position, a 10% decline loses about $1,000. There is still about $1,000 of equity before costs, far more than the initial $50 maintenance estimate.
That estimate changes as the position changes. Maintenance may be calculated on mark price, not the last trade, and the required rate can rise when notional crosses a risk tier. The exchange may also reserve a liquidation fee. Position size, direction, contract type, and the venue’s exact tier schedule all matter.
The useful model is a solvency condition evaluated against current account state, not a universal “100 divided by leverage” liquidation formula. The simple formula can help sanity-check a toy position. It cannot stand in for the venue’s rules.
When does cross margin make a backtest’s position-level risk wrong?
With isolated margin, a position has a designated margin allocation. With cross margin, eligible account equity supports multiple positions, so the liquidation of one position can depend on losses elsewhere. That makes a position-by-position simulation misleading whenever the backtest shares collateral.
Consider two positions, each with $1,000 of unrealized loss, backed by $2,500 of available account equity. A model that evaluates each against the full $2,500 may conclude both are safe. The account has only $500 left after those losses, before fees, funding, and maintenance requirements. If one market gaps, the other position can be liquidated as the shared equity shrinks.
This is a portfolio accounting problem with a risk engine attached. The simulator needs to track wallet balance, unrealized P&L, eligible collateral, maintenance by position, and any reserved amounts together at each event.
Which margin details should a futures backtest model?
| Rule or input | Why it changes the result | Practical modeling choice |
|---|---|---|
| Isolated or cross mode | Determines which equity can absorb a position’s loss | Match the intended account mode and track collateral at that scope |
| Maintenance tiers | Required margin can rise with notional | Apply the venue’s tier schedule to current position size and mark price |
| Mark price | Liquidation may use a reference price that differs from the traded price | Use historical mark data where available; document any proxy |
| Fees and funding | Both can reduce equity while a position is open | Post each cash flow at its actual event time |
| Collateral eligibility and haircuts | Some assets contribute less than their quoted market value | Apply asset-specific valuation rules rather than counting all balances at par |
There’s a small operational wrinkle here: exchanges can change tier limits and collateral rules. A present-day rule table applied across years of historical data can create a backtest that is internally consistent and historically impossible. Store the rule version and its effective dates alongside the market data.
What happens when collateral is not the contract’s quote currency?
Suppose a dollar-margined account holds BTC as collateral. The BTC balance may be worth $10,000 at the start, but a BTC decline can reduce collateral value at the same time a short position loses money. A haircut can lower its recognized value further. The account then faces correlated losses on both sides of its margin calculation.
Counting collateral at a fixed dollar value misses that feedback. A better simulation values each eligible asset at the exchange’s reference price, applies the applicable haircut, and updates that value as the market moves. If the venue caps how much of an asset counts, include the cap too.
How do I tell whether my liquidation model is credible?
Start with a single position and reproduce a venue example or a small, controlled account replay. Check the equity calculation at entry, after a price move, after funding, and at the liquidation threshold. Then add a second position and verify that cross-margin equity changes as expected.
Keep the assumptions visible: mark-price source, maintenance schedule, fee treatment, collateral haircuts, and account mode. If historical rule data is unavailable, say which current rules you applied and where the approximation could move the result. A backtest can’t establish what an exchange would have done under every market event, especially a fast gap, but it can avoid pretending that leverage alone determines survival.
Liquidation is a property of the account at a moment in time. The chart supplies a price; the margin engine decides what that price means.
← All posts


