Classify trades at the bid or ask, use ticks inside the spread, and see why EMO can disagree with midpoint signing without identifying the true aggressor.
Ellis–Michaely–O’Hara rule
The Ellis–Michaely–O’Hara rule (EMO) estimates whether a trade was buyer-initiated or seller-initiated by using exact bid/ask matches first and transaction-price changes for other trades. Its distinctive feature is that a trade inside the spread goes to the tick test, even when it is away from the midpoint. That choice can reverse an estimated trade sign, changing signed-volume and execution-cost measurements.
The name comes from Ellis, Michaely and O’Hara’s 2000 Nasdaq study. Their abstract reports classification difficulties inside the quotes and proposes an alternative algorithm. The precise version explained here is the EMO implementation described in Chakrabarty and coauthors’ empirical study, §2, with the conservative eligibility filter stated below.
Touch first; ticks inside
Let b<a be the aligned bid and ask, and p the transaction price. A touch means exactly the bid or ask. For an eligible continuous-market trade:
Price location
Classification branch
Estimated sign
p=a
Exact ask match
+1, buyer-initiated
p=b
Exact bid match
−1, seller-initiated
b<p<a
Tick test
Depends on transaction history
For the tick test, compare p with the most recent earlier eligible transaction at a different price. Higher gives +1; lower gives −1. Looking back through repeated prices handles a zero tick. With no earlier different price, the result is unknown. The remembered state is the last nonzero price-change direction, not the previous EMO output: a quote match can assign a sign against the tick direction. Chakrabarty and coauthors, §2, pp.6–7.
That paper’s rule applies the tick test to all non-touch trades, including trades outside the quoted interval. This article’s implementation adds an explicit eligibility filter: an outside-quote observation is unknown, pending investigation of its quote match and record type. It does not automatically become a buy above the ask or a sell below the bid. Extending the touch branches to inequalities changes the algorithm; applying the paper’s tick-otherwise extension is a separate declared choice.
Exact equality should use the feed’s documented price scale, such as integer price units. An unexplained floating-point tolerance can turn a genuinely inside-spread trade into a touch.
The inside trade that changes sides
Consider three separate fictional cases, all matched to bid 100.00, ask 100.04, in USD per share. The bid–ask spread midpoint is 100.02.
Case
EMO estimate
Midpoint quote-test estimate
Trade at 100.04
Buy: exact ask
Buy: above midpoint
Trade at 100.00
Sell: exact bid
Sell: below midpoint
Trade at 100.01; preceding different trade was 100.00
Buy: uptick
Sell: below midpoint
The third trade lies below the current midpoint but above its preceding different transaction price. These comparisons answer different questions. The Lee–Ready algorithm uses the midpoint comparison away from midpoint equality; EMO sends this inside-spread observation to the tick branch.
Fictional aligned bid100.00, ask100.04, midpoint100.02 USD per share. Inside trade100.01 follows different price100.00: EMO assigns buy from the uptick; the midpoint quote test assigns sell. At ask is buy and at bid sell.
Original fictional comparison. EMO uses the transaction history for this inside-spread trade; the midpoint method uses its location within the current spread.
If each case represents 200 shares, the EMO estimates produce signed volume 200−200+200=200 shares. Midpoint signing produces 200−200−200=−200 shares. This reversal follows entirely from the classification convention; it is not evidence that one method discovered the actual initiator.
The quote match is part of the method
For the fictional example, assume quotes are current and precede each execution in a reliable event sequence. A real implementation must specify the quote source, timestamp meaning, same-timestamp ordering and any lag. Frequent quote changes make the choice of the prevailing quote ambiguous, as Jurkatis explains in the introduction to Inferring trade directions in fast markets. A fixed delay is not supplied by the name “EMO”; test alignment against the particular feed.
The conservative implementation above returns unknown when quotes are missing, declared stale, locked (b=a), crossed (b>a), or incompatible with the transaction’s price. It also leaves an inside-spread trade unknown if the required earlier different price is missing. Auctions, corrections and out-of-sequence records require separate eligibility decisions before signing. Missing or rejected records should not silently seed the next trade’s tick history.
Retain the branch used and the reason for every unknown alongside the estimate. Validate against reliable initiator labels where available, separately for touch and inside trades, zero ticks, trade sizes and market states. Report the unclassified share too: removing difficult observations can make accuracy look better while changing the population being measured. The original Nasdaq findings and the later ECN study do not establish universal accuracy for another venue, instrument or period.
Every execution has a buyer and seller. An estimated buy sign describes inferred initiation; it does not identify an institution, distinguish informed from uninformed trading, or establish why the trade happened.
For the next step, Order Flow and Adverse Selection develops signed-volume features and their interpretation limits. The public page is a preview; the full lesson requires membership.
Chakrabarty, B., Li, B., Nguyen, V., and Van Ness, R. A. (2007). Trade Classification Algorithms for Electronic Communications Network Trades. Working-paper §2, pp.6–7, defines the EMO and tick branches; §4.2, p.12, compares inside-spread classification. Published in Journal of Banking & Finance, 31(12), 3806–3821.