Trade-sign inference
∞structuralMost feeds don’t label who was the aggressor, so you infer it. The tick rule signs by price change; Lee–Ready (1991) compares the trade to the prevailing mid. Both are imperfect, and accuracy drops in fast markets.
See it move
?
?
?
?
?
?
?
?
?
?
?
?
?
?
What to notice. The raw tape doesn't tell you who was the aggressor. Lee–Ready compares each trade to the prevailing mid: above is buyer-initiated, below is seller-initiated. Run it and the unlabelled prints turn into signed flow you can actually model.
Why isn't the buy/sell side in the data?
Because most public feeds were built to report prices, not intent. A trade is a match between a resting order and an incoming one. The incoming order crossed the spread and took liquidity (the taker); the resting one was passive (the maker). The trade sign is the taker's direction: a buy if the taker lifted the ask, a sell if it hit the bid. The matching engine knows it, but consolidated tapes and most historical equity data do not carry it, so the most useful microstructure label has to be reconstructed.
It matters because signed order flow feeds nearly every order-flow signal: order-flow imbalance, PIN/VPIN toxicity, Kyle's lambda (price impact per unit of signed volume, from Kyle 1985) and the spread decomposition. A wrong sign biases all of them.
Some venues do publish it. Binance's spot trade stream includes a field m, "is the buyer the market maker?", so a value of true means the taker sold. Nasdaq goes the opposite way: since 14 July 2014 the Buy/Sell indicator on the ITCH Trade message is always "B", whichever side was resting. Where you have a flagged feed, you skip the problem. For historical data, consolidated tapes and many venues, inference remains a core skill.
What is the tick rule?
The tick rule signs a trade by its price change. A trade above the previous trade is a buy (an uptick), one below is a sell (a downtick), and on a flat price you carry the last non-zero sign forward. Aggressive buyers push prices up and aggressive sellers push them down, so the direction of the last price change is a fair proxy for who is demanding liquidity now.
It is crude: it classifies the current trade using a past price move, so it reacts only after the price changes. It works because order flow is persistent, and it needs only the trade tape, no quotes, which makes it the universal fallback. Its accuracy is not as high as folklore suggests. Ellis, Michaely and O'Hara (2000) tested it against Nasdaq trades whose true direction was known and found 77.66% correct. Higher figures, around 85%, come from older NYSE samples and from generous definitions of who initiated a trade, so read "85%" as the favourable end of a range. Select only the tick rule in the explorer above and watch an uptick classify as a buy and a zero-tick inherit the prior sign.
What is the quote rule, and what is Lee–Ready (1991)?
The quote rule compares the trade price to the prevailing mid: above is a buy, below is a sell. A print near the ask was probably a buyer lifting the offer. This is more direct than the tick rule because it uses the quote, but it is silent when , since a mid-print has no side to read.
Lee and Ready (1991), in "Inferring trade direction from intraday data", resolved that: use the quote rule when the trade is away from the mid and fall back to the tick rule for mid-prints. It became the standard equities classifier. They also flagged a timing problem, that quotes may be recorded ahead of the trades that triggered them, and suggested pairing each trade with the quote from about five seconds earlier. The EMO variant of Ellis, Michaely and O'Hara (2000) applies the quote rule only to trades at the bid or ask and the tick rule to everything else. On their Nasdaq sample the quote rule scored 76.4%, the tick rule 77.66% and Lee–Ready 81.05%. Finucane (2000) tested the rules on NYSE data with known direction and found Lee–Ready performs about the same as the tick test. TORQ-based studies put Lee–Ready at roughly 85 to 93% depending on definitions. Expect about 75 to 93% overall, depending on market and period, with the best results away from the mid. The classifier selector above (tick, quote, Lee–Ready, EMO) compares them on the current regime.
Where do these rules fail?
On mid-prints, on timestamps, in fast markets and on unusual executions. Each failure has a specific cause.
Mid-prints. A trade at the mid has no quote-side signal, so the rule falls back on the weakest case, the tick rule. Midpoint-peg and dark executions concentrate here, so venues with a lot of mid liquidity are the hardest. Ellis, Michaely and O'Hara state that all classification rules have very limited success for trades inside the quotes.
Timestamps. The rule compares each trade with the quote in force when it executed, and with second-stamped data that quote is ambiguous. Holden and Jacobsen (2014) show that second-level timestamps and withdrawn quotes distort trade location, spreads and price impact in fast markets, and propose interpolating time within each second. A fixed five-second lag is a historical convention, so on modern millisecond or microsecond data use the venue's own stamps and test the alignment.
Fast markets and bursts. Quotes flicker faster than trades report, so the prevailing quote is ambiguous and accuracy drops in the high-activity bursts (irregular time) where signed flow matters most. Unusual executions such as auctions, hidden or midpoint orders and odd lots break the assumptions outright.
No rule is exact. Treat the sign as a noisy label with a regime-dependent error rate and carry that uncertainty into anything built on it. Switch the explorer above to the "lots of mid-prints (hard)" preset and accuracy drops as the confusion matrix fills its off-diagonal.
Bulk-volume classification, and why the error propagates
Bulk-volume classification (BVC) drops per-trade signing and works on volume bars (business time). The share of a bar's volume treated as buys is the standard-normal CDF of the bar's standardised price change, . Easley, López de Prado and O'Hara introduced it for VPIN, and argued in 2016 that it captures the information content of flow better than trade-by-trade rules.
That claim is contested. Chakrabarty, Pascual and Shkilko (2015) compared the methods and found that the tick rule and Lee–Ready produce significantly better classifications than BVC across stock sizes, and also give more accurate VPIN estimates. Treat BVC as a cheaper aggregate alternative whose accuracy is still debated, not as a more robust one.
Whatever the method, every signed-flow construct inherits the sign error. Order-flow imbalance sums signed volume, VPIN measures the buy-sell imbalance and Kyle's lambda regresses price change on signed volume. A few percent of mislabelled trades biases all of them, and the bias is worst in toxic, fast regimes, which is when those signals are meant to be most informative. When you report an OFI or a VPIN, know which classifier produced its signs and what its error rate is on your regime. This is the maker-taker match of the limit order book seen from the data side, and where signed flow becomes a quoting edge in order-flow information-based market making.
Worked example
This tape has known true signs, uses illustrative numbers, and you can reproduce it in the explorer above. Generate an efficient price plus bid-ask bounce, mark each trade as taker-buy or taker-sell, set a controllable share of mid-prints (say 15%) and a tunable spread. Then run each classifier against the truth. The tick rule lands at about 85%, with errors concentrated where the price did not change (zero-ticks inheriting a stale sign) and right after the mid reverses. The quote rule reaches about 88% on trades away from the mid but cannot classify the 15% of mid-prints at all. Lee–Ready comes out at about 87% overall, ahead of the pure tick rule because it recovers the away-from-mid trades and still handles mid-prints, just less well. Work backwards and the implied accuracy on mid-prints is (0.87 − 0.85 × 0.88) / 0.15, about 81%.
Then make it hard: raise mid-prints to 40% and add fast-market quote flicker. Every classifier's accuracy falls (Lee–Ready toward about 78%) and the confusion matrix's off-diagonal fills, in exactly the regime where you most wanted clean signs.
The inferred sign is a noisy label, and the noise does not vanish on aggregation. It propagates into every signal built on signed flow, worst in the toxic, fast regimes those signals exist to catch. Misread the noise and you misjudge the signal: a weak OFI result may be a strong effect seen through mislabelled trades. Real accuracy depends on the venue, the period and how the true side is defined, so benchmark on side-flagged data from your own market. The explorer lets you set the spread, mid-print frequency and toxicity, switch classifiers, and read the exact accuracy and confusion matrix against ground truth. Trade-sign inference is the fourth of these statistical traps, after bid-ask bounce, fat tails and irregular time. Where side-flagged trade data exists, it is the benchmark every classifier should be tested against (datasets and tools).
Sources
- Lee, C. M. C. and Ready, M. J. (1991). "Inferring trade direction from intraday data". Journal of Finance 46(2), 733–746. doi.org
- Ellis, K., Michaely, R. and O'Hara, M. (2000). "The accuracy of trade classification rules: Evidence from Nasdaq". Journal of Financial and Quantitative Analysis 35(4), 529–551. doi.org
- Finucane, T. J. (2000). "A direct test of methods for inferring trade direction from intra-day data". Journal of Financial and Quantitative Analysis 35(4), 553–576. doi.org
- Holden, C. W. and Jacobsen, S. (2014). "Liquidity measurement problems in fast, competitive markets: Expensive and cheap solutions". Journal of Finance 69(4), 1747–1785. doi.org
- Chakrabarty, B., Pascual, R. and Shkilko, A. (2015). "Evaluating trade classification algorithms: Bulk volume classification versus the tick rule and the Lee-Ready algorithm". Journal of Financial Markets 25, 52–79. doi.org
- Easley, D., López de Prado, M. M. and O'Hara, M. (2016). "Discerning information from trade data". Journal of Financial Economics 120(2), 269–285. doi.org
- Kyle, A. S. (1985). "Continuous auctions and insider trading". Econometrica 53(6). doi.org
- Binance. "WebSocket streams" (spot API documentation, trade stream field
m). developers.binance.com. Nasdaq. "TotalView-ITCH 5.0" specification, Trade message. nasdaqtrader.com