No history yet

Order Book Dynamics

The Living Ledger

The Limit Order Book, or LOB, is more than just a list of buy and sell orders. It's a dynamic, living ledger that captures the collective sentiment of the market in real-time. While you're familiar with the bid-ask spread, we're now going deeper into the microstructure—the high-frequency interactions that drive price changes second by second.

At its core, the LOB is a battlefield between two types of orders. Limit orders are passive participants; they add liquidity by stating a price at which a trader is willing to buy or sell. They wait patiently on the books. Market orders are the aggressors; they consume liquidity by executing immediately at the best available price, crossing the spread to make a trade happen now.

How the Book Changes

Every trade is a state transition for the LOB. Imagine the book for a stock, with the best bid at $100.00 and the best ask at $100.05. The spread is five cents.

  1. A market buy order arrives. A trader wants 200 shares immediately. They hit the ask at $100.05. If there are 500 shares available at that price, the order is filled, and the quantity at that price level drops to 300 shares.
  2. Liquidity is consumed. If the market buy order was for 600 shares, it would consume all 500 shares at $100.05 and then move to the next price level, say $100.06, to fill the remaining 100 shares. The best ask is now $100.06, and the spread has widened.
  3. Liquidity is added. A new seller, seeing the wider spread, might place a limit order to sell at $100.05. This adds liquidity back into the book and narrows the spread again.

This constant dance of consuming and replenishing liquidity is the mechanism of price discovery, where the market collectively agrees on an asset's value from one moment to the next.

The diagram above illustrates how a single market order consumes liquidity across multiple price levels, causing a permanent change in the state of the order book and a new best ask price.

The Pulse of the Market

To model these dynamics, we need to quantify how often orders arrive. This is called the order arrival intensity, often represented by the Greek letter lambda (λλ). For example, λbλ_b might represent the arrival rate of buy limit orders, while λmλ_m could be the arrival rate of market orders.

These arrival rates are not static. They spike during major news events, follow predictable patterns based on the time of day (higher at market open and close), and increase with volatility. Algorithmic trading strategies don't just react to prices; they try to predict these shifts in λλ to anticipate market movements.

Just as important is the probability of a limit order being filled. An order placed far from the current price is unlikely to execute. We can model this decay in fill probability using a parameter, kappa (κκ), which relates the likelihood of a fill to the order's distance from the mid-price. A higher κκ means the probability drops off more sharply as you move away from the spread.

P(fill)eκdP(\text{fill}) \approx e^{-\kappa \cdot d}

Beyond the Mid-Price

Traders often look at the mid-price, the simple average of the best bid and ask, as a quick gauge of an asset's value. However, this can be misleading. If there are 10,000 shares offered at the ask and only 100 shares at the bid, the buying and selling pressure are far from equal. The mid-price ignores this imbalance.

A more sophisticated measure is the micro-price. It's a weighted average of the best bid and ask, adjusted for the volume (or

Lesson image

depth) available at each price. The micro-price gives a more accurate snapshot of the true price by accounting for the immediate supply and demand imbalance in the LOB.

Pmicro=VbPa+VaPbVb+VaP_{\text{micro}} = \frac{V_b \cdot P_a + V_a \cdot P_b}{V_b + V_a}

Understanding these granular dynamics is the first step toward building effective market-making algorithms. By modeling order arrivals and understanding the true pressure points in the LOB, a strategy can more intelligently place its own orders to profit from the spread while managing risk.

Quiz Questions 1/5

What is the primary role of a market order in the context of a Limit Order Book (LOB)?

Quiz Questions 2/5

A stock's order book has a best ask of $50.25 with 500 shares available. A market buy order for 800 shares arrives. What is the most likely immediate outcome?

Let's test your knowledge of order book dynamics.