Sub topic 16
Managing risk with leverage
This chapter assumes you know how margin, leverage, mark price, funding and liquidation work from earlier chapters. It turns those pieces into a working routine for sizing positions and for deciding what could still hurt you.
Leverage is a setting, exposure is the risk
The leverage slider on an exchange only decides how much of your balance is locked as margin for a position. It does not tell you how much you can lose. Your risk is set by two numbers:
- Notional exposure: quantity times price.
- Effective leverage: notional divided by your total account equity, not just the margin you posted.
A trader with 10,000 USDT of equity who opens 20,000 USDT of BTC notional is at 2x effective leverage. This holds whether the slider says 3x or 50x. A higher slider setting mostly moves the liquidation price closer to the entry price. It also lets you open a larger position than your equity can safely carry.
The practical rule is to choose the loss you can accept first. Then derive the position size from that loss. Do not choose the leverage first and see what happens.
Size from the stop, not from the margin
Fixed-fractional sizing risks a set percentage of equity on each trade. You choose an entry and a stop price. The position size is the amount you are willing to lose divided by the price distance to the stop.
def size_position(equity, risk_fraction, entry, stop):
"""Quantity such that hitting the stop loses risk_fraction of equity."""
risk_amount = equity * risk_fraction
return risk_amount / abs(entry - stop)
def liquidation_price_long(entry, leverage, maintenance_margin_rate):
"""Isolated-margin linear long, ignoring fees and funding."""
return entry * (1 - 1 / leverage) / (1 - maintenance_margin_rate)
def funding_cost(notional, rate_per_8h, days):
"""Cost of holding a long while the funding rate stays constant."""
return notional * rate_per_8h * 3 * days
equity = 10_000
entry, stop = 60_000, 59_400
qty = size_position(equity, 0.02, entry, stop)
notional = qty * entry
print(round(qty, 4))
print(round(notional, 2))
print(round(notional / equity, 2))
print(round(liquidation_price_long(entry, 10, 0.005), 2))
print(round(liquidation_price_long(entry, 2, 0.005), 2))
print(round(funding_cost(notional, 0.0001, 30), 2))The output is 0.3333 BTC, 20000.0 USDT of notional, and 2.0x effective leverage. Next come two liquidation prices, 54271.36 for 10x isolated and 30150.75 for 2x. The last line is 180.0, the funding cost over 30 days.
Several points follow from these numbers:
- A 2% loss limit with a stop 1% below entry gives 2x effective leverage. A tighter stop allows a larger position. A wider stop forces a smaller one.
- At 10x isolated, the liquidation price is about 9.5% below entry. The stop at 59,400 is far above it. This is the order you want, because the stop should trigger well before liquidation.
- Funding is a small daily cost, 6 USDT per day here. It is still 180 USDT over 30 days, which is 90% of the 200 USDT you planned to risk on the trade.
A pre-trade checklist
The loop between the sizing and liquidation checks is intentional. If the buffer is too thin, the fix is a smaller position or more margin. Do not move the stop closer to the liquidation price.
Margin mode changes the failure path
Isolated and cross margin fail in different ways:
- Isolated margin limits the loss to the margin assigned to that position. The cost is that the position can be liquidated while the rest of your account sits idle.
- Cross margin shares the whole balance across positions. The liquidation price is far away, but one bad position can use up collateral that backs your other positions.
Cross margin does not remove risk. It spreads one risk across all your positions. Isolated margin is a better default for a single speculative position. You can top up the margin by hand if you choose to defend it.
Where the risk sits
| Risk | How it hurts | Main control |
|---|---|---|
| Liquidation | Position closed by force at an unfavorable price, with fees and sometimes a penalty | Stop above liquidation price, low effective leverage |
| Gaps and slippage | Price jumps through your stop and you fill much worse | Size for the worse fill, trade liquid contracts |
| Funding cost | Slow bleed on a crowded side while the rate stays high | Check the rate before entry, limit holding time |
| Mark price divergence | Liquidation triggered by mark price while the last traded price looks fine | Watch mark price and the index, not only the chart |
| Auto-deleveraging | Profitable position reduced when the insurance fund is depleted | Lower leverage on profits, watch the ADL indicator |
| Counterparty and collateral | Exchange insolvency, withdrawal freezes, or a collateral coin losing value | Limit balance held on the venue, prefer stable collateral |
Two of these errors are common among intermediate traders. The first is treating the stop as a guarantee. Stop orders on a fast market can fill far from the trigger, and a stop-market order does nothing if the venue is down. Assume the realized loss can exceed the planned one, and keep a margin of safety. The second is holding volatile collateral. If you post BTC as margin on a short BTC position, the margin falls in value just as the loss grows. Stablecoin collateral avoids that, but it adds the risk of the stablecoin itself.
Hedged positions are not riskless
A cash-and-carry trade holds spot and a short future or perpetual against it. Price risk largely cancels, but several risks remain:
- The short leg still has a liquidation price. A sharp rally can liquidate it even though the spot leg gains the same amount, because the gain is not available as margin on the derivatives venue. Keep spare collateral for the short leg.
- Funding can turn negative, so the carry becomes a cost.
- Both legs sit on counterparties, and moving collateral between venues takes time.
Treat the hedge as a trade with its own limits. Size it by the margin you can add under a large price move, not by the expected yield.
Monitoring and rules that hold up under stress
A few habits turn the checklist into routine:
- Write the stop and the maximum acceptable loss before you enter, and do not widen the stop afterward.
- Keep total effective leverage across all positions below a number you set in advance. A cap near 2x to 3x is common for a discretionary trader.
- Keep a reserve of free collateral, so a margin call does not force you to close at the worst moment.
- Reduce size when volatility rises. The same stop distance in percent hits more often in a volatile market.
- Review funding costs and realized slippage weekly, and compare them with your assumptions.
Exercise
You have 5,000 USDT of equity and risk 1% per trade. You plan to go long ETH at 2,000 with a stop at 1,900. What quantity do you trade, what is your notional, and what is your effective leverage? Is a 25x isolated setting needed?
Show answer
The risk amount is 5,000 × 0.01 = 50 USDT. The stop distance is 100, so the quantity is 50 / 100 = 0.5 ETH. The notional is 0.5 × 2,000 = 1,000 USDT, and effective leverage is 1,000 / 5,000 = 0.2x. The position needs no leverage at all, since 1,000 USDT of notional is fully covered by your equity. A 25x setting would put liquidation only about 4% below entry, which would be much closer than the 5% stop distance, so you should not use it.
Exercise
A trader is long 20,000 USDT of notional at a funding rate of 0.03% per 8 hours. What does funding cost per day, and how long until it equals a 200 USDT loss limit if the rate stays constant?
Show answer
Funding per 8 hours is 20,000 × 0.0003 = 6 USDT. There are three funding times per day, so the cost is 18 USDT per day. The cost reaches 200 USDT after 200 / 18, about 11.1 days. At this rate, a position held for two weeks pays more in funding than the planned stop-loss.