depth

Book walk

The order book is:

SidePriceSize
Bid100.0500
Bid99.9300
Ask100.1200
Ask100.2400

A market buy for 600 arrives. What is the average fill price, and the slippage versus the mid price?

Hint

Fill the best ask first, then the next level.

Solution

Fills: 200 at 100.1 and 400 at 100.2.

avg=200⋅100.1+400⋅100.2600=100.16‾\text{avg} = \frac{200 \cdot 100.1 + 400 \cdot 100.2}{600} = 100.1\overline{6}

The mid is (100.0+100.1)/2=100.05(100.0 + 100.1)/2 = 100.05, so slippage is about 0.1170.117.

Answer

Average fill ≈100.167\approx 100.167, slippage ≈0.117\approx 0.117.