Sub topic 5
The Bid-Ask Spread
Assume you know what an exchange order book is and understand percentages and basis points. A basis point, or bp, is 0.01%, so 100 bp equals 1%. This chapter uses those ideas to measure the cost of trading immediately.
What the Spread Measures
An order book lists waiting buy and sell orders.
- The best bid is the highest price someone currently offers to pay.
- The best ask is the lowest price someone currently accepts to sell.
- The bid-ask spread is the difference between those two prices.
Suppose an order book shows:
| Price | Available amount | Side |
|---|---|---|
| $99.80 | 4.0 coins | Best bid |
| $100.00 | 2.0 coins | Best ask |
The spread is:
$100.00 - $99.80 = $0.20The dollar difference is useful, but comparing spreads across assets is easier in basis points. The usual reference is the midpoint, or mid-price:
mid-price = (best bid + best ask) / 2
spread in bps = (best ask - best bid) / mid-price × 10,000Here, the midpoint is $99.90. The spread is about 20.0 bp, or 0.20% of the midpoint.
best_bid, best_ask = 99.8, 100.0
mid = (best_bid + best_ask) / 2
spread_bps = (best_ask - best_bid) / mid * 10_000
print(f"Mid-price: ${mid:.2f}")
print(f"Spread: {spread_bps:.1f} bps")A narrow spread usually indicates that buyers and sellers are close together. A wide spread can indicate low liquidity, high volatility, an unusual asset, or a trading venue with fewer participants.
The Spread as a Trading Cost
If you buy immediately at the ask and then sell immediately at the bid, the market price must move before you break even. Ignoring exchange fees and price changes, you buy at $100.00 and sell at $99.80. The difference is $0.20 per coin.
Relative to the midpoint, this round trip costs approximately the full spread, or 20 bp. Each one-way trade is roughly half the spread away from the midpoint:
- Immediate buy: about 10 bp above the midpoint.
- Immediate sell: about 10 bp below the midpoint.
- Buy followed by immediate sell: about 20 bp.
This estimate assumes that enough quantity exists at the displayed best prices. That assumption often fails for larger orders.
Common Errors
Confusing the spread with the exchange fee
The spread belongs to the market price. The exchange may also charge a trading fee. A trade can have a low advertised fee but still be expensive when the spread is wide.
Using the wrong price reference
A spread of $0.20 means different things for a $10 asset and a $10,000 asset. Use basis points or a percentage when comparing markets.
Treating the displayed spread as guaranteed
Orders at the best bid or ask can disappear before your order executes. The book can also be too shallow for your order, causing additional price impact called slippage.
Exercise
An asset has a best bid of $24.90 and a best ask of $25.10. What are the midpoint and spread in basis points, rounded to one decimal place?
Show answer
The midpoint is $25.00. The spread is $0.20 / $25.00 × 10,000 = 80.0 bp.