Time Bars vs Dollar Bars
Time bars ignore market activity and their returns are far from Gaussian. We build dollar bars on BTC/USDT with a rolling threshold and compare their returns with a Jarque-Bera test.
Everyone uses OHLCV data, computes returns from them, or tries to draw support and resistance on them. We fit our models with them and we assume that returns are Gaussian. Of course every quant knows that this assumption is wrong. Another weak point is that time bars don't take the activity of the market into account: a bar is a bar, whether the market is dead or on fire.
Can we find better data than time bars? In this article, we'll compare classic time bars with dollar bars on BTC/USDT.
Time bars aren't Gaussian
A lot of the assumptions we make rely on returns (and log returns) being Gaussian, but in practice, they are not. Let's see what happens with Bitcoin returns on different timeframes. We will use the Jarque-Bera test to compare them.
| Time bars | n | Std | Skew | Excess kurtosis | JB | p-value | Largest move |
|---|---|---|---|---|---|---|---|
| 5m | 957,859 | 0.23% | −0.12 | 108 | 69σ | ||
| 1h | 80,381 | 0.76% | −0.50 | 38 | 27σ | ||
| 1d | 3,348 | 3.5% | −0.96 | 16 | 36,282 | 14σ |
I plot the distribution on a log scale so we can see what happens in its tails. As you can see, the Gaussian does not fit the distribution at all, and it gets only a little better as the timeframe increases.
This is confirmed by the Jarque-Bera test: normality is rejected on every timeframe, and the lower the excess kurtosis, the closer to Gaussian the returns are.
scales with , and the three series don't have the same number of bars. Compare the skewness and the excess kurtosis instead.
By the way, a NIG distribution (Normal Inverse Gaussian, 4 parameters) fits these returns quite well, but we lose the properties and the simplicity of the Gaussian by using this kind of distribution.
Dollar volume is not constant
To create our dollar bars, we need to fix a dollar threshold. The problem is that the dollar volume traded isn't constant over time. Let's see how it evolves:
Fixing a single threshold for the whole series can't be done: computing it would require the volume of the future, a lookahead bias. Instead, the threshold is rolling: it is the average dollar volume traded per 5 minutes (resp. 1 hour and 1 day) over the last few days. That is how we build our dollar bars:
- ~5m dollar bars: 1-day rolling window;
- ~1h dollar bars: 7-day rolling window;
- ~1d dollar bars: 30-day rolling window.
Let's see if they are more Gaussian:
| Bars | n | Std | Skew | Excess kurtosis | JB | Largest move |
|---|---|---|---|---|---|---|
| Time 5m | 957,859 | 0.23% | −0.12 | 108 | 69σ | |
| Dollar ~5m | 821,676 | 0.25% | 0.10 | 31 | 40σ | |
| Time 1h | 80,381 | 0.76% | −0.50 | 38 | 27σ | |
| Dollar ~1h | 80,117 | 0.76% | −0.06 | 13 | 15σ | |
| Time 1d | 3,348 | 3.5% | −0.96 | 16 | 36,282 | 14σ |
| Dollar ~1d | 3,463 | 3.4% | −0.23 | 3.6 | 1,942 | 6.8σ |
What we see is that dollar bars still aren't Gaussian: normality is rejected for all of them. But they are better than time bars on every timeframe: the skewness is closer to zero, the excess kurtosis is divided by 3 to 4, and the largest move in standard deviations is roughly halved. So what else do dollar bars bring?
Other benefits of dollar bars
First, dollar bars follow the activity of the market. In a low-activity market, there won't be a lot of bars, and that's what we want: one hour of a quiet market carries less information than one hour of a very active one.
From this property follows another good thing: no oversampling of low-activity periods. That's a real advantage for our models, because with time bars, a model doesn't see the difference between a dead market and a very active one.
Conclusion
Dollar bars don't make returns Gaussian, but they bring them closer to it, and they sample the market by activity rather than by the clock.
They have a cost though. They need a threshold, and to compute it, we need a rolling window whose size we choose arbitrarily. They are also harder to compute than classic time bars: the best way to build them is from trade data.
References
- López de Prado, M. (2018). Advances in Financial Machine Learning. Wiley. Chapter 2: Financial Data Structures.
- Jarque, C. M., & Bera, A. K. (1980). Efficient tests for normality, homoscedasticity and serial independence of regression residuals. Economics Letters, 6(3), 255–259.
- Barndorff-Nielsen, O. E. (1997). Normal Inverse Gaussian Distributions and Stochastic Volatility Modelling. Scandinavian Journal of Statistics, 24(1), 1–13.
- Clark, P. K. (1973). A Subordinated Stochastic Process Model with Finite Variance for Speculative Prices. Econometrica, 41(1), 135–155.
Angolin serves the full BTC history at 1d, 1h and 1m granularity.


