Queue Option Value: Cancel-or-Keep Threshold Slippage Modeling Playbook
Date: 2026-03-07
Category: research (execution / slippage modeling)
Why this playbook exists
Most execution engines treat passive child orders with blunt rules:
- “Cancel after N milliseconds,”
- “Reprice every tick move,”
- “If microprice flips, immediately chase.”
In production, this often destroys hidden edge. A posted passive order owns something valuable: queue option value.
When you cancel, you pay three immediate taxes:
- queue age reset,
- cancel/replace dead-time latency,
- urgency escalation for the remaining parent.
If you keep too long, you pay a different tax:
- adverse selection markout,
- missed fill probability,
- larger later catch-up impact.
The problem is not “always keep” vs “always cancel.” The problem is estimating when queue option value has decayed enough to justify reset.
Core concept: queue position as an option
Treat a resting passive order as a short-lived real option with two opposing forces:
- Time value: probability that queue advances to fill before deadline.
- Toxicity drag: expected adverse move conditional on getting filled.
For a buy parent, a passive bid has value while:
[ \text{Expected Maker Edge} > \text{Expected Toxicity + Miss Penalty} ]
Once this inequality flips, continuing to sit in queue becomes negative EV.
Data contract (minimum)
At child-order event level:
- IDs:
parent_id,child_id,symbol,side,venue - Timestamps:
post_ts,last_reprice_ts,cancel_send_ts,cancel_ack_ts,replace_ack_ts,fill_ts - Queue proxies:
est_queue_ahead,queue_ahead_delta,queue_age_ms - Market state:
spread,microprice,imbalance,topk_depth,cancel_rate,trade_rate - Outcome labels:
filled_qty,time_to_first_fill_ms,markout_1s/5s/30s,unfilled_at_ttl - Control state:
time_to_deadline,remaining_parent_qty,urgency_bucket - Infra state:
gateway_latency_ms,venue_ack_latency_ms,reject_code
Without queue-ahead proxy + cancel/ack timing, threshold calibration will be unstable.
Metrics that reveal threshold quality
1) Cancel Regret (CR)
Cost of canceling orders that would have filled with acceptable markout.
[ CR = E\left[ C_{cancel} - C_{keep} \mid \text{action}=cancel,; \text{counterfactual keep is good} \right] ]
2) Keep Regret (KR)
Cost of keeping orders that should have been canceled.
[ KR = E\left[ C_{keep} - C_{cancel} \mid \text{action}=keep,; \text{counterfactual cancel is good} \right] ]
3) Queue Option Value (QOV, bps)
[ QOV_t = E[C_{cancel}(t)] - E[C_{keep}(t)] ]
Interpretation:
QOV_t > 0: keeping is better (option still valuable)QOV_t < 0: cancel/reprice is better
4) Reset Tax Capture (RTC)
How much explicit queue-reset penalty is avoided by thresholding vs naive periodic cancel.
5) Threshold Stability Index (TSI)
Parameter drift score for trigger boundary across rolling windows; high TSI means overfit/noisy gating.
Modeling blueprint
Model two counterfactual branches at decision time (t):
- Branch K (keep): continue resting order
- Branch R (reset): cancel and re-enter (passive or aggressive according to urgency)
Keep branch expected cost
[ E[C_K] = P(fill|X_t,\Delta)\cdot C_{fill} + (1-P(fill|X_t,\Delta))\cdot C_{miss} ]
Where:
- (C_{fill}): spread capture minus adverse markout,
- (C_{miss}): later catch-up impact + deadline risk penalty.
Reset branch expected cost
[ E[C_R] = C_{reset} + P(fill|X_t^{reset},\Delta)\cdot C_{fill}^{reset} + (1-P(fill|X_t^{reset},\Delta))\cdot C_{miss}^{reset} ]
(C_{reset}) includes queue-age loss + cancel/replace latency dead-time.
Decision rule
[ QOV_t = E[C_R]-E[C_K] ]
- keep if (QOV_t > \theta_{keep})
- reset if (QOV_t < -\theta_{reset})
- otherwise no-op (hysteresis band)
Use asymmetric thresholds because false-cancel and false-keep tails are not symmetric.
Practical estimator stack
- Fill hazard model (survival / competing risks) for
P(fill|state, horizon). - Markout model for toxicity conditional on fill.
- Miss-penalty model for unfilled-to-chase cost given remaining parent and TTL.
- Reset-tax model from observed cancel/replace latencies and queue-reset penalties.
- Meta-gate (lightweight classifier) to detect unstable states where model confidence is low and switch to conservative policy.
A simple and robust first implementation:
- Gradient-boosted trees for hazard + markout,
- Online isotonic calibration for probabilities,
- Rolling quantile cap for tail miss penalties.
Control policies that work in production
1) Hysteresis band
Do not trigger cancel/keep flips on tiny QOV changes. Use no-trade band around zero.
2) Minimum dwell guard
After post/reprice, enforce minimum dwell except hard-risk states.
3) Deadline-aware aggression ladder
As time_to_deadline shrinks, increase effective reset bias only when miss penalty dominates.
4) Venue-specific reset tax
Estimate C_reset per venue-session pair. One global reset tax over-cancels in slow-ack venues.
5) Confidence-aware fallback
If model confidence or feature freshness is poor, revert to deterministic safe policy.
Calibration workflow
- Build event-time panel with synchronized clocks.
- Reconstruct counterfactual keep/reset outcomes using replay and matched-state sampling.
- Fit branch costs and QOV estimate.
- Sweep (\theta_{keep}, \theta_{reset}) for CR/KR frontier.
- Pick operating point minimizing p95 slippage under completion constraints.
- Shadow-run live, then canary by symbol liquidity tiers.
Promotion gates (example)
Promote only if all hold over canary window:
- p50 slippage improvement >= 0.8 bps
- p95 slippage non-inferior (no worse than +1.0 bps)
- completion ratio change >= -0.5pp
- Cancel Regret down >= 15%
- Keep Regret down >= 10%
Rollback if any two persist for two sessions:
- deadline misses +1.0pp or more,
- p95 slippage worsens > 3 bps,
- reject/retry loops spike above control envelope.
Common mistakes
Using fixed timeout as cancel policy.
Timeout ignores queue state and urgency interaction.Modeling fill without conditional toxicity.
A fill is not always good; toxic fills can dominate maker edge.Ignoring cancel/ack dead time.
During reset dead time, your exposure is unmanaged.Single threshold for all symbols and sessions.
Queue economics differ drastically by liquidity regime and venue microstructure.No hysteresis.
Leads to oscillation and self-inflicted queue churn.
Implementation checklist
- Queue-ahead proxy quality validated against drop-copy/fill ordering
- Cancel/replace latency distribution tracked per venue-session
- Counterfactual replay pipeline for keep vs reset branch costs
- Asymmetric hysteresis thresholds configurable at runtime
- CR/KR dashboards with symbol × session breakdown
- Canary + rollback automation with explicit guardrails
Bottom line
A passive quote is an option, not dead inventory.
Slippage control improves when cancel decisions are triggered by queue option value decay, not by static timers.
Model keep-vs-reset as a counterfactual cost comparison, enforce hysteresis, and you’ll reduce churn-driven slippage while preserving completion reliability.