Queue-Position Inference Under Partial Observability: Slippage Modeling Playbook

2026-03-07 · finance

Queue-Position Inference Under Partial Observability: Slippage Modeling Playbook

Date: 2026-03-07
Category: research (execution microstructure)


1) Why this matters

In FIFO markets, passive execution quality is largely a queue-position problem. If your queue estimate is too optimistic, you over-wait, miss fills, and panic-cross later. If it is too pessimistic, you cross too early and pay unnecessary spread/impact.

For many venues, we do not have perfect market-by-order visibility. We often run with market-by-price (aggregated depth), meaning queue rank is latent. This creates a structural slippage leak unless queue uncertainty is modeled explicitly.

Core idea:

Treat queue position as a hidden state with uncertainty, not a single deterministic number.


2) Scope and assumptions

This playbook focuses on passive child orders at best bid/ask (extendable to deeper levels):

Out of scope:


3) Data contract (minimum viable)

You need event-time aligned records:

  1. Market data

    • ts_event, ts_recv
    • best bid/ask price+size
    • level size deltas at our working price level
    • prints/trades at our working price level
  2. Own order events

    • send/ack/replace/cancel/fill timestamps
    • working price/size
    • venue/order-id linkage
  3. Latency telemetry

    • send→ack, ack→book-appearance (if observable), market-data delay distribution

Without this, queue calibration becomes guesswork.


4) Hidden-state queue model

Let:

4.1 Initial estimate at insert/ack

Use a conservative initialization around order acknowledgment:

This follows practical guidance from queue-estimation literature and practitioner notes (e.g., Rigtorp method family).

4.2 Event updates

When queue size at our level decreases by ΔQ < 0, we split that decrease into:

A common parametric form:

p_front = f(V_t) / ( f(V_t) + f(B_t) )

with monotone f such as:

Then expected front reduction from ambiguous shrinkage:

E[ΔV_amb] = p_front * |ΔQ_amb|

and we update:

V_{t+1} = max(V_t - ΔV_exec - E[ΔV_amb], 0)

4.3 Distribution, not point estimate

Track uncertainty around V_t (e.g., particles or quantile bands).

Useful outputs per order:


5) Slippage decomposition with queue uncertainty

For each decision point (keep / reprice / cross):

E[cost] = P_fill * C_fill + (1 - P_fill) * C_no_fill

Where:

Critical: P_fill must come from the queue posterior, not naive depth heuristics.


6) Practical control state machine

Define execution states from queue uncertainty + calibration drift:

  1. TRACKED

    • queue uncertainty low
    • live calibration healthy
    • normal passive logic
  2. UNCERTAIN

    • uncertainty medium OR mild calibration drift
    • reduce passive dwell time, tighten cancel thresholds
  3. BLIND

    • uncertainty high OR stale/missing feed episodes
    • cap passive exposure, favor smaller clips or safer aggression
  4. SAFE

    • severe drift or repeated tail breaches
    • fallback to conservative baseline execution policy

Use hysteresis to avoid state flapping.


7) Calibration and monitoring

7.1 Offline calibration targets

For horizon buckets (e.g., 100ms/500ms/1s/5s):

Tune:

7.2 Live monitors (must-have)

Alert on p95 deterioration first; mean bps can look fine while tails degrade.


8) Backtest/live alignment traps

  1. Trade-first optimism

    • Assuming only prints move your rank underestimates queue advancement uncertainty.
  2. Cancel attribution errors

    • Treating all depth shrinkage as front-queue removal overestimates fill odds.
  3. Latency blindness

    • Ignoring send/ack/feed lag shifts queue rank materially in fast books.
  4. Regime pooling

    • One global parameter set across open/close/news windows often fails calibration.
  5. Selection bias

    • Evaluating only filled orders hides no-fill opportunity cost.

9) Rollout plan (safe path)

  1. Shadow mode

    • compute queue posterior and action recommendations, but do not trade on them.
  2. Canary lanes

    • small symbol/venue subset with strict kill-switch on calibration drift.
  3. Dual policy comparison

    • baseline vs queue-aware policy with matched market regimes.
  4. Promotion gates

    • require improvements in p95 slippage and no-fill regret, not only mean IS.
  5. Automatic fallback

    • if FCE/QRE breach thresholds for sustained interval, revert to baseline.

10) Minimal pseudo-implementation

for each resting order o:
  init posterior V ~ P0(queue_ahead | Q_ack, latency)

on market event e at order price:
  if trade at level:
    update V with deterministic front reduction component
  if depth decrease ambiguous:
    compute p_front = f(V)/(f(V)+f(B))
    update posterior with probabilistic front reduction

  derive fill_prob(H), queue_ahead_quantiles
  compute keep/cancel/cross expected costs
  pick action under current state constraints

periodically:
  calibrate predicted fill probs vs realized
  update state TRACKED/UNCERTAIN/BLIND/SAFE

11) What “good” looks like

If your desk treats queue rank as exact when data is partial, slippage is mostly a delayed accounting issue. If your desk treats queue rank as uncertain but measurable, it becomes a controllable execution risk.


References (starting points)