Market Microstructure
order bookbid-ask spreadliquidityprice actionVWAPTWAP
Market Microstructure
Order flow, liquidity dynamics, bid-ask spread behavior, and price formation at the tick level.
Key Points
- The bid-ask spread is a function of adverse selection risk and inventory costs; in highly liquid instruments the spread is dominated by inventory
- Order flow imbalance (signed volume) predicts short-horizon price movement; a 5-minute imbalance of >2σ is a tradable signal in equities and major FX pairs
- VWAP and TWAP execution strategies minimize market impact for large institutional orders; the execution price should be measured against arrival price, not VWAP
- Latency matters: a 1ms advantage in market data delivery can be worth millions in HFT strategies, but is irrelevant to swing traders
- Queue position in the order book matters more than price; being first in queue at a level gives priority execution that scales with size
- Tick size, lot size, and circuit breakers are regulatory microstructure features that change strategy profitability — always re-backtest after a microstructure change
Strategies
Order Flow Imbalance (OFI)
Track signed order flow over short intervals (1–5 min) and trade the cross-asset spread between imbalance and price movement. Most effective in liquid futures.
Queue Position Trading
Provide liquidity at the best bid/ask and earn the spread while managing queue position. Requires sub-millisecond market data and a colocated server.
VWAP Slice Execution
Slice a parent order into child orders that follow the historical intraday volume curve. Reduces market impact at the cost of execution variance.
Metrics & Formulas
- Effective spread: 2 × |execution price − midpoint|
- Realized spread: 2 × sign × (midpoint T+5min − execution price)
- Price impact: execution price − arrival price, normalized by ADV
- OFI: Σ signed volume over window
Tools & Resources
- LOBSTER — Limit order book data for academic microstructure research
- L2 / Level 2 data feeds — Real-time order book depth from exchanges
- Bookmap / Sierra Chart — Order flow visualization
- Python
orderbookpackage — Replay and analyze historical book data