Order Book Dynamics¶
Difficulty advanced
Overview¶
The order book is the central mechanism of price discovery in modern electronic markets. Understanding its dynamics is essential for execution quality and short-term alpha.
Order Book Structure¶
┌──────────────────────────────────────────┐
│ ASKS (Sell Orders) - Price Ascending │
├────────────┬────────────┬────────────────┤
│ Price │ Quantity │ Orders │
├────────────┼────────────┼────────────────┤
│ 150.15 │ 200 │ 3 │
│ 150.12 │ 500 │ 7 │
│ 150.10 │ 800 │ 12 │
│ 150.08 │ 300 │ 5 │
│ 150.05 │ 1000 │ 15 │
│ 150.03 │ 400 │ 8 ← Best Ask│
├────────────┴────────────┴────────────────┤
│ SPREAD: $0.01 │
├────────────┬────────────┬────────────────┤
│ Price │ Quantity │ Orders │
├────────────┼────────────┼────────────────┤
│ 150.02 │ 800 │ 10 ← Best Bid │
│ 150.00 │ 1500 │ 20 │
│ 149.98 │ 600 │ 8 │
│ 149.95 │ 2000 │ 25 │
│ 149.92 │ 1200 │ 15 │
│ 149.90 │ 900 │ 12 │
├────────────┴────────────┴────────────────┤
│ BIDS (Buy Orders) - Price Descending │
└──────────────────────────────────────────┘
Order Book Events¶
Order Arrival¶
New limit order added to the book at a specific price level.
Order Execution¶
Market order matches against resting limit order(s).
Order Cancellation¶
Existing order removed from the book.
Order Modification¶
Order quantity or price changed.
Order Flow Imbalance¶
Predictive Power¶
OFI (Order Flow Imbalance) predicts short-term price changes:
where:
ΔP_{t+1}next-period price change ·OFI_torder-flow imbalance over the current window (Δbid-size − Δask-size, net of cancels) ·αregression slope ·ε_tresidual. does: turns book changes into a short-horizon directional signal. Used as both a market-making skew input and a stand-alone alpha at the millisecond-to-second horizon.
Market Impact Models¶
Linear Impact¶
where:
Impactprice displacement caused by the trade ·ηlinear impact coefficient (~0.1-1.0) ·Order Sizeshares to execute ·ADVaverage daily volume. does: rough first-order cost estimate for small orders. Used in pre-trade TCA — empirically too steep for orders > 1% ADV; switch to the square-root model.
Square Root Impact (Almgren-Chriss)¶
where:
Impactexpected price move from execution ·σdaily volatility ·Ymarket-specific impact constant ·Order Size / ADVparticipation rate. does: empirical regularity across asset classes — impact scales with √(participation), not linearly. Drives execution-algo schedules: split a large order across enough time so participation stays in the regime where this estimate holds.
Temporary vs. Permanent Impact¶
Total Impact = Temporary + Permanent
Temporary: Reverts after trade completes (spread cost, liquidity)
Permanent: Stays (information content of trade)
where:
Total Impactobserved price move from trading ·Temporaryreverts after the order finishes ·Permanentprice discovery from information leakage. does: distinguishes liquidity cost (temporary) from information cost (permanent). Used in TCA and impact-model calibration — execution algos can reduce temporary impact by going slower, but only stealth (icebergs, dark) reduces permanent.
Queue Position¶
Price-Time Priority¶
At each price level, orders are filled FIFO (first in, first out).
Order Book Metrics¶
Microprice¶
Microprice = (BidPrice × AskSize + AskPrice × BidSize) / (BidSize + AskSize)
Weighted average of bid and ask, weighted by size
Better predictor of next price move than midpoint
where:
BidPrice,AskPricetop-of-book quotes ·BidSize,AskSizetop-of-book quantities. does: size-weighted fair value — leans toward the thicker side because that side is harder to consume. Used as the fair-value reference in market-making models and as a short-horizon directional signal.
Key Insights¶
- Order Book Is Dynamic — Changes in milliseconds
- Queue Position Matters — Being first in queue = better fills
- Hidden Liquidity — Not all liquidity is visible
- Information Content — Order flow contains information about future prices
- Impact Is Real — Large orders move the market
- Speed Is an Edge — Latency arbitrage is real (and controversial)
Next Steps¶
- High-Frequency Data — Tick-level analysis
- Latency Arbitrage — Speed-based strategies
- Dark Pools — Hidden liquidity venues