Tick, Volume and Dollar Bars in Python: A Test on SPY with EODHD Tick Data

Disclosure: EODHD provides me with free access to its data, which is used in this article. The article also contains an affiliate link to EODHD: if you sign up through it, I may receive a commission at no extra cost to you. The analysis and conclusions presented are my own and are for educational purposes only, not investment advice.

Line chart titled SPY.US: number of bars per trading day, from 9 September to 6 October 2026. The time bar count stays flat at 48, while tick, volume and dollar bar counts vary between about 42 and 79 per day, peaking on 16 September.

 

Typically, charts and models in finance look at the market on a clock: one observation every minute, every hour, every day. In Chapter 2 of Advances in Financial Machine Learning, Marcos López de Prado (2018) argues that this is a poor way to sample a market, because information does not arrive at a constant pace. Bars that close after a fixed number of trades, a fixed number of shares or a fixed amount of money traded should sample the market more evenly, and the returns of such bars should be better behaved.

Read the full article on EODHD Academy: Tick, Volume and Dollar Bars in Python with EODHD Tick Data: A Test on SPY

References

EODHD. (n.d.). EODHD Financial Data APIs [Data set]. Use my personal code DROZIMEK10 for 10% off your first purchase.

Dr Krzysztof Ozimek
Dr Krzysztof Ozimek
Quantitative Investment & Trading Research Educator

Related methodological resources

Continue Exploring Quantitative Finance Methodology

Explore PDF textbooks, implementation-oriented bundles, and methodological frameworks in quantitative investing, trading research, and scientific backtesting.

Explore PDF Textbooks & Bundles
Synthetic Data and Backtesting Bundle

Leave a Reply

Your email address will not be published. Required fields are marked *