Market Microstructure Alpha Detector
Market microstructure alpha — signals derived from order flow, bid/ask dynamics, and trade initiation patterns — decays in minutes to hours. Most quantitative tools operate at daily resolution and miss these signals entirely. This project builds a real-time pipeline that ingests tick-level trade and quote data, computes microstructure features, and generates short-horizon signals for mean-reversion and momentum strategies.
Built a real-time market microstructure alpha detection system
- ›Computes order flow imbalance, VPIN, and effective spread from live tick data
- ›Volume-time bucketing for regime-stable feature computation
- ›Real-time pipeline with automatic stale signal invalidation
A real-time microstructure signal detection pipeline computing order flow imbalance, VPIN, effective spread, and price impact from tick-level data. Uses volume-time bucketing and Lee-Ready trade initiation classification to produce short-horizon alpha signals with automatic stale signal expiry.
Short-horizon trading strategies require microstructure-level signals that daily OHLCV data cannot provide. Order flow imbalance, trade initiation classification, and effective spread dynamics contain predictive information at intraday horizons that most practitioners lack the infrastructure to process in real-time.
- Signal computation must run within one tick period to produce actionable signals
- Trade initiation classification (Lee-Ready) requires access to the prevailing quote at trade time
- Features must be computed incrementally without reprocessing full tick history
- Signal decay must be tracked to avoid stale signals from previous liquidity regimes
Polygon.io WebSocket feed → tick parser (trade and quote streams) → feature engine (OFI, VPIN, effective spread, price impact) computed incrementally per volume bucket → signal generator (rolling z-score) → Redis signal store with TTL → FastAPI for signal consumption.