Sub topic 1
Margin and leverage: controlling more than you deposit
Prerequisites
This chapter assumes you can calculate percentages and understand long and short positions. A long position gains when the asset price rises. A short position gains when it falls. You should also know that a crypto exchange can require collateral before allowing you to trade a position.
The basic working model
Margin is the collateral you deposit to support a trade. Leverage is the ratio between the position's total value and your own margin.
For example, depositing $1,000 with 5x leverage lets you control a position worth $5,000:
- Margin: $1,000
- Leverage: 5x
- Position value: $5,000
The borrowed or synthetic exposure does not remove the market risk. If the position moves against you, the loss is calculated from the full $5,000 position, not only from the $1,000 margin.
The basic relationship is:
position value = margin × leverage
Equivalently:
margin = position value ÷ leverage
A 10x position requires about 10% of its position value as initial margin, before fees and other exchange requirements.
How leverage amplifies profit and loss
Suppose you open a $5,000 long position using $1,000 of margin. If the asset rises by 5%, your position earns:
$5,000 × 0.05 = $250
That is a 25% return on your $1,000 margin. If the asset falls by 5%, you lose $250, or 25% of your margin.
Ignoring fees, funding, and liquidation rules, the return on your own margin is approximately:
margin return = leverage × asset price change
| Leverage | Asset move | Approximate return on margin |
|---|---|---|
| 1x | +5% | +5% |
| 5x | +5% | +25% |
| 10x | -5% | -50% |
| 20x | -5% | -100% |
This multiplication works in both directions. Leverage does not create an advantage by itself. It increases the size of every percentage gain and loss relative to the collateral you supplied.
def equity_return(leverage, price_move):
"""Return on margin, ignoring fees, funding, and liquidation."""
return leverage * price_move
for leverage in (1, 5, 10):
gain = equity_return(leverage, 0.05)
loss = equity_return(leverage, -0.05)
print(f"{leverage}x: gain {gain:.0%}, loss {loss:.0%}")Why the exchange can close the position
An exchange cannot allow losses to continue indefinitely after your margin is nearly exhausted. It sets a minimum collateral requirement called maintenance margin. Maintenance margin is the minimum equity needed to keep a leveraged position open.
Equity is the margin plus the position's unrealized profit or loss. Unrealized means the result has not been finalized by closing the position.
When equity falls to the maintenance requirement, the exchange's liquidation system may close the position automatically. Liquidation therefore happens before the position's loss is always exactly 100% of the original margin. Trading fees, funding payments, price gaps, and exchange-specific rules affect the result.
A visual model
Exercise
Exercise
You deposit $800 and open a 10x long position. What is the approximate profit or loss on your margin if the asset moves 3% against you, ignoring fees and funding?
Show answer
The position is worth $8,000. A 3% fall creates a $240 loss, which is a 30% loss on the $800 margin.