Basic Prerequisites: 04 · Matching & Priority and 05 · Failure Modes.


1. Intuition & Practical Objective

Pages 01–05 treated the book mechanically: a state and a deterministic engine. This page treats it probabilistically - as a stochastic process whose statistics can be modelled, calibrated, and used to forecast. The objective is to place the four canonical modelling families on one map and show what each buys you, so you can choose the right level of abstraction for a task:

FamilyCore ideaBuys youCosts you
Zero-intelligence (ZI)random arrivals, no strategya null model: how much price formation is mechanicalignores informed flow entirely
Markovian / queueingMarkov chain in queue sizes, rates by distancetractable spread/spread-depth distributionsstrong Markov assumption
Queue-reactivetouch queues mean-revert to empirical targetsrealistic short-horizon price-move probabilitiesneeds rich calibration
OFI / micro-priceprice change order-flow imbalancea stable, tradeable impact lawnon-stationary under spoofing

The one-sentence essence. “The order book is a Markov-modulated queueing system whose shape is largely mechanical (zero-intelligence reproduces the spread), while its dynamics carry the information - and the single most useful dynamic law is that the mid-price moves linearly in order-flow imbalance.”


2. Mathematical Ground Truth & Derivations

2.1 The Markovian queueing model (Cont, Stoikov & Talreja 2010). Represent the book as queue sizes at price levels on both sides. The process is a continuous-time Markov chain driven by three event types, with intensities that depend on the level’s distance from the touch:

Because the intensities are functions of distance rather than absolute price, the chain is (approximately) translation-invariant, and one can solve for the joint distribution of the spread, the next price move, and the book’s depth. The empirical anchor - that deposit/cancel rates are nearly flat in distance (Bouchaud, Mézard & Potters 2002) - is what makes the model tractable and the book approximately “linear in distance” away from the touch.

2.2 Order Flow Imbalance and the price-impact law (Cont, Kukanov & Stoikov 2014). Define the per-event bid/ask contribution

with the slope inversely proportional to depth - the deeper the book, the smaller the price move per unit of imbalance. Cont et al. document an almost perfect linear fit empirically; OFI is the pillar’s core micro-price signal (LOB Mechanics & L3 Data). The size-weighted touch, the microprice

is the static counterpart of the same idea: it prices the weights, not the level.

2.3 Queue-reactive dynamics (Huang, Lehalle & Rosenbaum). The refined short-horizon model: at the touch, queue sizes are mean-reverting to empirical, state-dependent targets ; price changes occur when a touch queue is depleted or improves. This reproduces the empirical fact that imbalance at the touch forecasts the next move - which is exactly what a market maker monetises. The transition probability takes the form

rising with bid-heavy and ask-light queues.

2.4 Self-exciting (Hawkes) order flow. Trade and cancel arrivals cluster in time. A Hawkes process captures this:

where is the branching ratio (the average number of offspring events per event). means near-critical, clustered flow; estimated empirically is high and time-varying, which is why volatility clusters and why impact estimates drift. This is the natural bridge to Toxic Order Flow & VPIN and to market-impact models.


3. Computational Implementation - a zero-intelligence book, and OFI in it

The classic result (Smith, Farmer, Gillemot & Krishnamurthy 2003) is that even a market with zero strategic intelligence produces a positive spread and a sensible depth: those are mechanical consequences of random arrival. We simulate such a book, then recover the OFI impact law from its event stream. Standard library only.

Two results, both load-bearing. First: a book assembled entirely from coin flips sustains a positive spread of ~4 ticks and a stable depth (~11.5 lots) - so depth and spread are mechanical, not evidence of strategy. Second: even here, is linearly explained by OFI with , and the slope falls from to when the book is deepened - the inverse-depth relation of §2.2 recovered from a synthetic book. Real markets sharpen this fit to near-perfect (Cont et al.), because informed and correlated flow adds signal on top of the mechanical baseline; zero-intelligence has only the baseline.


4. Failure Modes & First-Principles Breakdowns

  1. The null model is not the model. ZI reproduces the spread and a rough OFI slope, but it cannot price information: it has no informed traders, so it cannot generate the permanent impact or the toxicity that dominate real market-maker P&L. Using ZI dynamics as a trading model confuses a mechanical baseline for a forecast.
  2. Markov assumption vs long memory. The queueing models assume the state is Markov in the queue sizes. Real order flow is self-exciting (Hawkes) with long-memory clustering, so intensities estimated in one regime under-predict activity in the next. The branching ratio approaching 1 is a warning, not a constant.
  3. OFI is not stationary under manipulation. The OFI impact law is stable on average but is a function of the book - and the book is gameable. Spoofing layers inflate “depth”, suppressing measured ; cancellation bursts in the moment of impact distort the OFI input. The law holds cleanly only on executed, non-spoofed flow.
  4. Parameters drift faster than you can calibrate. Deposit/cancel/impact rates shift with volatility regime, tick size, and venue rules. A queue-reactive or OFI model calibrated on a calm month is mis-specified, not merely stale, in a crisis - the exact failure of the Avellaneda–Stoikov family too (The Avellaneda–Stoikov Model).
  5. Grid/discretisation artefacts. Every result above lives on a tick grid . Tick-size changes, sub-penny venues, and hidden liquidity break the “one queue per price” abstraction, and the book becomes a hidden queueing system that no model in this page observes directly.

5. References

  • Cont, Stoikov & Talreja (2010), A stochastic model for order book dynamics, Operations Research 58(3), 549–563
  • Cont, Kukanov & Stoikov (2014), The price impact of order book events, Journal of Financial Econometrics 12(1), 47–88
  • Smith, Farmer, Gillemot & Krishnamurthy (2003), Statistical theory of the continuous double auction, Quantitative Finance 3(6), 481–514
  • Huang, Lehalle & Rosenbaum (2015), Simulating and analysing the queue-reactive model, Journal of Statistical Mechanics
  • Bouchaud, Mézard & Potters (2002), Statistical properties of stock order books, Quantitative Finance 2(4), 251–256
  • Bouchaud, Farmer & Lillo (2009), How markets slowly digest changes in supply and demand
  • Rosu (2009), A dynamic model of the limit order book, Review of Financial Studies 22(11)
  • Gould, Porter, Williams, McDonald, Fenn & Howison (2013), Limit order books, Quantitative Finance 13(11)

6. Connected Graph Bridges