Appearance
Lee–Ready 1991
Aggressor-side classifier built on a quote rule (compare against pre-trade NBBO mid) with a tick-rule fallback (compare against the most recent different print). The pre-trade NBBO requirement is the load-bearing replay-stability constraint; the crate's cycle tracker maintains exactly the QuoteLabel::PreTrade convention.
Authoritative reference
Lee, C. M. C. & Ready, M. J. (1991). Inferring Trade Direction from Intraday Data. Journal of Finance 46(2), 733–746.
DOI: https://doi.org/10.1111/j.1540-6261.1991.tb02683.x.
JSTOR: https://www.jstor.org/stable/2328845.
Consumed by
OptionFlow— Lee–Ready aggressor classification.StockFlow— same.OptionTrades— default side classifier.PerContractMoneynessSlice— same.
Algorithm
- Quote rule. Compare the trade price to the prevailing NBBO midpoint computed from the most recent pre-trade quote.
- Above midpoint → buy.
- Below midpoint → sell.
- At midpoint → fall through to the tick rule.
- Tick rule. Compare the trade price to the most recent different trade price.
- Higher → buy (upward tick).
- Lower → sell (downward tick).
- Equal → carry the prior tick verdict (zero tick).
The quote rule's pre-trade-NBBO requirement is the load-bearing constraint: it is the contract that makes the classifier replay-stable. Lee & Ready 1991 §II.B documents the QuoteLabel::PreTrade convention; the crate's cycle tracker maintains exactly this label.
Tick-rule literal equality
Tick-rule comparisons use literal price equality against the previous print. OPRA / UTP wire prices are penny-quantised; tolerance-based comparisons would break replay parity on round-tripped streams.
Spec selector
The classifier is selected per spec via the SideClassification enum:
| Variant | Behaviour |
|---|---|
LeeReady | Lee–Ready §II.B against the pre-trade NBBO with a tick-rule fallback for at-mid prints. Default. |
QuoteTouch | Strict quote-touch — price ≥ ask ⇒ buy, price ≤ bid ⇒ sell. At-mid prints route to the mid bucket; never resolved by tick-rule. Useful for replay validations against vendor-side classifications. |