Quant Memo
Advanced

The Queue-Reactive Model

Instead of treating order flow as constant over time, the queue-reactive model makes arrival and cancellation rates depend on the current queue size — a small change that makes simulated books look like real ones.

Prerequisites: Order Arrival And Cancellation Intensities

Early book simulators assumed order flow arrives at a fixed rate no matter what the book looks like — a constant λ\lambda orders per second, always. Real books don't behave that way: a queue with 3,000 shares resting attracts and loses orders at very different rates than one with 30. The queue-reactive model builds that dependency in directly: every rate — new limit orders, cancellations, market orders — is a function f(Q)f(Q) of the current size of the queue it acts on, estimated straight from data rather than assumed.

How it's fit and used, worked through

Take historical data for the best-bid queue and bucket every observed state by its size QQ. For each bucket, measure the empirical rate of each event type. Suppose the fitted rates come out roughly as:

Queue size QQArrival rate λ(Q)\lambda(Q)Cancel rate μ(Q)\mu(Q)
1006/s0.5/s
1,0009/s3/s
5,00010/s9/s

Two things jump out. Arrivals rise modestly with queue size — a deep queue signals a popular, stable price, which itself attracts more orders. Cancellations rise much faster — more resting orders simply means more of them get pulled. At Q=5,000Q=5{,}000 the cancel rate has nearly caught up to the arrival rate, which is exactly the self-correcting behaviour real books show: very large queues don't grow without bound, because their own cancellation pressure pushes back.

To simulate forward from Q=1,000Q = 1{,}000: draw the next event from a mix weighted by λ(1000)=9\lambda(1000)=9, μ(1000)=3\mu(1000)=3, and the market-order execution rate at that state, then update QQ accordingly and re-look-up the rates for the new QQ before drawing the next event. The queue's own trajectory continuously changes the rates governing it — this feedback loop is the entire point of the model, and it's what's missing from a constant-rate simulator.

queue size Q rates λ(Q), μ(Q), θ(Q) looked up from data draw next event, update Q feeds back
Rates depend on the queue's own current size, and each simulated event changes that size — the loop is what makes the model self-regulating.

Rates as functions of queue state, not constants — a queue-reactive model lets deep queues correct themselves through rising cancellations, which is why simulated books from it look statistically like real ones rather than growing or emptying without bound.

Where it's used. It's the workhorse for realistic order-book simulation: backtesting an execution or market-making strategy against a queue-reactive replay produces far more believable fill probabilities and impact than a Poisson-constant-rate model, because the simulated book actually reacts to being traded against, the same way a real one does. It's a direct input to Agent-Based Market Simulation and to fill-probability estimation for resting limit orders.

The model is fit on one queue's own state, treating other queues and the rest of the book as background — it doesn't capture cross-queue effects, like a large sell order at the touch making cancellations at levels behind it more likely too. Multi-queue extensions exist but add considerable estimation complexity.

Related concepts

Practice in interviews

Further reading

  • Huang, Lehalle & Rosenbaum (2015), Simulating and Analyzing Order Book Data: The Queue-Reactive Model
ShareTwitterLinkedIn