Skip to content
All library documents

OHLC Bars: Auction Prices and Time-Bin Conventions

Article Quant Q&A · Author: Eduardo J. Sanchez

Summary

The document distinguishes two meanings of open, high, low, and close data. In a market with opening and closing auctions, the open and close can be the auction prices, while the high and low are extrema across auction and continuous trading. In a second convention, OHLC values summarize all trades within a chosen time bin. This makes the meaning of a bar dependent on how its interval boundaries and included trades are defined.

The answer illustrates why adjacent bars need not share a close and open: data providers may use different binning rules or treat boundary observations differently. It discusses daily futures markets that trade nearly around the clock and intraday equity bins that may exclude call auctions, giving a right-closed interval convention for the latter. The explanation is conceptual rather than a specification for any particular exchange or charting service; users must check the source's session and boundary rules before comparing bars.

Key ideas

  • OHLC values may represent auction prices and session extrema, or a summary of trades within a time bin.
  • The definitions of open and close depend on the market session and the data provider's convention.
  • Time-bin boundary rules determine which trades contribute to each bar.
  • Intraday equity bins may exclude opening and closing auctions, while futures can trade across day boundaries.
  • OHLC data should be interpreted using the source's session and binning rules.

Tags

Full text
# Formal definition of Open-High-Low-Close (OHLC) price data


# Formal definition of Open-High-Low-Close (OHLC) price data












I am trying to understand Open-High-Low-Close (OHLC) data. Several sources agree in the following type of definition (Source):

> An OHLC chart is a type of bar chart that shows open, high, low, and closing prices for each period. OHLC charts are useful since they show the four major data points over a period, with the closing price being considered the most important by many traders.

The inclusion of the term "period" suggests the existence of a discretisation scheme on top of the already discrete data that is the time series modelling the time price of an asset.

In order to make this post self-contained, let me keep the following definition handy (Source):

> A time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data.

Given both definitions, how can I reconcile them?

A first non-formal attempt (open to corrections) would be as follows:

The price time series of an asset can be sourced with respect to a specified period of time of the form $[t_i, t_i + \Delta t], \Delta t > 0$. More specifically, 4 time series may be thought of. The open price of an asset is the price of the asset at $t_i$. The closing price of an asset is the price of the asset at $t_i + \Delta t$.

However, denoting the time period as $[t_i, t_i + \Delta t], \Delta t > 0$ seems to imply that this period is comprised on two discrete time points, with no possibility of data existing in between. This would make the definitions of the high and low prices difficult. Hence, I could think about the symbol $\Delta t$ simply as a time differential which does not preclude the existence of other time points in between.

It makes complete sense to me to use interval notation. And it also makes sense to come up with a formal definition that respect the basic example of the time period being one day: Open price for the day, closing price for the day, lowest/highest prices achieved during the day.

A second non-formal attempt could be as follows: Let $[t_o, t_c]$ with $c > o$ be an interval of time of length $\Delta t$, such that there exists four specific points of price data: The open price, or the price at $t_o$, denoted as $p_o$, the closing price, of the price at $t_c$, denoted as $p_c$, the lowest price of the interval, denoted as $p_l$ and the highest price of the interval, denoted as $p_h$, both of which occurred at specific points of time in the interval.

I think this definition makes sense. But then, is there a data problem in TradingView, for small resolutions? In the following figure I am looking at the price of the Bitcoin / U.S. Dollar pair at the Bitstamp exchange at a 1 minute resolution:

The white line renders the open prices and the magenta line renders the closing prices. Why doesn't the close price at 16:59 match the open price at 17:00? Is it because the exchange simply sends this data even if it is incomplete? I have tried with a few different exchanges and this keeps happening. Is this a matter perhaps of traded volume?

Finally, what happens at a 1-second resolution? Is one second the smallest time differential or is there any sub-second data as a consequence of high-frequency trading?

## Answer by lehalle (score 3)

https://quant.stackexchange.com/a/77797

This is a good question, they are indeed two conventions for OHLC

- When there is a trading session with an opening auction, a continuous auction and a closing auction (have a look at Market Microstructure In Practice for details on auctions). In such a case, the definition is obvious: Open and Close are the prices of the Call Auctions, and the High and Low are the max and min of all the prices including Call and Continuous auctions. This is the origin of the OHLC "bars".

- Then, people started to bin prices and summarize them by OHLC. The convention is not very clean since: for daily data, in most market there is an open price and a closing price (first and last), that are thus included in the bin but when it is not the case, the left hand side of the interval should be excluded.

Think about the exchanges for Future contracts, that for most of them open 24h a day, then the "first" (and hence Open) price is just after 0:00 of day D-1, and the lest can be at 0:00 of day D.

Similarly, if you decide to bin intraday of Equities, usually you exclude the Call Auctions (otherwise you are not binning the intraday auction only), and then if you take $\Delta t$ intervals, they should be of the shape $((k-1)\Delta t, k\Delta t]$.

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.