Sub topic 15
Basis and Funding Trades
Assume you understand spot ownership, dated futures, perpetual swaps, margin, and simple percentages. This chapter connects those ideas into two related strategies: cash-and-carry trades using dated futures, and funding trades using perpetual swaps.
Cash-and-carry with dated futures
The basis is the difference between a futures price and the spot price:
\[ \text{basis} = \text{futures price} - \text{spot price} \]
When the futures price is above spot, the market is in contango. A trader can buy the asset in the spot market and short the dated future. The spot position gains value if the asset price rises, while the short future loses approximately the same amount. At expiry, the two prices should converge, so the original futures premium becomes the trade's gross return.
Example:
- Buy 1 BTC at $60,000.
- Short a 90-day BTC future at $61,500.
- Gross basis return: $1,500, or 2.5% on $60,000.
- Simple annualized basis: \(2.5\% \times 365/90 \approx 10.14\%\).
def annualized_basis(spot, futures, days_to_expiry):
return (futures / spot - 1) * 365 / days_to_expiry
rate = annualized_basis(60000, 61500, 90)
print(f"{rate:.2%}")This estimate ignores trading fees, funding, borrowing costs, custody costs, and the possibility that the contract settles differently from your assumptions. If the futures contract is physically settled, you may deliver the spot asset. If it is cash-settled, the exchange pays the price difference instead.
Funding-rate trades with perpetuals
A perpetual swap has no expiry. It uses a funding rate, a periodic payment between long and short traders, to keep the perpetual price near its spot index.
When funding is positive, longs pay shorts. A common funding trade is therefore:
- Buy the asset in the spot market.
- Short an equal notional amount of the perpetual.
- Receive funding while the positions remain balanced.
The spot and perpetual positions largely offset price movement. The expected income comes from funding, but the rate can change or become negative. When funding is negative, the direction may reverse: short spot, when practical, and long the perpetual.
def funding_payment(qty, mark_price, funding_rate, side):
notional = qty * mark_price
payment = notional * funding_rate
return payment if side == "long" else -payment
print(funding_payment(1.0, 60000, 0.0001, "long"))
print(funding_payment(1.0, 60000, 0.0001, "short"))A positive result means the trader pays under this convention. A negative result means the trader receives.
Costs and failure modes
| Source of return | Main payment | Important risk |
|---|---|---|
| Dated-futures basis | Futures premium converges | Basis can widen before expiry |
| Positive perpetual funding | Longs pay shorts | Funding can fall or reverse |
| Both strategies | Hedged price exposure | Margin calls, fees, and venue failure |
A hedge can still be liquidated if the derivative position's margin becomes insufficient, even when the spot position has enough value to offset it economically. Keep collateral available, use matching position sizes, and compare expected return with all costs and counterparty risks.
Exercise
BTC spot is $60,000 and a 90-day future trades at $61,500. What is the simple annualized basis before costs?
Show answer
The basis is 2.5%. Annualized, it is 2.5% × 365 ÷ 90, or about 10.14%.