Queue-Position-Aware Slippage Modeling: Fill Hazard to Cross-Now Frontier
Most slippage models treat passive orders as a binary: filled or not filled.
In production, what matters is where you are in queue, how fast queue ahead depletes, and what happens if you must cross later.
This playbook turns that into a practical model you can route with.
One-Line Intuition
Passive edge is an option whose value decays with queue position and deadline; model that decay explicitly, or you will systematically underprice urgency.
1) Slippage Decomposition with Fill Uncertainty
For a buy slice with decision horizon (T), compare two actions at time (t):
- A: cross now (aggressive)
- B: post passive at bid and possibly cross later if unfilled
Define implementation shortfall in bps vs decision mid (M_t).
A useful decomposition for passive action (B):
[ \mathbb{E}[IS_B] = p_{fill}(T) \cdot C_{fill} + (1-p_{fill}(T)) \cdot C_{miss\to cross} + C_{fees/rebates} + C_{timing} ]
where:
- (p_{fill}(T)): probability order gets filled by deadline
- (C_{fill}): expected cost if filled passively (spread capture minus adverse selection)
- (C_{miss\to cross}): expected cost if unfilled and later crossed
- (C_{timing}): drift/alpha-opportunity cost while waiting
Aggressive baseline:
[ \mathbb{E}[IS_A] = C_{cross\ now} ]
Decision rule:
[ \text{choose passive if } \mathbb{E}[IS_B] < \mathbb{E}[IS_A] ]
The entire edge hinges on reliable (p_{fill}(T)) and (C_{miss\to cross}).
2) Queue-Position Fill Hazard (Operational Form)
Let:
- (Q^{ahead}_t): quantity ahead of our order at posted level
- (q): our order size
- (D_t): cumulative depletion in front of us (market orders + front-of-queue cancels)
Fill event by time (T):
[ \tau_{fill} \le T \iff D_T \ge Q^{ahead}_0 + q ]
Model with state-dependent hazard:
[ \lambda_{fill}(u \mid X_u) = \lambda_{mo}(u \mid X_u) + \pi_{front}(u \mid X_u),\lambda_{cancel}(u \mid X_u) ]
where (X_u) can include spread, imbalance, queue sizes, event intensity, short-horizon volatility, and venue regime.
Then survival/fill probability:
[ S(T)=\Pr(\tau_{fill}>T)=\exp\left(-\int_t^T \lambda_{fill}(u\mid X_u)du\right),\quad p_{fill}(T)=1-S(T) ]
Why this works in production
- Keeps queue mechanics interpretable
- Allows per-venue calibration
- Supports dynamic urgency adjustment as (T-t) shrinks
3) From Fill Probability to Effective Slippage Frontier
For a passive buy with possible fallback cross at (T):
[ \mathbb{E}[IS_B] \approx p_{fill},( -\tfrac{S}{2} + A_{fill}) + (1-p_{fill}),( C_{cross,T}) + F ]
- (-S/2): half-spread capture if filled passively
- (A_{fill}): adverse selection after fill (markout term)
- (C_{cross,T}): expected crossing cost at fallback time
- (F): fees/rebates and micro-costs
A practical threshold form:
[ p_{fill} > p^* = \frac{C_{cross,now}-C_{cross,T}-F}{(-S/2 + A_{fill})-C_{cross,T}} ]
If estimated (p_{fill}) drops below (p^*), cross now.
This is your real-time passive/aggressive switch.
4) Feature Set That Usually Survives Live Deployment
Minimum robust features for (\lambda_{fill}) and (A_{fill}):
- Queue position: (Q^{ahead}), own size / queue size ratio
- L1/Lk imbalance, microprice offset
- Spread regime (1 tick vs wider)
- Event intensities: market order, cancel, add rates (multi-window)
- Queue turnover (cancel-to-add ratio)
- Short-horizon volatility and message burstiness
- Venue/session regime (open/close/news windows)
If you only have MBP (not MBO), add a front-cancel attribution model (\pi_{front}) and track its calibration error explicitly.
5) Calibration Ladder
Stage A — Survival baseline
- Cox / piecewise exponential model for time-to-fill
- Separate by symbol liquidity bucket + spread regime
- Output: (p_{fill}(T)) by horizon
Stage B — Nonlinear hazard
- Gradient boosting / small sequence model on event windows
- Monotonic constraints on obvious relations (more queue ahead -> lower fill)
Stage C — Joint model
- Multi-head model: fill hazard + post-fill markout + fallback cross cost
- Optimize directly for expected shortfall, not standalone AUC
6) Backtest Design (Where Many Teams Overstate Edge)
- Event-time replay with strict queue mechanics
- Include cancel/replace latency and throttles
- Simulate fallback logic (post -> wait -> cross) exactly as router does
- Evaluate by urgency buckets and time-to-deadline deciles
- Report both:
- Fill calibration (Brier / reliability)
- Cost calibration (predicted vs realized IS)
Key metric:
[ \Delta IS = IS_{baseline\ router} - IS_{queue-aware\ router} ]
If (\Delta IS) is positive but only in paper and vanishes with realistic latency, the model is not deployable.
7) Production Monitors You Actually Need
- Fill-probability calibration drift by venue and spread regime
- Front-cancel attribution drift (MBP stacks)
- Fallback-cross frequency (should not spike silently)
- Markout after passive fill (toxicity regime shift detector)
- Decision boundary health: fraction of actions near (p^*)
Guardrails:
- If calibration degrades, auto-shrink passive usage
- If data-quality uncertainty rises, revert to conservative crossing policy
8) Common Failure Modes
- Treating fill probability as static per symbol
- Ignoring queue position updates after partial fills/cancels
- Over-crediting passive fills without adverse-selection markouts
- Using random CV instead of chronological walk-forward
- Optimizing classifier metrics (AUC) instead of realized slippage
Minimal Implementation Checklist
- Build deterministic queue-state reconstruction
- Train horizon-conditioned fill hazard model
- Train fallback crossing-cost model
- Combine into expected-IS decision frontier
- Add calibration/drift dashboard + auto risk gates
- Roll out champion/challenger by urgency bucket
One-Sentence Summary
Queue-position-aware slippage modeling converts passive execution from a heuristic into a measurable option value problem, enabling a disciplined cross-now decision that survives live latency and regime drift.
References (Starter Set)
- Cont, R., Stoikov, S., Talreja, R. (2010). A Stochastic Model for Order Book Dynamics. Operations Research 58(3). https://pubsonline.informs.org/doi/10.1287/opre.1090.0780
- Huang, W., Lehalle, C.-A., Rosenbaum, M. (2015). Simulating and Analyzing Order Book Data: The Queue-Reactive Model. JASA. https://arxiv.org/abs/1312.0563
- Moallemi, C. C., Yuan, K. (2017). A Model for Queue Position Valuation in a Limit Order Book. https://moallemi.com/ciamac/papers/queue-value-2016.pdf
- Cont, R., Kukanov, A. (2014). Optimal order placement in limit order markets. https://arxiv.org/abs/1210.1625
- Gould, M. D., Bonart, J. (2016). Queue Imbalance as a One-Tick-Ahead Price Predictor in a Limit Order Book. https://arxiv.org/abs/1512.03492
- Yu, F., et al. (2026). Fill Probabilities in a Limit Order Book with State-Dependent Stochastic Order Flows. https://arxiv.org/abs/2403.02572
- Yang, C., Zhu, A., et al. (2022). A Deep Learning Approach to Estimating Fill Probabilities in a Limit Order Book. Quantitative Finance. https://www.tandfonline.com/doi/full/10.1080/14697688.2022.2124189