Same Bid, Different Futures
The best bid is a price.
The queue behind the best bid is a calendar.
That distinction is easy to lose because a limit order book is usually drawn as a ladder of prices and sizes:
ask 100.01 8,400 shares
bid 100.00 11,700 shares
The display says nothing about where your order sits inside the 11,700 shares. If the market has price-time priority, that hidden coordinate matters. An order at the front of the bid queue and an order at the back of the bid queue have the same displayed price, but they are not the same economic object.
The front order is exposed to ordinary sell market orders. The back order is mostly exposed to large or persistent sell waves. That is already a selection effect. Bad queue position does not only reduce fill probability. It changes which states of the world are allowed to fill you.
This is why queue position behaves like an option, but not a friendly one. You have the right to trade at the bid if the future path of the book reaches you. The path that reaches you is informative.
Your Ticket Has a Place
Suppose you place a one-unit buy limit order at the best bid. Let
\[N_t\]be the amount of bid quantity ahead of you, and let
\[A_t\]be the amount sitting at the best ask. You fill when market sells and cancellations reduce \(N_t\) to zero and the next sell market order reaches your ticket. You miss the current quote if the ask side disappears first and the mid price ticks up.
So the fill event is not:
price touched my limit
It is closer to:
my side of the book was consumed in the right order before the other side moved
That is a queueing problem. Cont, Stoikov, and Talreja made this analogy explicit by modeling limit order book dynamics as a continuous-time Markov process over queue sizes at price levels.1 Cont and de Larrard later studied a simpler Markovian limit order market where price changes are generated endogenously by depletion of the best bid or ask queues.2 The queue-reactive model of Huang, Lehalle, and Rosenbaum pushes the same idea toward richer empirical simulation: order-flow intensities depend on the current state of the book.3
Those models are not saying markets are literally memoryless machines. They are saying something more useful for thinking: over short horizons, a surprising amount of execution risk can be represented by which queue depletes first.
For a passive buy order, the basic payoff decomposition is:
\[\text{value} = P(\text{fill})\, E\left[M_{\tau+h}-P_{\text{bid}} \mid \text{fill}\right],\]where \(\tau\) is the fill time, \(M_{\tau+h}\) is a future mid price, and \(P_{\text{bid}}\) is the bid price you paid. If the future mid stays near the old midpoint, the fill earns roughly half the spread. If the mid moves down after you buy, the spread was a coupon attached to a losing state.
The conditioning is the dangerous part. A fill is evidence.
The Back Filters the Flow
Imagine there are 100 units ahead of you. A one-unit sell market order does not touch you. A two-unit sell market order does not touch you. A normal drizzle of small orders may move you forward, but it may also end before you trade. To get filled quickly from the back, you often need a large market order, a burst of cancellations, or a persistent directional wave.
That is why the back of the queue can be worse in two ways:
- You wait longer and fill less often.
- Conditional on filling, you are more likely to have traded with a state that was strong enough to eat the whole queue.
Moallemi and Yuan make this point directly in their model of queue-position valuation. They identify a static component, tied to spread earned versus adverse-selection cost at execution, and a dynamic component, tied to the value of moving forward in the queue as trades and cancellations occur.4 Their empirical message is also sharp: in some large-tick assets, queue value can be on the order of the bid-ask spread itself.
That should not be shocking. When the tick is economically large and the spread is often one tick, traders cannot cheaply jump in front by improving the price. Priority becomes the scarce asset. The market competes in time because it cannot smoothly compete in price.
Parlour’s dynamic limit order market is an early equilibrium version of the same intuition: order placement depends on the state of the book, and execution probability is endogenous.5 Glosten’s electronic open limit order book model also shows how adverse selection is built into the price schedule supplied by limit orders.6 Queue priority is where that price schedule becomes operational.
The Cancel Button Exercises the Option
The option analogy becomes clearer once you allow cancellation.
A resting order is not simply a promise to trade. It is a promise you may try to withdraw before the bad state arrives. If the bid queue becomes thin, the ask is heavy, and sell pressure accelerates, a fast participant may cancel and reinsert elsewhere. A slow participant may discover the signal only after being filled.
Lehalle and Mounjid study this exact tension: limit order placement trades off fast execution against adverse selection, and the value of using order-book imbalance is eroded by latency because prediction is less useful if you cannot cancel and reinsert in time.7
That is not a moral statement about speed. It is a mechanical statement about the payoff. A stale resting order sells optionality to faster information.
Run the Ticket Through Weather
The lab below simulates one passive buy order at the best bid. It is deliberately small, but it keeps the three ingredients that matter for the essay:
- FIFO queue position at the best bid;
- stochastic best-bid and best-ask depletion;
- persistent order-flow pressure, so fills can be informative.
The simulation tracks whether the order fills, misses an uptick, gets pulled, or times out. If it fills, the lab continues the book for a short markout window and marks the position to the future mid.
It is not a trading system. It is a microscope for the conditional event “I got filled.”
Deterministic Monte Carlo toy model. Market-order bursts consume multiple queue units when order-flow pressure is persistent. "Maker value" is future mid minus bid fill price, counted as zero if the order never fills. "Post vs cross" is the tick advantage of posting instead of immediately crossing, with missed upticks treated as opportunity cost.
With the default sliders, the selected order sits at 65% of an 80-unit bid
queue. Across 900 deterministic paths, it fills 60.6% of the time, takes
about 69 events to fill when it does, and has 29.2% adverse fills
conditional on filling. The maker markout averages about +0.33 ticks; the
post-versus-cross edge is about +0.35 ticks. In the curve panel, the front of
the queue fills around 85% with no adverse fills in this run, while the very
back fills around 36%, has about 68% adverse fills conditional on filling,
and turns slightly negative.
I also swept 2,916 parameter combinations across queue position, depths, toxicity, cancellation, pull speed, and horizon. The outcome probabilities stayed normalized and inside bounds. This is still a toy, but the toy is at least accounting for its states.
Start with the queue position near the back and raise Order-flow toxicity. The fill probability may remain respectable, but the red adverse-fill share climbs. Now increase Pull speed. Absolute adverse fills can shrink because more dangerous paths turn into blue “pulled” outcomes, even if the conditional adverse share among the remaining fills stays high. That is the option being exercised: you give up some spread capture to avoid stale execution.
The most important panel is the value curve. It separates two questions that are often mashed together:
Do I get filled?
What did the fill mean?
The first is a queueing statistic. The second is an information statistic. Queue position links them.
A Fill Is a Selection Event
Execution data often arrives as rows:
timestamp, side, price, size, venue
That is not enough to understand a passive order. For a queue-aware backtest, you need at least:
- your estimated position in the queue when the order became resting;
- trades and cancellations ahead of you;
- displayed and hidden depth changes;
- whether cancels happened ahead of or behind you;
- the state of the opposite queue;
- the short-horizon markout after fills and after missed fills.
This is where many naive simulations cheat. They assume that if the trade price touches your limit, you filled. That can turn a difficult execution problem into a fantasy generator. Touching the price is not the same as reaching your ticket.
The reverse mistake is also common: treating all non-fills as neutral. If you posted a buy order, the price moved up, and you still needed to buy, the non-fill was not neutral. It was an opportunity cost. A passive order can save the spread when it fills and lose the spread, plus more, when the market runs away.
Two Plots Before Believing It
If I were auditing a passive execution model, I would start with two plots.
First, bucket orders by predicted queue position and plot realized fill probability. The front should fill more often and faster, all else equal. If the curve is flat, the simulator probably does not understand FIFO priority.
Second, bucket by predicted queue position and plot markout conditional on fill. If the back of the queue has the same markout as the front, be suspicious. It may happen in a benign sample, but structurally the back should be more exposed to large liquidity-consuming waves. The empirical curve does not have to be monotone every day. The model should at least know why it might be.
Those two diagnostics separate the mechanical queue from the informational filter. A model that only predicts fill probability can still route orders into toxic fills. A model that only predicts short-term price moves can still miss the practical question of whether you are likely to trade before the signal is gone.
The Hard Part Is Inference
The hard version of this problem is not the toy model above. It is inference.
Real queue position is partially observed. Market data tells you displayed updates, but not every hidden order, matching-engine detail, self-match prevention rule, exchange-specific priority feature, or cancel that happened ahead of you. A serious system needs a survival model for your order:
\[P(\tau_{\text{fill}} \le t \mid \mathcal{F}_t, \widehat{N}_0),\]where \(\widehat{N}_0\) is your estimated initial queue position and \(\mathcal{F}_t\) is the event history you observed. Then it needs a conditional markout model:
\[E[M_{\tau+h}-P_{\text{fill}} \mid \tau_{\text{fill}}=\tau,\mathcal{F}_\tau].\]The product of those two objects is closer to the real value of the order than either one alone.
That suggests a useful research program:
- estimate queue survival with explicit uncertainty over hidden depth and cancellations ahead;
- model conditional markouts by queue position, imbalance, and liquidity-taking burst shape;
- evaluate policies by realized implementation shortfall, not by fill rate;
- report the value of queue priority in ticks so the strategy can compare it to fees, rebates, latency spend, and price improvement.
The point is not that every trader should obsess over microseconds. The point is that a limit order is not a static price instruction. It is a contingent object inside a queueing system.
Two orders can quote the same bid.
Only one owns the earlier future.
Paper Trail
-
Rama Cont, Sasha Stoikov, and Rishi Talreja, “A Stochastic Model for Order Book Dynamics,” Operations Research, 2010. PDF, INFORMS. ↩
-
Rama Cont and Adrien de Larrard, “Price Dynamics in a Markovian Limit Order Market,” SIAM Journal on Financial Mathematics, 2013. arXiv, SIAM. ↩
-
Weibing Huang, Charles-Albert Lehalle, and Mathieu Rosenbaum, “Simulating and Analyzing Order Book Data: The Queue-Reactive Model,” Journal of the American Statistical Association, 2015. arXiv, RePEc. ↩
-
Ciamac C. Moallemi and Kai Yuan, “A Model for Queue Position Valuation in a Limit Order Book,” initial version 2016, revised 2017. PDF, SSRN. ↩
-
Christine A. Parlour, “Price Dynamics in Limit Order Markets,” The Review of Financial Studies, 1998. Oxford Academic. ↩
-
Lawrence R. Glosten, “Is the Electronic Open Limit Order Book Inevitable?”, The Journal of Finance, 1994. Wiley, RePEc. ↩
-
Charles-Albert Lehalle and Othmane Mounjid, “Limit Order Strategic Placement with Adverse Selection Risk and the Role of Latency,” arXiv, 2018. arXiv. ↩