Basic Prerequisites: 04 · Queue-Reactive Models and 05 · Failure Modes & Practice.
1. Intuition & Practical Objective
The queue view scales up. This page is the launchpad for the extensions that turn a single-queue fill model into a live trading system:
- The Cont–Kukanov fill function - the exact expected-fill formula for a random outflow, and how fill ratio collapses with queue position.
- Multi-venue overbooking - why posting more than you need across several venues is optimal, and how diversification kills non-execution risk.
- Queue-reactive intensities - making state-dependent (the Huang–Lehalle–Rosenbaum model).
- Order-flow-imbalance (OFI) price impact - the linear law that links fills to price moves.
Each is one honest step past the tractable core. Everything farther (Hawkes self-exciting arrivals, queue-reactive market making, cross-venue routing under fees) is linked from here.
2. Mathematical Ground Truth & Derivations
2.1 Cont–Kukanov fill function and the value of being early
For queue position ahead, order size , and random outflow ,
The fill ratio is maximised by small (be at the front). For an exponential(mean ) outflow there is a closed form: with ,
2.2 Optimal multi-venue overbooking
With venues, queue positions ahead, and the same limit price, total bought is
where is the market-order catch-up at the horizon. Because the are imperfectly correlated, posting on each of several venues (“overbooking”) and cancelling the unused rest drives non-execution risk down faster than it raises impact - the fills are a diversified portfolio. This is the optimal-placement insight of Cont–Kukanov (2017): size is determined jointly by queue position and the correlation of outflows across venues.
2.3 Queue-reactive intensities
Replace constants by functions of the current size: market-order intensity and limit-order intensity , both empirically increasing and concave (saturating) in . The generator becomes state-dependent and the ergodic distribution is solvable numerically. The concave shape is the quantitative statement of “liquidity begets liquidity”: thin books attract refills, deep books attract aggressive flow.
2.4 OFI price impact (Cont–Kukanov–Stoikov 2014)
Define the order-flow imbalance at the best quotes over an interval as the signed change in best-queue sizes:
Over short intervals,
a linear relation whose slope is inversely proportional to market depth, robust across time scales and stocks. Combined with a scaling argument it implies the empirical square-root relation between price change and traded volume. OFI is the single variable that ties queue dynamics to price - the empirical bridge between this folder and the market-impact literature.
3. Computational Implementation - fill ratio, overbooking, OFI
Stdlib + numpy. We compute the CK fill ratio from Monte Carlo, show multi-venue overbooking slashing non-execution risk, tabulate a concave reactive intensity, and fit the OFI price-impact slope.
Three lessons in the numbers. (i) Queue position is a fill-ratio tax: moving from the front (, ratio ) to behind 3,000 shares (, ratio ) cuts the fill ratio by nearly two-thirds. (ii) Overbooking buys execution insurance cheaply: two venues take non-execution from to , four venues to - the diversification of imperfectly correlated outflows. (iii) The OFI regression recovers the theoretical slope to five digits with an honest - queue/flow imbalance is the linear driver of short-horizon price change.
4. Failure Modes & First-Principles Breakdowns
- Ignoring outflow correlation across venues. Overbooking only diversifies when are imperfectly correlated. On venues with the same taker base (or during a market-wide sweep) the fills co-move and the diversification benefit vanishes exactly when you need it.
- OFI is an aggregate, not a queue. prices average impact; it is blind to your queue position. Using a single to size a passive edge double-counts price impact that your position may never experience (or misses impact your fills do incur).
- Reactive intensity mis-specification. The concave is an empirical shape, not a law; on venues with different tick sizes / fee structures the curvature differs. Calibrating on the wrong venue’s shape biases the fill forecast.
- Static overbooking. The optimal depends on the live queue positions and the remaining time - a static split is stale within seconds. Production systems re-optimise continuously.
- Fees and rebates dominate at the margin. can flip sign across venues (maker-taker vs inverted); the queue-optimal placement is wrong if the fee term is dropped. This is a first-order cost, not a rounding error.
5. References
- Cont, Rama; Kukanov, Arseniy - “Optimal order placement in limit order markets,” Quantitative Finance 17(4), 553–571 (2017)
- Cont, Rama; Kukanov, Arseniy; Stoikov, Sasha - “The price impact of order book events,” J. Financial Markets 17, 47–88 (2014)
- Huang, Lehalle & Rosenbaum - “Simulating and analyzing order book data: the queue-reactive model,” JASA 110(509), 107–122 (2015)
- Rosu (2009)
- Cartea, Jaimungal & Penalva - Algorithmic and High-Frequency Trading (2015)
- Gueant - The Financial Mathematics of Market Liquidity (2016)
6. Connected Graph Bridges
- Back: 05 · Failure Modes & Practice · Index Hub
- Sibling in-pillar: Optimal Execution & Almgren–Chriss · Market Microstructure & Order Types
- Impact & market-making: Market Impact & Depth · Avellaneda–Stoikov & Optimal Quoting
- Routing/fees: Execution Algorithms: VWAP, TWAP, POV