Order-Book Foundation Model for Slippage & Fill-Probability Prediction
Marsbridge delivered a model-driven execution-support system that predicts limit-order fill likelihood and short-horizon slippage from order-book state. The solution uses a foundation representation trained on historical depth/prints and supervised heads for actionable predictions, with uncertainty-aware abstention and operational guardrails. Strategy-specific placement rules and parameters remain client-owned and are not disclosed here.
Customer
The desk sought a generalizable predictor of near-term fill probability and price impact to inform offset and size selection across symbols and venues—without exposing proprietary execution playbooks.
Challenge
- Asynchronous feeds: Depth and trade updates arrive at different cadences; signals must be robust to partial or delayed book views.
- Label construction: True fill likelihood depends on queue position and cancels; labels must be derived from reconstructed order-book events.
- Cross-symbol generalization: Learn patterns that transfer across instruments and regimes, with drift detection to avoid stale models.
- Confidentiality: Provide decision support without codifying client-specific order templates or thresholds.
Solution
Approach: A two-stage ML pipeline—(1) self-supervised representation learning on depth/prints sequences, then (2) supervised prediction heads for fill-probability and slippage—wrapped in a lightweight real-time service with guardrails.
Representation learning (foundation model)
Trained a sequence model to capture microstructure dynamics using tasks such as next-step prediction and masked-span reconstruction on order-book streams. Applied robust augmentations (e.g., simulated latencies, partial-book views) to improve out-of-distribution stability.
Task heads & calibration (generalized)
Fill-probability head: Estimates likelihood of execution for a proposed price offset and size over short horizons. Slippage head: Produces quantile estimates of expected short-horizon price impact. Uncertainty & abstention: Calibrated uncertainty scores drive an abstain-from-recommendation policy in ambiguous or stressed conditions.
Real-time service & controls
Low-latency inference service exposes a simple API to request predictions for candidate orders; outputs include confidence, risk flags, and rationale features. Guardrails: Venue/auction detectors, stale-data checks, and conservative fallbacks protect against anomalous book states or connectivity issues. Learning loop: High-error cases are automatically queued for review/retraining.
Technologies & tools
Python-based deep-learning stack for sequence models, calibration, and uncertainty estimation
Normalized order-book and trade streams with reconstructed events, storage for replay and audit
Containerized inference service, metrics and logs, configuration management for safe rollout
Process
- Data contracts & rebuild — unify depth/prints; define labeling and QA checks.
- Pretraining — train the representation on multi-month sequences with robustness augmentations.
- Supervised heads — add fill-probability and slippage predictors; perform time-aware validation and calibration.
- Service & guardrails — deploy the inference API with drift monitors, abstention, and venue/auction safeguards.
- Pilot & iterate — A/B against baseline heuristics; integrate feedback; schedule retraining and release gating.
Team
Results
- Decision support: Provided probabilistic guidance for offset/size selection, improving consistency over static rules.
- Operational safety: Abstention and guardrails reduced recommendations during unreliable data states or auctions.
- Scalability: A single representation generalized across symbols/venues, with retraining workflows aligned to regime changes.
(All numerical improvements, parameter values, and venue-specific outcomes are intentionally omitted.)
Put Microstructure ML in the Loop
Want smarter order placement without exposing your playbook? We deliver abstention-aware microstructure models for fill and slippage, served in real time with operational guardrails your desk can trust.
Request a Consultation
Drop us a line! We are here to answer your questions within 1 business day.
What happens next?
Once we’ve received and processed your request, we’ll get back to you to detail your project needs and generally sign an NDA to ensure confidentiality.
After examining your project requirements, our team will devise a proposal with the scope of work, team size, time, and cost estimates.
We’ll arrange a meeting with you to discuss the offer and nail down the details.
Finally, we’ll sign a contract and start working on your project with agreed timeline