Tick Data, Bar Resampling, and Timeframe Identification
Summary
This tutorial distinguishes bar data from tick data and explains why the distinction matters when handling market time. Bars summarize open, high, low, close, and volume over a chosen interval. The text describes a common domestic tick snapshot as a frequent aggregate of trading information, while a true order-book tick records a change in the book, such as an order addition, cancellation, price change, or trade. It cautions that snapshot ticks do not reveal every underlying transaction and that several trades may occur between snapshots.
The tutorial gives rules for combining daily bars into weekly bars: take the final daily close, the first daily open, the maximum high, the minimum low, and the sum of volume. It also proposes identifying a bar uniquely with its timestamp and a custom timeframe identifier, which can support timers and detection of newly formed bars. It is an introductory data-handling explanation rather than a trading strategy, and it does not compare the accuracy or market coverage of different feed types.
Key ideas
- Bars summarize price and volume over an interval, while order-book ticks record changes in book state.
- Frequent snapshot ticks may aggregate activity and can miss individual transactions between observations.
- A weekly bar can be derived from daily bars using the first open, last close, highest high, lowest low, and summed volume.
- Pairing a timestamp with a timeframe identifier distinguishes bars for the same instrument and time.
- Timestamps can support periodic actions and checks for the arrival of a new bar.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.