Order Flow Imbalance (OFI)¶
Definition¶
Order Flow Imbalance (OFI) measures the net directional pressure from order book events at the best bid and ask prices over a short time interval. It quantifies whether buying or selling activity is currently dominant, making it the primary short-horizon predictor of price changes.
Formally (Cont, Kukanov & Stoikov 2010):
where \(e_n\) is the signed contribution of the \(n\)-th event to the bid queue (positive for new/increased bids, negative for cancellations/reductions); equivalently, OFI is the sum of limit-buy arrivals \(L^b\) minus bid cancels \(C^b\) minus market sells \(M^s\), and the ask-side counter-terms with opposite signs. A key identity: a market-sell and a bid-cancel of the same size produce the same \(e_n\) — OFI treats them equivalently.
Stylised-model derivation¶
Under a book with depth \(D\) at each price level beyond the best, mid-price change satisfies \(\Delta P_k \cdot D/\delta = \text{OFI}_k + \epsilon\) (tick size \(\delta\)). This gives the empirical slope \(\beta \propto 1/D\) directly, with no free parameters beyond depth.
Historical context¶
Introduced formally by rama-cont, Arseniy Kukanov, and sasha-stoikov in price-impact-order-book-events (2010), using NYSE TAQ data for 50 stocks. The paper established both the OFI definition and the linear price impact relationship.
How it works¶
OFI aggregates order book events into a single signed scalar: - Positive OFI → more buy-side pressure than sell-side → upward price pressure. - Negative OFI → more sell-side pressure → downward price pressure. - Near-zero OFI → balanced order flow → little directional pressure.
The price impact relationship is approximately linear:
Deeper markets (more resting liquidity) require larger OFI to move price by a given amount.
Variants and extensions¶
| Variant | Source | Innovation |
|---|---|---|
| OFI (original) | Cont et al. (2010) | Level 1 only; fixed tick size |
| log-OFI | Later work | Log-stationarised version |
| GOFI | Su et al. (2021) | Handles non-minimum tick sizes |
| log-GOFI | price-impact-generalized-ofi | Log + generalised; R² ~84–86% on CSI 500 |
| MLOFI (multi-level OFI vector) | mlofi-xu-gould-howison | Per-level OFIs stacked; preserves level information |
| Integrated OFI | cross-impact-ofi-equity-markets | PCA first principal component across levels; \(\ell_1\)-normalised weights; +16–20 pts OOS \(R^2\) over best-level |
| OBI (Order Book Imbalance) | Various | Sometimes used interchangeably with OFI; can include multiple levels |
| Filtered OBI | order-flow-filtration | Filters on order lifetime/modification to isolate informed flow |
Key empirical findings¶
- Linear OFI model is robust across stocks, time scales, and seasonality effects (Cont et al.).
- OFI is a more stable predictor of price changes than raw trade volume.
- Hawkes processes model OFI arrival dynamics and can forecast near-term OFI distributions (forecasting-high-frequency-ofi).
- Filtering on parent orders of executed trades (not aggregate flow) strengthens the OFI-return association (order-flow-filtration).
- OFI/OBI is the dominant SHAP feature in crypto LOB models (explainable-crypto-microstructure).
- Aggregating multi-level OFIs via PCA into an integrated OFI raises contemporaneous OOS \(R^2\) from 65% to 84% on Nasdaq-100 (cross-impact-ofi-equity-markets).
- Cross-asset OFI matters for forecasting but not for contemporaneous returns once multi-level info is integrated — see cross-impact.
Open questions¶
- ~~How does OFI behave at multiple depth levels simultaneously (multi-level OFI)?~~ — largely settled by MLOFI (mlofi-xu-gould-howison) and integrated OFI (integrated-ofi); PCA first component captures >89% variance.
- Does the linear relationship hold under market stress (flash crashes, liquidity crises)?
- How do latency arbitrageurs distort OFI signals in co-location environments?
- Can a level-aware multi-level cross-impact model beat integrated-OFI at short-horizon forecasting? Raised in cross-impact-ofi-equity-markets as a future direction.
Connections¶
- limit-order-book — OFI is derived from LOB event flow.
- price-impact — OFI is the primary driver of short-horizon price impact.
- hawkes-process — used to model OFI arrival dynamics.
- adverse-selection — informed order flow drives OFI; noise flow dilutes it.