Estimating Limit Order Queue Position and Cancellation Dynamics
Summary
The note addresses whether a trader can tell, from a decrease in displayed depth without a trade, if cancellations occurred ahead of or behind their order in an order-based limit order book. With aggregate depth data alone, the answer is to estimate the dynamics empirically rather than infer each cancellation's location directly.
It defines the probability of a cancellation occurring ahead as a function of an order's position in the queue. Boundary cases are known: a newly joined order has all displayed quantity ahead, while an order at the front has none. A uniform cancellation model provides a simple starting point, which can be updated as observed fills provide evidence. The response also notes that cancellations may be more common behind an order, with behavior changing during market dislocations. Market-by-order feeds can expose order-level queue composition, while aggregated feeds generally cannot; feed availability and quality therefore limit the approach.
Key ideas
- Aggregate depth decreases do not reveal whether a particular cancellation occurred ahead of or behind an order.
- A queue-position model can estimate the probability of an ahead-of-order cancellation based on relative position.
- Uniform cancellation through the queue is a simple prior that can be updated using observed fill outcomes.
- Cancellation behavior may depend on order location and market conditions.
- Market-by-order data can provide explicit order-level queue composition when available.
Tags
Full text
# Modelling queue position # Modelling queue position Is there any viable way for me to know the dynamics of my LOB position? Lets suppose the LOB is order based LOB, and i send a order to this level, can i know if the qty in front of me cancelled vs whether the qty was from behind my order. Lets suppose no trade has happened and this total qty at this level decreases. Thanks ## Answer by databento (score 10, accepted) https://quant.stackexchange.com/a/65722 No, you have to build your model empirically with data. Suppose $p(x)$ denotes the probability of cancel in front of you when your order is positioned $0 \leq x \leq 1$ through the queue, there are a few trivial cases: - If you just joined the queue, any reduction in depth at the level must come from in front, i.e. $p(x=1)=1$ - If you are at the front of the queue, $p(x=0)=0$, all cancels must be from behind. and this becomes a matter of fitting a function between those two points. A naive guess is that the cancels arrive uniformly through the queue, i.e. $p(x)=x$. You could just use this as your prior and then penalize it online (Bayesian or q-learning) as your orders get filled early or late. A better guess, with some practical trading experience, is that cancels are unconditionally more likely to come from behind than in front of you than if they arrived uniformly, since orders in front of you have more value and can scratch out. Once you get better at this, you'll want to model the conditional distribution. During high dislocation risk, it could be more likely that orders are pulled from in front of you than behind. Side note: Some data feeds do key each event by order ID, i.e. market-by-order (MBO), which provides you with explicit knowledge of the queue composition and your order's position at a level. For example, CME MDP 3.0, Eurex EOBI and Nasdaq TotalView-ITCH. Then, this becomes purely an exercise of maintaining an order book structure. You'll rarely see this granularity with retail tier data feeds. Sometimes, this is due to poor normalization design. Other times, it's because the retail tier data feed is sourcing the data from another lossy third party provider or an aggregated feed, say in US equities, the SIPs (CTA/UTP) rather than prop feeds (such as TotalView-ITCH). If you use a market-by-order feed from providers like Redline, MayStreet or Databento, you should be able to get your queue position explicitly. (Disclosure: I am one of the developers of Databento.)
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.