Why OHLCV Bars Cannot Reconstruct Tick Charts
Summary
The document explains why time-based OHLCV bars cannot be reliably converted into tick charts. A tick chart groups trades by the number of transactions, while an OHLCV bar preserves only aggregate prices and volume over a time interval. Those summaries do not reveal the order, timing, or individual prices of the trades inside each bar, so they cannot show where a tick threshold was reached or reconstruct the chart’s wicks.
The answers distinguish tick counts from traded volume and note that volume surges can cross a threshold within even a short time bar. Genuine tick charts therefore require transaction-level data; lower-frequency bars can be resampled into other time intervals, but that does not recover tick structure. With tick-level records, trades can be batched by count and summarized into open, high, low, and close values. The discussion offers no dataset-specific demonstration and does not detail trade direction or buying and selling volume classification.
Key ideas
- OHLCV bars aggregate activity over time and discard the individual transaction sequence.
- A tick chart requires transaction-level records to group trades by count.
- Trading volume and the number of transactions are distinct measures.
- Time bars can be resampled into other time intervals, but cannot reveal the missing tick path.
- Tick records can be batched and summarized into price bars with open, high, low, and close values.
Tags
Full text
# From OHCLV dataset to Tick Chart # From OHCLV dataset to Tick Chart We are all familiar with time-based candlestick charts, such as 1 Minut, 15 Minuts, 1 Hour and so on. The dataset is more or less something similar: ``` +---------------------+----------+----------+----------+----------+--------------------+ | Time | Open | High | Low | Close | Volume(USD) | +---------------------+----------+----------+----------+----------+--------------------+ | 2022-06-29 14:01:00 | 20060.21 | 20168.00 | 20009.13 | 20105.95 | 2611402.1200130694 | | 2022-06-29 14:02:00 | 20004.42 | 20114.45 | 19869.01 | 20059.86 | 1734828.9886544214 | | 2022-06-29 14:03:00 | 20083.56 | 20149.16 | 19934.92 | 19981.85 | 1947443.4393927378 | | 2022-06-29 14:04:00 | 20075.98 | 20096.67 | 19827.00 | 20070.78 | 1907937.9701368865 | | 2022-06-29 14:05:00 | 20046.89 | 20114.89 | 20013.52 | 20075.97 | 688260.0234476988 | | 2022-06-29 14:06:00 | 19969.56 | 20210.42 | 19950.91 | 20045.04 | 1208377.8560085073 | | 2022-06-29 14:07:00 | 20062.85 | 20118.59 | 19950.91 | 19966.78 | 846215.676035613 | | 2022-06-29 14:08:00 | 19919.26 | 20102.00 | 19883.32 | 20073.66 | 2265398.8555667275 | | 2022-06-29 14:09:00 | 20152.82 | 20192.67 | 19883.32 | 19929.74 | 2869901.761308003 | | 2022-06-29 14:10:00 | 20278.17 | 20321.43 | 20043.81 | 20157.19 | 1877821.0294715543 | +---------------------+----------+----------+----------+----------+--------------------+ ``` What I would like to understand is how it is possible to convert this dataset into a tick chart. If I'm not mistaken, a Tick is the value of transactions, therefore if I set the tick to 3000, a candle will only be formed when at least 3000 transactions are carried out. This is quite clear. What I don't understand is what is meant by Transactions? Are we talking about volume? the last column of the table? or should we make a difference between purchase volume and sales volume? Let's take Bitcoin vs USD Tether for example with a sample dataset of the last 7 days (just because of its ease of obtaining data): This is a 1 hour chart: And this is another example of Bitcoin vs USD Tether: 10 000 Ticks chart: Beyond the subjective taste for data visualization. I was wondering would an OHCLV dataset be possible to convert to Tick simply using python. However, I need to understand well what data is needed to do this. Also because I don't understand the meaning of the wicks on a Tick chart? I searched a lot online before asking here, from Investopedia to some Quantitative Finance books but it seems that no one deals with this topic in detail. If anyone has any Articles, Journals or Books to suggest I would be really grateful. Thanks in advance to all of you ## Answer by Jec (score 1) https://quant.stackexchange.com/a/77109 The issue is you are working backwards. You're taking data that has been summarized and trying to asses each part. You can't do that. Tick data is the lowest level of knowledge. For example ... If you know where you at at 9:30 and 9:35 do you know where you are at 9:33? If you have sufficiently small timesteps you can aggregate that data and resample it however, if you get a surge of volume even in that small timestep it might overpower your tick threshold. An example of that would be say on the open or near the close where you get a large influx of volume. Even if your data was around 15s of time data you'd get more than 3k ticks in there for /ES futures. But if you were looking around noon/lunchtime you might go a full minute or two before getting 3k ticks. The only way to truly get a tick chart is to have tick data. If you want to go from one time_set to another (1m to 3m as an example) you need the lowest level time_set then you would resample your dataframe. To do that you'd use: https://pandas.pydata.org/docs/reference/api/pandas.Series.resample.html Hopefully that helps you. ## Answer by Zw Yang (score 0) https://quant.stackexchange.com/a/78002 > Although it is still not clear to me how I can convert them (tick dataframe) to a larger format Like 10, or 20 ticks, since I don't see the volume columns. Converting tick-level data to a larger format can be done even if the original data doesn't include a specific volume column. Typically, tick data includes a timestamp, price, and sometimes the trade volume for each transaction. If the volume is not present, you can still aggregate based on the number of ticks or the time interval. Here's a general approach to aggregate every 10 or 20 ticks: Creating Batches: Group the data into batches of 10 or 20 ticks. Each batch will represent an aggregated data point. Calculating Aggregated Metrics: For each batch, you can calculate various metrics such as the highest price, the lowest price, and the price at the beginning and end of the batch. Calculating Timestamps of Each Batch: You can use the timestamp of the first tick in each batch. Now you will have a new DataFrame.
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.