Liquidation Detection
SHADOWML-powered liquidation cascade detection on Bybit. 3-class classifier (Confirm/Edge/Noise), 42 real-time features, 200ms confirmation window.
Key Numbers
At a Glance
200ms
Detection Window
42
Features
3-Class ML
Classification
15
Symbols
Overview
About This Project
A machine learning system that detects liquidation cascade events on Bybit perpetual futures in real-time. The 3-class classifier -- Confirmed, Edge, and Noise -- processes 42 microstructure features within a 200ms confirmation window, distinguishing genuine liquidation-driven price moves from random noise.
The feature pipeline splits inputs across temporal horizons to capture the distinctive signature of liquidation cascades: sudden volume spikes, order book depletion on one side, and sequential stops being triggered. Isotonic calibration ensures the model's probability outputs are well-calibrated for downstream position sizing decisions.
The system monitors 15 symbols simultaneously, streaming features from WebSocket feeds and generating classification signals that feed into execution strategies designed to profit from the predictable price dynamics following confirmed liquidation events.
Features
What It Does
3-Class Cascade Classifier
Confirmed/Edge/Noise classification separates genuine liquidation events from ambiguous signals and random noise, enabling precision-tuned execution strategies.
Temporal Feature Split
Features computed across multiple time horizons -- 50ms, 200ms, 1s, 5s -- capture the multi-scale signature of liquidation cascades as they propagate through the orderbook.
Isotonic Calibration
Post-hoc probability calibration ensures model confidence scores are well-calibrated, enabling Kelly-criterion position sizing with reliable edge estimates.
Real-Time Streaming Pipeline
WebSocket-driven feature computation and inference running continuously across 15 symbols with sub-200ms end-to-end latency from event to classification.
Architecture
How It Works
Challenges
What Made This Hard
Liquidation events are inherently rare and fast -- the class imbalance problem is severe, and the 200ms window leaves no room for recomputation. Building a feature pipeline that maintains temporal consistency across 15 concurrent symbol streams while meeting the latency budget required careful lock-free data structure design and pre-allocated memory pools.
Stack