Choosing Bid, Ask, or Midpoint Prices for Tick-Based OHLC Bars
Summary
The document discusses how to construct open, high, low, and close values from tick data containing bid and ask quotes but no recorded trade prices. It explains that standard open and close values represent the first and last traded prices in a period, so quote-only data cannot reveal them exactly. The answer suggests using the unweighted bid-ask average as a consistent proxy when trades are unavailable, with special handling for missing quotes.
For high and low, it recommends the highest bid and lowest ask rather than the highest ask and lowest bid. Those quote sides better reflect prices at which trades could be executed and are less distorted by extreme, uncompetitive quotes in illiquid markets. The discussion offers reasoning rather than empirical tests or a universal convention; the chosen construction should match the data available and the intended analysis.
Key ideas
- Open and close conventionally use the first and last traded prices in a bar.
- Bid and ask quotes alone do not identify which prices trades occurred at.
- The answer proposes the bid-ask midpoint as a proxy when trade prices are missing.
- Using the highest bid and lowest ask can reduce distortion from implausible quotes in illiquid markets.
Tags
Full text
# When converting Tick to OHLC, which field do I use for Open and Close: bid or ask? # When converting Tick to OHLC, which field do I use for Open and Close: bid or ask? I can't find a definitive answer for this: When generating (compressed) OHLC records from tick data, which field do I use for the Open and Close? Highest Ask for timeframe High makes sense; Lowest Bid for timeframe Low makes sense; But Tick data just has Bid and Ask, not High or Low. It's not possible to know if any given trade was at the Bid or Ask. So how do I determine which one to use for Open (first tick) and Close (last tick) for each timeframe? Thanks! ## Answer by Attack68 (score 0, accepted) https://quant.stackexchange.com/a/41249 There is no definitive answer to this but I believe most recording systems measure the open and close as the first and last traded price, respectively, irrespective of the bid and ask. If you only have bid and ask prices and not a list of traded prices then you cannot ascertain this information, and I would be inclined to model it systematically as the unweighted average, with some mechanism for dealing with prices at open or close that are missing bids or offers. Incidentally, I disagree with your 'sense' statements. I would use the highest bid as the high and the lowest offer as the low, for the reason that this is robustly stable and also corresponds to a sensible executable level. In an illiquid market where there is no ask price I might offer to sell a single share in 'Complete Dog Plc.' for a bazillion dollars, and for that period of time it would be the best (and highest) ask price of the day, but completely useless for analysis. On the other hand I suspect no one would ever bid higher that some competitive price, e.g $0.01, for 'Complete Dog Plc.' and therein lies your robustness.
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.