Sub topic 7
Slippage: Why You May Not Get the Quoted Price
Prerequisites
Assume you can read a stock quote and know the difference between a market order and a limit order. Slippage is the difference between the price you expect and the price at which your order actually executes.
The quoted price is not always a promise. A quote usually shows the best available bid and ask at one moment. The last price is the price of the most recent trade. A market order may execute at several prices after the quote changes.
How slippage happens
Suppose a stock has this quote:
| Item | Price | Available shares |
|---|---|---|
| Best bid | $49.98 | 300 |
| Best ask | $50.02 | 100 |
| Last price | $50.00 | — |
A market buy for 20 shares can probably execute near the $50.02 ask. It cannot normally buy at the $50.00 last price unless a seller is currently offering that price. The difference between the expected reference price and the execution price is slippage.
A larger order can consume several price levels in the order book, which is the list of available buy and sell orders. For example, a buy for 400 shares might use all of the following asks:
The average execution price is higher than the initial ask because the order used the cheaper shares first. This is market impact, a type of slippage caused by your order moving through available liquidity. Liquidity means how much can be traded near the current price.
def fill_buy(asks, qty, limit=None):
filled, cost = 0, 0.0
for price, size in sorted(asks):
if limit is not None and price > limit:
break
take = min(size, qty - filled)
filled += take
cost += take * price
if filled == qty:
break
return filled, cost / filled if filled else None
asks = [(50.02, 100), (50.05, 200), (50.10, 500)]
print(fill_buy(asks, 400)) # (400, 50.055)
print(fill_buy(asks, 400, limit=50.05)) # (300, 50.04)The limit order avoids paying above $50.05, but only 300 shares fill. The remaining 100 shares stay unfilled unless more sellers appear at or below the limit.
When slippage is more likely
Slippage tends to increase when:
- The stock has a wide bid-ask spread.
- Your order is large compared with displayed depth.
- Prices move quickly after news.
- Trading volume is low.
- You trade outside regular market hours.
- The quote is delayed or changes before your broker routes the order.
Slippage can also be favorable. A market buy might receive a lower price if new sell orders arrive, although you should not depend on that outcome.
Reducing avoidable slippage
Check the current bid, ask, spread, and available size before submitting. For a small order in a liquid stock, a market order may be reasonable when immediate execution matters. For a thinly traded stock or a larger order, consider a limit price that reflects the most you are willing to pay or the least you are willing to receive.
Exercise
The ask is $20.10 for 50 shares, and the next ask is $20.20 for 200 shares. What might happen to a market buy for 100 shares?
Show answer
It may fill 50 shares at $20.10 and 50 at $20.20, producing an average price of $20.15 before fees.