Status of this page: P0 draft. Model-level; empirical magnitudes are quoted only where cited.
1. Why queue position matters
Under price-time priority, an order at the back of a long queue at the touch fills only after the orders ahead are executed or cancelled. Moallemi and Yuan model the value of a limit order as a function of its queue position, incorporating adverse selection and queueing dynamics, and find that queue value can be of the same order of magnitude as the bid-ask spread. Huang et al. (2019) reach a similar conclusion in an agent-based order book model. Consequence: in large-tick products, queue priority is an asset that has to be priced.2. Components of a fill model
For a passive order at the touch, the fill depends on:- Orders ahead (position in queue at submission).
- Cancellations ahead (reduce the queue without trading).
- Market orders arriving at that side before the price moves away.
- Price move (if the touch moves away, the order is no longer at the touch).
3. Adverse selection of a passive fill
Fills are not random: a bid fills more often when the price is about to fall. The conditional expected mid move after a fill is therefore negative for a buy order. Any estimate of passive-order profit must use the post-fill mid move, not the unconditional one. This is why a realised-spread calculation is a better backtest metric than quoted spread (order book and spread).4. Modelling approaches
5. Estimating queue position
- With a full order-by-order feed, reconstruct position exactly from order IDs.
- With only level-aggregated data, position is uncertain: assume a conservative rule (placed at the back) and an optimistic rule (pro-rata) and report both. A strategy that only works under the optimistic rule is not validated.
6. Backtesting implication
A naive backtest that fills a passive order when the price touches the limit price overstates fills and understates adverse selection. Use a fill model with an explicit queue assumption and a latency assumption. Detail on tick simulation and fills.Points to verify
- Whether the HKEX data feed in use carries order-level (broker queue) information or only aggregated depth.
- Priority rules for special order types (at-auction, enhanced limit) at HKEX.
Sources
- Moallemi and Yuan (2016), A Model for Queue Position Valuation in a Limit Order Book. PDF
- Huang, Pulido, Rosenbaum, Saliba and Sfendourakis (2019), From Glosten-Milgrom to the whole limit order book and applications to financial regulation. arXiv
- Maglaras, Moallemi and Zheng (2015), Optimal execution in a limit order book and an associated microstructure market impact model. PDF

