Estimate trade initiation with the quote rule and tick fallback, handle zero ticks, and understand why historical quote lags cannot be applied blindly to modern feeds.
Lee–Ready algorithm
The Lee–Ready algorithm estimates whether a trade was buyer-initiated or seller-initiated by comparing its price with a matched bid–ask midpoint, then using transaction-price changes when the quote comparison cannot decide. It gives a quant a reproducible trade sign for constructing signed volume or estimating trading costs when the data do not identify the aggressor.
“Buyer-initiated” means the buyer took liquidity from a resting seller. Every completed trade still has both a buyer and a seller. A positive sign does not mean the transaction created more buyers than sellers, or reveal either party's motive.
Quote first, tick second
For a usable bid–ask spread, write the trade price as p and midpoint as m=(b+a)/2:
p>m: assign +1, a buyer-initiated estimate.
p<m: assign −1, a seller-initiated estimate.
p=m: apply the tick test.
The tick test uses the preceding transaction price: an increase gives +1, a decrease gives −1. An unchanged price carries the last nonzero price-change direction, looking back through repeated prices. That state is distinct from the previous hybrid algorithm's output. If no usable earlier price change exists, leave the tick result unresolved; an arbitrary initial sign is an assumption. Missing eligible quotes can also trigger a declared tick-only fallback. Lee and Ready (1991), §I and Table IV.
Decision flow: choose an aligned valid quote, compare price with midpoint, assign minus one below or plus one above; at equality use uptick, downtick or carried nonzero tick direction. With no tick history the result is unresolved.
Original decision diagram for eligible continuous-session trades. Quote eligibility and time alignment precede the price comparison.
Three prices against one quote
Suppose an aligned quote is bid 99.90, ask 100.10, in USD per share. Its midpoint is 100.00. Consider three separate cases:
Trade price
Relevant comparison
Estimated sign
100.05
Above midpoint, even though inside the spread
+1
99.95
Below midpoint, even though inside the spread
−1
100.00
At midpoint; last distinct transaction was 99.98
+1 from the uptick
The final row assumes the stated history; it does not follow the second row chronologically. A non-midpoint trade inside the spread uses its location relative to the midpoint. Sending all inside-spread trades to the tick test changes the rule.
Hypothetical aligned bid 99.90, midpoint 100.00 and ask 100.10. Separate trade cases: 99.95 gets minus one, 100.05 gets plus one, and 100.00 gets plus one when the last distinct transaction was 99.98.
Original hypothetical examples, USD per share. The midpoint case requires a transaction history as well as a quote.
Five seconds described a dataset
The original study used 1988 data and quotes at least five seconds before the recorded trade to address quote revisions appearing before the trades that caused them. Its footnote 10 explicitly allows different delays in other periods. This is historical data alignment, not a universal five-second clock correction. Lee and Ready (1991), §II and footnote 10.
Later evidence reinforces the need to test the matching convention. Chakrabarty, Moulton and Shkilko's study of 2005 trades found that a one-second quote lag improved trade-level classification in their sample. That result does not make one second universal either. Their 2012 paper and university abstract.
Modern timestamp precision also does not guarantee correct event ordering. A 2026 working paper documents differential trade and quote latency creating look-ahead bias in TAQ signing. Battalio and coauthors, abstract. Specify which timestamps, venue quotes or consolidated quotes are used, how simultaneous records are ordered, and how the chosen lag was assessed.
Keep the estimate attached to its evidence
A practical implementation should retain the branch used—quote, tick fallback or unresolved—alongside the sign. Then check these conditions:
Unusable quotes: missing or stale quotes do not establish the prevailing midpoint. A locked quote has bid equal to ask; a crossed quote has bid above ask. Flag or filter these states, rather than silently treating them as an ordinary positive spread. A tick-only result remains a different evidence category.
Auctions and special records: a call auction matches collective interest at a clearing price and need not have one continuous-market aggressor. Separate auction, correction and out-of-sequence records according to the feed's definitions.
Hidden liquidity: the visible order book does not reveal every resting order. A price comparison is an inference even with clean timestamps.
The official LOBSTER output specification distinguishes visible executions, hidden executions and auction crosses. It also illustrates a sign trap: its execution direction describes the resting order. An executed sell limit order corresponds to buyer initiation, so its resting-side sign must be reversed before comparison with this article's convention.
When reliable execution-side records exist, use their documented semantics to benchmark the classifier. Examine errors separately by quote age, midpoint status and market state. Agreement in daily aggregate flow can hide offsetting errors at individual trades, as the 2012 study demonstrates.
For the next calculation, Order Flow and Adverse Selection develops signed-volume features and their interpretation. The preview is public; the full lesson requires membership.
Check the carried state
Two transactions arrive at 50.08 and 50.04, both against an aligned bid of 49.90 and ask of 50.10. The quote then changes to 49.98 / 50.10, and the next trade is again 50.04. There is no earlier transaction history. What signs does the hybrid rule produce?
Answer.+1,+1,−1. The first two prices are above their midpoint of 50.00, so the quote rule signs both as buys. But the second trade establishes a downtick. The new midpoint is (49.98+50.10)/2=50.04. The third trade equals it and has zero price change, so it carries the last downtick. Copying the previous hybrid sign would incorrectly give +1.