Inferring Trade Initiation from Trades and Bid-Ask Quotes
Summary
The document considers how to infer whether a trade was initiated by a buyer or seller when streaming data include the bid, ask, and last trade price. The proposed rule compares the trade price with the contemporaneous quote midpoint, classifying prices at or above the midpoint as buyer initiated and prices below it as seller initiated. The question also raises whether quotes and trades should be aligned within the same observation or across timestamps.
The reply treats midpoint comparison as a reasonable approach with the available data, while emphasizing that executions can occur at the midpoint and may not reveal aggressor side. A direct exchange feed may identify the initiator when that information is available, though hidden orders limit visibility. Correctly ordering timestamps matters because reported trades can arrive after market quotes have moved. The method is therefore an estimate with ambiguity, not a definitive classification.
Key ideas
- Compare the trade price with the bid-ask midpoint to estimate the aggressor side.
- Trades at the midpoint can remain ambiguous under this rule.
- Direct exchange data may provide clearer initiator information, but hidden orders limit what is visible.
- Sort and align quote and trade timestamps carefully because trades may be reported after prices move.
Tags
Full text
# What's the best way to determine if trade was buyer (seller) initiated, having access to bid/ask/last quotes? # What's the best way to determine if trade was buyer (seller) initiated, having access to bid/ask/last quotes? In this question, suggestions on algorithms from Lee and Ready and Pan and Poteshman address ways to determine trade side without access to bid/ask quotes. The streaming data I have access to yields data similar to the below: ``` timestamp mark bid ask last volume 1635113033622 4526.25 4526.25 4526.5 4526.25 2239 1635113034196 4526.50 4526.00 4526.25 4526.50 2241 ``` Would it be reasonable to find the midpoint between `bid` and `ask`, then compare to `last` in the same row? If `last` is ≥ `midpoint`, buyer initiated—else, seller initiated. ``` midpoint = (bid + ask) / 2 side = 'buyer' if last >= midpoint else 'seller' ``` Would there be an alternate way of inferring what side is being more aggressive? Also, I'm unsure if the `last` price in the same row would be ideal to compare to bid/ask quotes, or should the comparison be made to `last` in prior row. Any pointers are greatly appreciated. ## Answer by JoshK (score 4, accepted) https://quant.stackexchange.com/a/68596 What you are doing is the best you can do with that data. But bear in mind that you will see executions in the middle often from many sources and you won't have the data to tease that out. If you can get a direct feed then the exchanges will show you execatly who initiated when they can. (Many orders are hidden so you can't see it). Also, make sure you are aware of the timestamps. Trades can come in after the market moves already, so you need to make sure you are resorted in time order.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.