Trade Sign and Aggressor Flow Features
How to determine which side initiated a trade and turn that into predictive features — trade-sign runs, imbalance, and flow toxicity signals used throughout microstructure models.
Prerequisites: Order Book Mechanics, Add, Cancel And Execute: The Event Alphabet
Every trade print on the tape has a price and a size, but it doesn't come labeled with which side crossed the spread to make it happen — the "aggressor." Knowing whether a trade was buyer-initiated or seller-initiated turns out to be one of the single most predictive pieces of information in market microstructure, because aggressive trades carry directional intent in a way that a bare price print does not. Determining trade sign, and building features from the resulting sequence of signs, is a foundational step underneath almost every short-horizon prediction model in execution.
Inferring trade sign
When the raw feed doesn't flag the aggressor directly, the standard rule compares the trade price to the prevailing mid-quote at the same instant: a trade at or above the mid is classified as buyer-initiated (the buyer crossed the spread to hit the ask), a trade at or below the mid as seller-initiated. This is the quote rule, the simplest version of the widely used Lee-Ready classification. In plain English: the sign of a trade, , records who was in a hurry — the side that paid the spread to trade immediately, rather than the side that sat and waited to be hit.
From individual signs to flow features
A single trade's sign is a weak signal on its own, but the pattern of signs over a short window is informative. Common features built from the sign sequence include the running sum over the last trades (a strong positive sum means recent flow has been dominated by aggressive buying), the longest current run of same-sign trades, and signed volume — weighting each trade's sign by its size rather than counting it as regardless of how big it was. These features feed directly into markout prediction, adverse-selection classifiers, and short-horizon price-direction models, because a sustained run of aggressive buying is one of the most reliable precursors to further upward price movement in the next few seconds.
Worked example: computing signed volume over a window
Over the last five trades, signs and sizes are: buy 200, buy 500, sell 100, buy 300, buy 400. Using the quote rule already applied, signed volume is:
Total volume traded was , so the order-flow imbalance ratio is — a strongly buy-dominated window. A model using this feature would treat this stretch of tape very differently from an equally-sized window with signed volume near zero, where buys and sells roughly canceled out: the first pattern historically precedes continued upward drift far more often than the second.
What this means in practice
Trade-sign and flow features are cheap to compute, available in essentially every market data feed, and consistently among the most useful inputs across microstructure prediction tasks, which is why they show up as building blocks in markout models, toxicity scores, and fill-probability models alike. The main practical caveat is that the quote rule is an inference, not ground truth — it misclassifies a meaningful fraction of trades near the midpoint or during fast-moving conditions, so more reliable exchange-provided aggressor flags should be preferred whenever the feed provides them.
Trade sign — whether a trade was buyer- or seller-initiated, inferred via the quote rule when not directly flagged — and the signed-volume or run-length features built from a sequence of signs are foundational inputs across virtually every short-horizon microstructure model.
Related concepts
Practice in interviews
Further reading
- Lee, Ready, Inferring the Trade Direction from Intraday Data
- Bouchaud et al., Trades, Quotes and Prices, ch. 3