Is the bitcoin market (Ethereum, Dash and Litecoin) efficient?

After reading the paper, “*Persistence in the cryptocurrency market*”, which tries to answer that question, I was challenged by a colleague to replicate its results. This led me to write this post to highlight the great variability of the Hurst exponent estimation, not only between implementations but between series, and how risky it is to make conclusions from it.

To answer the question about bitcoin market efficiency, the authors of the paper use the concept of **persistence **(*long-memory*) which basically tells us the correlation between points of the series. More persistence implies greater correlation, and therefore the more predictable it will be.

One of the most common ways to estimate persistence is to use the Hurst exponent, which allows us to classify series according to their persistence. Thankfully, it also has a clear interpretation:

- For values close to
*0*, the series is anti-persistent (*reverse*). - For values close to
*0.5*, the series does not have persistence. - For values close to
*1*the series is persistent.

## Paper methodology

Data are used for four of the most important cryptocurrencies (by capitalisation): Bitcoin, Ethereum, Litecoin and Dash, for the period 2014-2017. Secondly, the Hurst exponent is estimated (using RS method) for the same period. Thirdly, the temporal evolution of the Hurst exponent is estimated using a rolling window of 300 days with a step of 50 days between windows, and then is estimated on each resulting subsample. In Pandas, it’s equivalent to a rolling calculation plus a decimating of the series.

## Let’s get to work

(Note: The used functions and the notebook can be found here).

First we download the price series of the four cryptocurrencies. Then, we replace the price values equal to 0 by NaNs. Doing so ensures that the calculations are done correctly.

Next we plot the series of prices:

The previous figure shows the evolution of the closing price according to cryptocompare API. Now let’s calculate the Hurst exponent by three differents methods (RS, DMA, DSOD) for those series, using all the data.

Here we encounter the **main problem**, which is that the Hurst exponent has a wide variability between methods and series. This makes it necessary to be very careful when drawing conclusions from it. If we look at table 2 of the paper, we can see that the values are very different from those calculated here. With some willingness to view flexibly, they are more like the results of the RS column, because they keep the same order. The DMA method is far from what we would expect, so we can now discarded it.

## Persistence’s time evolution

With this in mind, we move on to the next part. Here, we perform the same calculation every 50 days, for rolling windows of 300 days. To calculate the complete series we do the following:

Note that the series is decimated to be equivalent to the paper: it takes one row out of every 50. See below for results:

*(300-day rolling *Hurst exponent *every 50 days).*

A quick glance is enough to make us realise that the results do not coincide very clearly with those of the paper in question. This may be due to the implementation of the exponent used (RS and DSOD), or else to the data used. Since the market for cryptocurrencies operates 24 hours a day, the criterion for selecting the closing price is subjective. In any case, it seems evident that robustness is not among the virtues of the Hurst exponent, or at least its estimates.

We see that the Hurst exponent for the BTC and ETH is always over 0.5. This would indicate a certain degree of persistence, which reveals that both markets are not efficient. Another important point is the great volatility of the estimation when using the DSOD method in the case of DASH, which even becomes negative. This is theoretically impossible by definition, but possible in the implementation.

Personally, I think that the idea of decimating the series doesn’t look good, so I preferred to make the same figure as before, but smoothing the results with a 50-day rolling mean filter, and this is the result:

*(50-day rolling mean of the 300-day rolling *Hurst’s *exponent).*

We can see that it does not change the conclusions and provides more context. The paper continues to make a hypothesis contrast, but that’s outside the objective of this post.

## Conclusions

Thus, I’ve shown you hidden parts of the Hurst exponent. There are dangers when using such a volatile metric as Hurst exponent, not only between implementations but between series (with similar H theoretical). You should use it carefully from now on, as you may be making unwanted mistakes. In light of the results above, cryptocurrency market efficiency or inefficiency cannot be asserted.

**Do you feel like knowing more about Hurst’s exponent? Here are some references to satisfy your curiosity:**

*Methods related:*

- RS : Hurst, H. E. (1951). Long term storage capacity of reservoirs. ASCE Transactions, 116(776), 770-808.
- DMA : Alessio, E., Carbone, A., Castelli, G. et al. Eur. Phys. J. B (2002) 27: 197. http://sci-hub.tw/10.1140/epjb/e20020150
- DSOD : Istas, J.; G. Lang (1994), “Quadratic variations and estimation of the local Hölder index of data Gaussian process,” Ann. Inst. Poincaré, 33, pp. 407–436.

*Variability related:*

- Matlab function – https://es.mathworks.com/help/wavelet/ref/wfbmesti.html
- The Effect of the Underlying Distribution in Hurst Exponent Estimation – http://dx.plos.org/10.1371/journal.pone.0127824
- Estimating long range dependence: finite sample properties and confidence intervals – https://arxiv.org/pdf/cond-mat/0103510.pdf