Bitcoin at high frequency
Abstract
EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.
Full text
Catania, Leopoldo; Sandholdt, Mads Article Bitcoin at high frequency Journal of Risk and Financial Management Provided in Cooperation with: MDPI – Multidisciplinary Digital Publishing Institute, Basel Suggested Citation: Catania, Leopoldo; Sandholdt, Mads (2019) : Bitcoin at high frequency, Journal of Risk and Financial Management, ISSN 1911-8074, MDPI, Basel, Vol. 12, Iss. 1, pp. 1-20, https://doi.org/10.3390/jrfm12010036 This Version is available at: https://hdl.handle.net/10419/239021 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. https://creativecommons.org/licenses/by/4.0/
Journal of Risk and Financial Management Article Bitcoin at High Frequency Leopoldo Catania 1,∗and Mads Sandholdt 2 1Department of Economics and Business Economics, Aarhus University and CREATES, Aarhus BSS, Fuglesangs Allé 4, DK-8210 Aarhus V, Denmark 2Tvilum A/S, Egon Kristiansens Allé 2, DK-8882 Faarvang, Denmark; [email protected] *Correspondence: [email protected]; Tel.: +44-8716-5536 Received: 12 December 2018; Accepted: 30 January 2019; Published: 15 February 2019 Abstract: This paper studies the behaviour of Bitcoin returns at different sample frequencies. We consider high frequency returns starting from tick-by-tick price changes traded at the Bitstamp and Coinbase exchanges. We find evidence of a smooth intra-daily seasonality pattern, and an abnormal trade- and volatility intensity at Thursdays and Fridays. We find no predictability for Bitcoin returns at or above one day, though, we find predictability for sample frequencies up to 6 h. Predictability of Bitcoin returns is also found to be time–varying. We also study the behaviour of the realized volatility of Bitcoin. We document a remarkable high percentage of jumps above 80%. We also find that realized volatility exhibits: (i) long memory; (ii) leverage effect; and (iii) no impact from lagged jumps. A forecast study shows that: (i) Bitcoin volatility has become more easy to predict after 2017; (ii) including a leverage component helps in volatility prediction; and (iii) prediction accuracy depends on the length of the forecast horizon. Keywords: bitcoin; realized volatility; HAR; high frequency 1. Introduction One of the reasons why cryptocurrencies—and in particular Bitcoin introduced by Nakamoto (2009)—became so popular in 2017 has been their huge price increase which caught the attention from both the media and regular people. Indeed, we find that approximately 65% of all Bitcoin transactions happened in 2017 or later. 1 As a consequence of this huge interest, Bitcoin experienced a price increase of 1324% from the begin to the end of 2017. The financial industry and the academics have also been very interested in Bitcoin over the last years. For example, the Chicago Mercantile Exchange (CME) as well as Nasdaq and the Tokyo Financial Exchange started to negotiate Bitcoin futures during 2017 and 2018, see CME (2017), Bloomberg (2017), and Cryptocoinsnews (2017). Academics working in the field of financial econometrics have studied Bitcoin using well known methodologies, such as ARMA–GARCH models. For example, Dyhrberg (2016) compared Bitcoin with gold and the American dollar and classified the behavior of Bitcoin in between these two assets. Bariviera (2017) found long memory in the Bitcoin volatility measured as the logarithmic difference between intraday highest and lowest prices. Phillip et al. (2018) document long memory in cryptocurrencies as well. Additional results about the time–dependence properties of cryptocurrencies are reported in Zhang et al. (2019). Ardia et al. (2018) and Stavroyiannis (2018) model and forecast the value at risk for Bitcoin. Recently, Catania and Grassi (2017) show that standard volatility models, like GARCH, are generally not suitable for cryptocurrency time–series and suggest to use a more sophisticated modelling technique based on the score driven approach, see Creal et al. (2013) and Harvey (2013). The predictability of 1Specifically, 54.42% for the Bitstamp exchange and 68.78% for the Coinbase exchange. J. Risk Financial Manag. 2019,12, 36; doi:10.3390/jrfm12010036 www.mdpi.com/journal/jrfm
J. Risk Financial Manag. 2019,12, 36 2 of 20 cryptocurrencies returns and volatility has been studied in Catania et al. (2019) and Catania et al. (2018) , respectively. Understanding the behavior of Bitcoin volatility has important implications for individual investors and public institutions. Individual investors – people not in the finance industry but interested in trading cryptocurrencies – should be informed about how the Bitcoin volatility evolves and whether these investment opportunities match with their risk profile. Public institutions, like the central banks of Ecuador, Tunisia, and Sweden who are considering issuing their own cryptocurrency, should be interested in the behavior of Bitcoin due to the possible systemic risk they would face by entering in this new market. In this paper, we study the Bitcoin returns at high frequency and its realized volatility measure. We start by describing the construction of our dataset from the raw transactions downloaded from the Bitstamp and Coinbase exchanges. 2 The first part of our analysis focuses on the in sample properties of Bitcoin returns sampled at different frequencies. We study the autocorrelation structure of Bitcoin returns as well as the intraday and intraweek seasonalities of Bitcoin volatility and traded volumes. Results indicate strong presence of both intraday and intraweek seasonality in the volatility. We also document that seasonality is different across exchanges. Specifically, Coinbase follows the US trading activity, while Bitstamp the European one. The second part the paper focuses on predicting realized volatility for Bitcoin using several forecasting models. Realized volatility is a consistent estimator of the quadratic variation of the price process and is presently widely used in financial and risk management applications, see Bauwens et al. (2012) for a recent overview. We consider the baseline HAR-RV model of Corsi (2008) as well as its generalization with the inclusion of jumps (Andersen et al. 2007;Barndorff-Nielsen 2004;Barndorff-Nielsen and Shephard 2003;Barndorff-Nielsen et al. 2006) and the leverage component (Corsi et al. 2012). Our results suggest that: (i) the predictability of Bitcoin realized volatility has increased over time; (ii) including the leverage component helps in predicting future volatility levels; and (iii) predictability varies with the forecast horizon. Both in sample and out of sample results are reported for the two exchanges as well as for the subperiod 2017–2018 which coincides with the explosion in the interest of Bitcoin. Overall, our results indicate several peculiarities of Bitcoin volatility compared to the volatility of alternative investment opportunities. First, we find that the frequency of jumps is much higher compared to common findings. Second, in contrast to Catania and Grassi (2017) and Ardia et al. (2018) who find an “inverted” leverage effect, our results show that Bitcoin exhibits a leverage effect similar to that of equity assets when this is measured using the Realized Volatility estimator. This last point also supports the arguments of Dyhrberg (2016) who classify Bitcoin as an asset and not as an exchange rate. Indeed, the leverage effect is of little importance for exchange rates as documented for example by Hansen and Lunde (2005) and Ardia et al. (2018). The structure of the paper is organized as follows. Section 2details the dataset we build starting from tick–by–tick price changes to equally spaced logarithmic returns. Section 3studies the behaviour of Bitcoin returns sampled at different frequencies. Section 4analyses the realized volatility of Bitcoin. Conclusions are drawn in Section 5. 2. Data Our dataset is composed by tick-by-tick traded prices recorded at the two exchanges Bitstamp and Coinbase over which the majority of the transactions takes place. From both exchanges we collect the tick-by-tick transaction data using the freely available API at www.api.bitcoincharts.com. The raw data include the transaction price for every trade, along with the amount of Bitcoins traded. Observations 2 Among several exchanges where Bitcoin is traded we have selected two of the most active ones. Another possibility would have been to consider GDAX instead of Coinbase since this exchange might give a better representation of Bitcoin. However, we have decided to use Coinbase since, differently from GDAX and Bitstamp which are traditional exchanges, it is a click and buy exchange which allows investor to immediately invest in Bitcoin. We thank an anonymous referee for pointing out this to us.
J. Risk Financial Manag. 2019,12, 36 3 of 20 start the 13 September 2011 on Bitstamp and the 1 December 2014 on Coinbase and are reported in UTC time. We record data up to 18 March 2018 for a total of 22,457,894 trades for Bitstamp and 39,439,004 for Coinbase. Unfortunately, trades are reported with a precision of one second. However, even though it is not reported in the exchanges documentations, we conjecture that trades within a second are reported in a chronological order. Overall, we find that 47.35% and 70.40% of the recorded transactions happen simultaneously with at least one other trade for Bitstamp and Coinbase, respectively. Data Cleaning Similar to standard high-frequency financial time-series, raw tick-by-tick Bitcoin prices are contaminated by wrongly reported observations. As suggested by Barndorff-Nielsen et al. (2009), we start by removing all those transactions associated with zero or negative volume. As a second step of data cleaning, we apply the methodology of Brownlees and Gallo (2006) to filter each transaction price. Specifically, let pi be the price of Bitcoin associated with trade i in our dataset, we apply the following rule: (|pi−¯ pi(k)|<3si(k)+γ)=(True, piis kept False, piis removed , (1) where ¯ pi(k) and si(k) denote δ -trimmed mean and sample standard deviation of a neighborhood of k observations around i , respectively. According to Brownlees and Gallo (2006), the positive integer k should be chosen as a function of the trading intensity, which for Bitcoin is relative high since there is no minimum buy-level. The additional tuning parameter γ∈( 0, 1 ) is a granularity parameter and should prevent a zero standard deviation caused by sequences of k equal prices. Finally, δ∈( 0, 1 ) helps to reduce the effect of extreme observations during the filtering procedure. We run the filter reported in Equation (1) using different choices of γ , and k . Table 1reports results from the cleaning procedure in terms of percentage of outliers eliminated over the full sample and on a daily basis, for different choices of the tuning parameters γ∈ { 0.02, 0.04, 0.06 } and k∈ { 40, 60, 80 } . We set δ= 5% and found that results are robust to this choice. Table 1. Number of outliers and average number of outliers per day in percentage points as a function of the rolling trimmed mean parameter k and the granularity parameter γ . Results are reported for Coinbase and Bitstamp using Equation (1) with δ=5%. (k,γ) (40, 0.02) (40, 0.04) (40, 0.06) (60, 0.02) (60, 0.04) (60, 0.06) (80, 0.02) (80, 0.04) (80, 0.06) Bitstamp Number of outliers 141,029 134,584 128,934 104,018 99,007 85,593 82,623 78,603 75,438 Average outliers per day 0.51% 0.46% 0.42% 0.38% 0.34% 0.30% 0.31% 0.27% 0.25% Coinbase Number of outliers 118,162 107,936 100,570 98,037 89,922 84,009 85,499 78,482 73,521 Average outliers per day 0.24% 0.20% 0.17% 0.19% 0.16% 0.14% 0.17% 0.14% 0.12% The percentage of outliers we find are consistent with the findings of Brownlees and Gallo (2006) and Barndorff-Nielsen et al. (2009). For k= 80 and γ= 0.06 we find almost half the amount of outliers than for the case k= 40 and γ= 0.02. In general, we see a clear decreasing pattern in the amount of outliers when increasing the surrounding neighborhood as well as the granularity parameter. Consistently with Brownlees and Gallo (2006), we also find that the amount of outliers increases along with the increase in the number transactions. Indeed, for the case k= 60 and γ= 0.02, we find that 58.66% and 81.95% of the outliers are from 2017 or later for Bitstamp and Coinbase, respectively. Generally, we find that the outcome of the cleaning procedure is similar to that of Brownlees and Gallo (2006) suggesting that no particular attention should be made when dealing with high-frequency Bitcoin prices compared to the standard procedure employed for other financial series. Therefore, we stick to Brownlees and Gallo (2006) and use price series filtered using (k,γ)= ( 60, 0.02 ) for our analysis. Starting from the filtered series of prices, we compute an equally spaced sequence of one–second prices and volumes. When multiple transactions are available within the same second, we
J. Risk Financial Manag. 2019,12, 36 4 of 20 set the final price to the median price computed over that second. Days with less then 40 observations have been removed for the dataset. We removed 167 days for Bitstamp and 16 days for Coinbase from the begin of the sample. Beside this, in order to remain with a time series without missing days, we let our data set to start from 17 March 2013 for Bitstamp and from 2 February 2015 for Coinbase. In order to isolate the effect of 2017, for the rest of the paper results are reported for the full sample as well as for the sub-sample after 1 January 2017 at midnight labelled as “Hype”. Table 2summarizes the results from the cleaning procedure. Table 2. This table summarizes the results from the cleaning procedure. Starting from the raw dataset, transactions associated with non positive volume are removed. Outliers are identified following the procedure of Brownlees and Gallo (2006). The “Simultaneous ticks” reports the number of transactions that occurs within the same second. The row “Final sample size in seconds” and “ Trading days” report the number of equally spaced observations in second and the number of trading days, respectively. Results are reported for the two exchanges Bitstamp and Coinbase as well as for the full sample and the sub–sample “Hype”. Bitstamp Coinbase Full Sample Hype Full Sample Hype Raw observations 22,346,195 12,217,195 39,285,138 27,126,897 Volume ≤0 1112 98 0 0 Outliers 104,295 61,350 103,071 85,418 Simultaneous ticks 9,976,748 5,338,296 28,400,400 18,861,682 Final sample size in seconds 12,263,584 6,817,445 10,781,667 8,179,797 Trading days 1825 442 1132 442 3. High Frequency Bitcoin Returns and Realized Volatiltiy We start our analysis by computing the series of percentage Bitcoin logarithm returns at second s=1, . . . , 86, 400 in day tas: rs,t=100 ×[log(ps,t)−log(ps−1,t)], where ps,t and ps−1,t are two subsequent Bitcoin prices for day t . One second logarithmic returns are subsequently aggregated at different frequencies as reported below. We also compute the realized volatility for day t as in Andersen et al. (2001b). As suggested by Liu et al. (2015) realized volatility is computed using 5-min returns, as: RVt= 288 ∑ j=1 ˜ r2 j(300),t, where ˜ rj(N),t=∑mj s=mjrs,t and mj= (j− 1 )×N+ 1 and mj=j×N and we set N= 300 to achieve 5-min. aggregation. Table 3reports a comparison between the realized variance of Bitcoin and the variance of S&P 500 measured with the VIX. We note that the volatility of Bitcoin and that of S&P 500 are comparable during the years 2015 and 2016. On the contrary, in the period 2017–2018 the volatility of Bitcoin is considerably higher compared to that of S&P 500. We also note that volatility of Bitcoin is higher during the bear market period of 2018 than during the bubble period of 2017. Overall, results indicate that the volatility of volatility is much higher for Bitcoin than for the S&P 500. Descriptive statistics for Bitcoin percentage log returns aggregated at the 5-min. frequency are reported in Table 4. We observe that both series are characterized by extreme observations. We find that returns traded at the Bitstamp exchange exhibit higher volatility. However, we also note that returns traded at Coinbase are characterized by more pronounced negative skewness and higher excess of kurtosis. Overall, departure from Gaussianity is evident from the data. To conclude the analysis of Bitcoin returns at 5-min, in Figure 1we report Gaussian kernel densities estimated on the mean,
J. Risk Financial Manag. 2019,12, 36 5 of 20 standard deviation, skewness, and kurtosis coefficients computed over each trading day available in our dataset. Interestingly, while the skewness and the excess of kurtosis coefficients are similar across exchanges and sub–samples, we note that the distribution of the standard deviation is considerably shifted to the right during the Hype period. Furthermore, it is also evident that during the Hype period we observe more dispersed average returns. Table 3. Comparison over the period 2015–2018 between daily average realized variance of Bitcoin, measured using Coinbase and Bitstamp 5-min returns and S&P 500 measured using the volatility index VIX. The first four columns report the sample while the last four columns the standard deviation (i.e., the volatility of volatility). Mean Standard Deviation 2015 2016 2017 2018 2015 2016 2017 2018 S&P 500 16.67 15.83 11.09 16.64 4.34 3.97 1.36 5.09 Coinbase 11.25 6.89 37.24 59.02 29.76 17.26 78.46 67.15 Bitstamp 23.10 10.08 37.46 64.88 72.48 14.69 57.19 62.44 Panel (A)Bitstamp 0 10 20 30 40 50 −0.06 −0.04 −0.02 0 0.02 0.04 0.06 (a) Mean Full Hype 0.0 0.2 0.4 0.6 0.8 −4 −2 0 2 (c) Skewness Full Hype 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 0 0.2 0.4 0.6 0.8 1 (b) Standard deviation Full Hype 0.00 0.05 0.10 0.15 0.20 0 20 40 60 80 100 120 140 160 180 (d) Kurtosis Full Hype Panel (B)Coinbase 0 10 20 30 40 50 60 −0.06 −0.04 −0.02 0 0.02 0.04 0.06 (a) Mean Full Hype 0.0 0.2 0.4 0.6 −4 −2 0 2 (c) Skewness Full Hype 0 1 2 3 4 0 0.2 0.4 0.6 0.8 1 (b) Standard deviation Full Hype 0.00 0.02 0.04 0.06 0.08 0.10 0.12 0.14 0 20 40 60 80 100 120 140 (d) Kurtosis Full Hype Figure 1. Gaussian kernel densities estimated using 5 min returns over the daily mean (a); standard deviation (b); skewness (c) and excess of kurtosis (d) coefficients for Bitstamp (panel A ) and Coinbase (panel B). Results are reported for the full sample (black) and for the Hype period (red).
J. Risk Financial Manag. 2019,12, 36 6 of 20 Table 4. Summary statistics of the 5 min Bitcoin log returns. Results are reported for the two exchanges Bitstamp and Coinbase over the full period “Full” and conditional on the Hype period. Bitstamp Coinbase Full Hype Full Hype Maximum 61.09 7.41 10.62 10.62 Minimum −36.89 −15.54 −21.02 −21.02 Mean 0.00 0.00 0.00 0.00 Median 0.00 0.00 0.00 0.00 Std. Dev. 0.31 0.33 0.20 0.31 Skewness −0.28 −0.38 −0.58 −0.40 Excess of kurtosis 8.84 8.28 14.36 10.22 3.1. Are Bitcoin Returns Predictable? Catania et al. (2019) investigate the predictability of Cryptocurrencies returns—and in particular Bitcoin—at one–day horizon.3They find evidence of predictability for Bitcoin returns at the one–day frequency when averaging over a large number of Dynamic Linear Models resorting to the Dynamic Model Averaging technique. In this section, we only focus on the plain autoregressive model of order one defined as: ˜ rj(N),t=µN+φN˜ rj(N)−1,t+σεj(N),t,εj(N),t iid ∼(0, 1), where φN is the first order autoregressive coefficients for frequency N . Figure 2plots the estimated coefficient φN for Bitstamp and Coinbase according to different values of N starting from N=300 (five minutes) to N= 2, 592, 000 (30 days). Results for the Hype period are also reported. We find that φN is negative and statistical different from zero when returns are aggregated up to 6 h. The autoregressive coefficient follows an upward trend and a peculiar curve around the 12 h aggregation frequency. After this point, the estimated coefficient decreases again and start being quite noisy around 0. We find that this behaviour is consistent across exchanges and also holds during the Hype sub-sample. We conclude that there is no strict evidence indicating that Bitcoin returns can be predicted using a first order autoregressive model when looking at horizons longer than a day. However, by looking at intraday horizons, and especially within the first 6 hours, it seems like there is some predictability, even though the statistical significance is limited.4 Gencay et al. (2001) note that the first order autocorrelation of high frequency financial assets is time–varying resulting in different patterns of predictability over time. We follow their approach and investigate the stability of the estimated φN over time for different N . We expect that due to the increase in the number of transactions the Bitcoin market has become more efficient over time, resulting in insignificant predictability based on prior observations. Thus, we estimate φN for N= 900 (15 min), N= 1800 (30 min), and N= 3600 (one hour) using only observations available in the previous month of data and update its value according to a rolling window of fixed length. Figure 3displays the estimated φN coefficients for Bitstamp and Coinbase. We find that during the begin of the sample Bitstamp shows a significant predictability pattern for both the 30 min and one hour intervals. Though, from the beginning of 2015, this predictability seems to have shrinkage down and lead into the 95% confidence range indicating insignificant predictability. This pattern indicates that Bitcoin traded at Bitstamp has become more efficient especially during the Hype period. Differently, in the Coinbase exchange we do not find the same predictability pattern. A possible explanation could be the more 3See also Balcilar et al. (2017) who examine the causal relation between Bitcoin return/volatility and traded volumes. 4 However, we acknowledge that at the time of writing there is a lag of 10.83 min between the placement and execution of a trade on Bitstamp. Differently, on Coinbase trade execution is immediate.
J. Risk Financial Manag. 2019,12, 36 7 of 20 substantial amount of trades for the Coinbase exchange compared to Bitstamp, which implies that Coinbase is a more liquid and efficient market. −0.4 −0.2 0.0 0.2 0.4 Full −0.4 −0.2 0.0 0.2 0.4 Hype 5 min 30min 1 hour 6 hours 12 hours 1 day 3 day 7 day 14 days 30 days −0.4 −0.2 0.0 0.2 0.4 Full −0.4 −0.2 0.0 0.2 0.4 Hype 5 min 30min 1 hour 6 hours 12 hours 1 day 3 day 7 day 14 days 30 days Figure 2. Linear correlation coefficient calculated as a function of the size of the time interval of returns for Bitstamp left and Coinbase right. The horizontal axis is the logarithmic of the time interval. −0.3 −0.2 −0.1 0.0 13/05 13/11 14/05 14/11 15/05 15/11 16/05 16/11 17/05 17/11 18/03 5 min. −0.3 −0.2 −0.1 0.0 0.1 13/05 13/11 14/05 14/11 15/05 15/11 16/05 16/11 17/05 17/11 18/03 15 min. −0.3 −0.2 −0.1 0.0 0.1 0.2 0.3 13/05 13/11 14/05 14/11 15/05 15/11 16/05 16/11 17/05 17/11 18/03 30 min. −0.4 −0.2 0.0 0.2 0.4 13/05 13/11 14/05 14/11 15/05 15/11 16/05 16/11 17/05 17/11 18/03 60 min. −0.2 −0.1 0.0 0.1 15/03 15/06 15/09 15/12 16/03 16/06 16/09 16/12 17/03 17/06 17/09 17/12 18/03 5 min. −0.2 −0.1 0.0 0.1 0.2 0.3 15/03 15/06 15/09 15/12 16/03 16/06 16/09 16/12 17/03 17/06 17/09 17/12 18/03 15 min. −0.2 −0.1 0.0 0.1 0.2 15/03 15/06 15/09 15/12 16/03 16/06 16/09 16/12 17/03 17/06 17/09 17/12 18/03 30 min. −0.5 −0.4 −0.3 −0.2 −0.1 0.0 0.1 0.2 15/03 15/06 15/09 15/12 16/03 16/06 16/09 16/12 17/03 17/06 17/09 17/12 18/03 60 min. Figure 3. First order serial autocorrelation coefficient estimated using a fixed rolling windows of one month for Bitstamp (top figures) and Coinbase (bottom figures). Horizontal dashed lines indicate the 95% confidence interval. The dashed vertical line indicates the start of the Hype period at the begin of January 2017. Results are reported for Bitcoin logarithmic returns sampled at 5, 15, 30, and 60 min. 3.2. Seasonality in Bitcoin’s Volatility Similar to foreign exchange rates, also Bitcoin exhibits a large amount of seasonality in its volatility, see for example Dacorogna et al. (1993), Taylor and Xu (1997), and Breedon and Ranaldo (2013). We investigate the daily seasonality pattern by looking at the intraday realized volatility computed at 30 min over the full sample and over the Hype period, as well as the average traded volumes computed at the same frequency. Figure 4reports a graphical illustration of the intraday realized volatility and average volumes every 30 min. The figure shows a clear seasonality pattern for the average traded volume (vertical lines) and intraday realized volatility (red line). It is interesting to see the differences in the two exchanges peak hours, referring to the fact that Bitstamp is a European-based exchange, and Coinbase is a US-based exchange. Hence, they have spikes in different timezones associated with their working hours. Asia should be represented in both exchanges but does not seem to influence the two figures. We also note that the seasonal pattern has not changed during the Hype period.
J. Risk Financial Manag. 2019,12, 36 8 of 20 0.8 1.0 1.2 1.4 1.6 1.8 2.0 200 250 300 350 Full 0.8 1.0 1.2 1.4 1.6 200 250 300 Hype 01:00 03:00 05:00 07:00 09:00 11:00 13:00 15:00 17:00 19:00 21:00 23:00 Average sum of volume Average sum of squared returns 0.3 0.4 0.5 0.6 0.7 0.8 150 200 250 300 Full 0.6 0.8 1.0 1.2 1.4 1.6 1.8 200 250 300 350 400 450 Hype 01:00 03:00 05:00 07:00 09:00 11:00 13:00 15:00 17:00 19:00 21:00 23:00 Average sum of volume Average sum of squared returns (A) (B) Figure 4. Intraday realized volatility (red lines, left axis) and average volumes (vertical bars, right axis) computed every 30 min for Bitcoin traded at the Bitstamp (panel A ) and Coinbase (panel B ) exchanges. Besides the analysis of the intra-daily seasonality, we also investigate whether there is presence of intra-weekly seasonality. Following Dacorogna et al. (1993), we divide the week into a sequence of 2 h equally spaced observations. Figure 5reports the weekly sequence based on average realized volatility (red line) and the average sum of volume (vertical lines). The effect of the weekends is clear from the figure. However, we note that this effect is more pronounced during the Hype period reported in the top panel of the figure. Interestingly, we also find evidence of intra–weekly seasonality for other days. Indeed, for both the exchanges we observe increasing activity from Monday to Thursday–Friday and then a decreasing curve over Saturday and Sunday. Remarkably, this effect during working days is not present for regular financial trading assets. 4 6 8 10 600 800 1000 1200 1400 1600 Full 2 3 4 5 6 7 8 9 600 800 1200 1600 Hype Mon Tue Wed Thu Fri Sat Sun Average sum of volume Average sum of squared returns 1 2 3 4 5 400 600 800 1000 1400 Full 2 4 6 8 10 12 1000 1500 2000 Hype Mon Tue Wed Thu Fri Sat Sun Average sum of volume Average sum of squared returns Figure 5. Weekly seasonality computed for the Bitstamp (left figures) and Coinbase (right figures) exchanges over the full sample and Hype period. Red lines report the average realized volatility (left axis) while the vertical bars report the average sum of volume (right axis). 4. Modelling and Predicting Bitcoin Realized Volatility In this section, we report on an in sample and out of sample forecast analysis of the Bitcoin’s realized volatility using several Heterogeneous Autoregressive (HAR) specifications. HAR has been originally introduced by Corsi (2008) in order to approximate the slow decay of the autocorrelation function of realized volatility. The model builds on the assumption of three different types of investors creating three different types of volatility. The investors are: (i) short-term traders with daily activity; (ii) medium investors who typically regulate their portfolio once a week; and (iii) long-term investors with horizon around a month or longer. Corsi (2008) and Corsi et al. (2012) argue that while the level of short-term volatility does not affect the long-term traders, the level of long-term volatility does affect the short-term traders, as it determines the expectation to the future size of trends and risks. Hence,
J. Risk Financial Manag. 2019,12, 36 15 of 20 Table 7. Cont. Panel (B)—Coinbase Daily h=1 Model RW HAR-RV HAR-RV-J HAR-RV-L HAR-RV-CJ HAR-RV-CJ-L RVtRV 1 2 tLog (RVt)RVtRV 1 2 tLog (RVt)RVtRV 1 2 tLog (RVt)RVtRV 1 2 tLog (RVt)RVtRV 1 2 tLog (RVt)RVtRV 1 2 tLog (RVt) R215.90% 44.46% 67.50% 17.33% 47.51% 69.58% 17.23% 47.10% 69.52% 19.28% 48.70% 69.82% 17.52% 47.92% 69.69% 19.43% 48.83% 69.85% MAFE 23.24 1.61 0.77 20.15 1.42 0.72 20.79 1.45 0.72 19.97 1.40 0.72 21.11 1.45 0.72 20.74 1.42 0.72 RMSFE 69.21 2.87 1.02 58.25 2.57 0.95 59.34 2.58 0.95 57.48 2.54 0.95 59.37 2.56 0.95 58.36 2.53 0.95 DM12.01 (4.51)2.99 (0.29)3.92 (0.01)2.04 (4.16)2.98 (0.30)3.90 (0.01)2.15 (3.22)3.34 (0.09)3.93 (0.01)2.04 (4.20)2.97 (0.31)4.20 (0.00)2.18 (2.98)3.26 (0.12)4.18 (0.00) DM2−1.57 (11.70)−1.22 (22.26)0.23 (81.61)1.34 (18.19)1.58 (11.57)0.13 (89.53)−1.57 (11.68)0.29 (77.49)1.32 (18.68)−0.11 (91.59)1.07 (28.36)0.91 (36.36) Weekly h=7 Model RW HAR-RV HAR-RV-J HAR-RV-L HAR-RV-CJ HAR-RV-CJ-L RVtRV 1 2 tLog (RVt)RVtRV 1 2 tLog (RVt)RVtRV 1 2 tLog (RVt)RVtRV 1 2 tLog (RVt)RVtRV 1 2 tLog (RVt)RVtRV 1 2 tLog (RVt) R215.88 38.10% 56.62% 19.01% 37.90% 57.01% 17.87% 37.90% 57.43% 20.18% 41.79% 59.80% 18.79% 38.88% 56.77% 18.09% 41.08% 58.73% MAFE 23.85 1.72 0.90 20.02 1.73 0.84 20.29 1.73 0.83 20.33 1.67 0.82 20.82 1.72 0.84 21.67 1.69 0.82 RMSFE 42.79 2.47 1.10 36.28 2.48 1.04 36.94 2.48 1.04 36.28 2.39 1.02 37.22 2.46 1.04 38.06 2.40 1.02 DM13.87 (001)3.82 (0.01)2.83 (0.48)3.42 (0.07)3.85 (0.01)3.25 (0.12)3.97 (0.01)4.90 (0.00)3.50 (1.61)3.39 (0.07)4.27 (0.00)3.25 (0.12)2.84 (0.47)4.93 (0.00)3.66 (0.03) DM2−1.52 (12.90)−0.33 (74.46)1.93 (5.38)0.00 (99.78)1.97 (4.88)1.61 (10.76)−1.91 (5.69)0.79 (42.80)1.02 (31.04)−1.96 (5.02)1.57 (11.67)1.67 (9.49) Monthly h=28 Model RW HAR-RV HAR-RV-J HAR-RV-L HAR-RV-CJ HAR-RV-CJ-L RVtRV 1 2 tLog (RVt)RVtRV 1 2 tLog (RVt)RVtRV 1 2 tLog (RVt)RVtRV 1 2 tLog (RVt)RVtRV 1 2 tLog (RVt)RVtRV 1 2 tLog (RVt) R232.15% 38.57 42.45 31.06% 41.34% 45.15% 30.22% 41.10% 45.06% 36.82% 46.32% 45.13% 33.57% 40.18% 37.76% 33.18% 42.74% 35.17% MAFE 18.40 1.81 0.93 16.95 1.74 0.93 16.98 1.73 0.92 16.85 1.69 0.95 17.09 1.71 0.95 17.38 1.72 0.98 RMSFE 27.10 2.30 1.14 26.69 2.26 1.10 26.68 2.24 1.09 25.22 2.15 1.12 25.65 2.18 1.12 25.51 2.13 1.16 DM10.51 (61.08)0.71 (47.67)1.64 (10.23)0.52 (60.24)1.00 (31.76)2.04 (4.22)2.59 (0.97)2.48 (1.32)0.86 (39.03)2.07 (3.85)2.66 (0.81)0.95 (34.28)2.41 (1.62)2.97 (0.31)−0.55 (58.02) DM20.06 (95.32)2.40 (1.68)3.87 (0.01)3.91 (0.01)2.61 (0.91)−0.73 (46.87)3.98 (0.01)4.69 (0.00)−2.13 (3.39)2.07 (3.92)2.84 (0.46)−2.55 (1.09)
J. Risk Financial Manag. 2019,12, 36 16 of 20 Along with the MAFE and RMSFE measures, the table also reports the R2 of the Mincer–Zarnowitz regression defined by: RVt+h=c+βc RVt+h+et+h, (17) as well as the Diebold and Mariano (1994) test statistics of each model with respect to the benchmark RW (DM1) and with respect to the plain HAR-RV model (DM2). Results indicate that predictability is higher for lower forecast horizons. Indeed, looking at the R2 we find that when h= 1, up to 65% of the log realized variance variability can be predicted with the HAR-RV-CJ model. However, when h= 28 the R2 decreases to only 33%. Overall, the inclusion of jumps does not always translate in better predictions. In this respect, results are a bit mixed. Differently, models that include the leverage component seem to generally perform better than the standard HAR-RV model. Looking at the Diebold Mariano test statistic with respect to the benchmark model (DM1), we find strong evidence of predictability of all specifications. Differently, when we focus on predictability with respect to the plain HAR-RV model, results are mixed and do not show a clear pattern. Comparing results between the two exchanges indicates that realized variance is easier to predict in the Coinbase exchange. To conclude our analysis we study the stability of prediction gains with respect to the RW benchmark over time. To do so, we compute the cumulative absolute error of a forecast model over the cumulative absolute error of the benchmark model. Specifically, the ratio of cumulative absolute errors RCAE at time fis defined as: RCAEf=∑f s=1ej,s ∑f s=1|ei,s|, (18) where ej,s is the forecast error of generic model j at time s and ei,s is the forecast error of the benchmark specification. Results are reported for i=RW and i=HAR-RV . Values of RCAEf below one indicate outperformance with respect to the benchmark and viceversa. Figure 8displays the RCAEf for the log realized variance for different forecast horizons and the two exchanges. In the top graph of each sub-figure the comparison is performed with respect to RW, while in the bottom graphs we use HAR-RV as the benchmark. Results are very clear and show that predictability of the realized variance is increased over time. Indeed, at the start of the sample we observe large losses of all models with respect to RW and HAR-RV probably due to uncertainty in estimated parameters. However, at the end of the forecasting period those losses seem to vanish suggesting that volatility becomes more easy to predict. Across the different specifications we observe that HAR-L and HAR-CJ-L are the top performer. This result confirms the in sample findings and indicates that the leverage component is important for volatility prediction of Bitcoin. A comparison across the two exchanges also suggests that volatility in the Coinbase exchange is easier to predict.
J. Risk Financial Manag. 2019,12, 36 17 of 20 Panel (A)Bitstamp Panel (B)Coinbase Figure 8. Relative cumulative absolute errors of several forecasting models with respect to RW (first sub-figure) and HAR-RV (second sub-figure). The third sub-figure reports the evolution of the realized standard deviation over time. The red vertical lines correspond to the start of the Hype period. Results are reported for Bitstamp in panel ( A ) and for Coinbase in panel ( B ) for the three forecast horizons h=1, h=7, and h=28. 5. Conclusions In this paper, we analysed Bitcoin returns sampled at high frequency and its realized variance. Raw Bitcoin transactions have been downloaded from the two exchanges Bitstamp and Coinbase. After detailing how raw data are cleaned, we started our analysis focusing on the in sample properties of Bitcoin logarithmic returns sampled at different frequencies. Results about the autocorrelation structure of Bitcoin returns as well as the intraday and intraweek seasonality of Bitcoin volatility and volumes are reported. The second part the paper focuses on predicting realized variance for Bitcoin using several forecasting models. Our results indicate that the predictability of Bitcoin realized variance is increased over time, and that predictability varies with the forecast horizon. Results extend those reported by Catania et al. (2019) and Catania et al. (2018) to the high frequency case and are consistent with previous findings reported for lower frequencies. We have also documented the presence of leverage effect for Bitcoin when realized variance is used. However, this finding is in contrast with previous results reported by Catania and Grassi (2017) and Ardia et al. (2018) where an “inverted” leverage effect is found. However, we note that differently from Catania and Grassi (2017) and Ardia et al. (2018) who use financial econometrics models to filter the conditional volatility of Bitcoin, in this study we estimate volatility using the realized variance estimator of Andersen et al. (2001a). Furthermore, our results also indicate that the leverage effect is less evident during the Hype period. Through the paper, all results have been detailed with respect to the two exchange rates as well as with a focus on the recent 2017–2018 period.
J. Risk Financial Manag. 2019,12, 36 18 of 20 We believe that our results can be used by private investors as well as by hedge funds to improve their forecasting models for Bitcoin as well as for pricing of derivative securities. Furthermore, central banks who are considering issuing their own digital currency like Ecuador, Tunisia, and Sweden can exploits our results to improve the efficiency and reduce the volatility of the resulting market. We have not investigated the presence of possible arbitrage opportunities across the two exchanges. Possible extensions can be made in this direction. Additionally, our results can be extended to a multivariate analysis aiming at investigating the lead/lag structure of different cryptocurrencies observed at high frequency. Author Contributions: L.C. conceived of the presented idea. M.S. implemented the analysis under the supervision of L.C. Both authors discussed the results and contributed to the final manuscript. Funding: This research received no external funding. Conflicts of Interest: The authors declare no conflict of interest. References Andersen, Torben G., Tim Bollerslev, Francis X. Diebold, and Heiko Ebens. 2001a. The distribution of realized stock return volatility. Journal of Financial Economics 61: 43–76. [CrossRef] Andersen, Torben G., Tim Bollerslev, Francis X. Diebold, and Paul Labys. 2001b. The distribution of realized exchange rate volatility. SSRN Electronic Journal 27: 42–55. Andersen, Torben G., Tim Bollerslev, and Francis X. Diebold. 2007. Roughing it up: Including jump components in the measurement, modeling, and forecasting of return volatility. Review of Economics and Statistics 89: 701–20. [CrossRef] Ardia, David, Keven Bluteau, Kris Boudt, and Leopoldo Catania. 2018. Forecasting risk with markov-switching garch models: A large-scale performance study. International Journal of Forecasting 34: 733–47. [CrossRef] Ardia, David, Keven Bluteau, and Maxime Rüede. 2018. Regime changes in Bitcoin GARCH volatility dynamics. Finance Research Letters. [CrossRef] Balcilar, Mehmet, Elie Bouri, Rangan Gupta, and David Roubaud. 2017. Can volume predict bitcoin returns and volatility? A quantiles-based approach. Economic Modelling 64: 74–81. [CrossRef] Bariviera, Aurelio F. 2017. The inefficiency of bitcoin revisited: A dynamic approach. Economics Letters 161: 1–4. [CrossRef] Barndorff-Nielsen, Ole, Peter R. Hansen, Asger Lunde, and Neil Shephard. 2009. Realized kernels in practice: trades and quotes. Econometrics Journal 12: C1–C32. [CrossRef] Barndorff-Nielsen, Ole E. 2004. Power and bipower variation with stochastic volatility and jumps. Journal of Financial Econometrics 2: 1–37. [CrossRef] Barndorff-Nielsen, Ole E., and Neil Shephard. 2003. Realized power variation and stochastic volatility models. Bernoulli 9: 243–65. [CrossRef] Barndorff-Nielsen, Ole E., Svend Erik Graversen, Jean Jacod, Mark Podolskij, and Neil Shephard. 2006. A central limit theorem for realised power and bipower variations of continuous semimartingales. In From Stochastic Calculus to Mathematical Finance. Berlin/Heidelberg: Springer, pp. 33–68. Bauwens, Luc, Christian M. Hafner, and Sébastien Laurent. 2012. Handbook of Volatility Models and Their Applications. New York: John Wiley & Sons, vol. 3. Black, Fischer. 1976. Studies of Stock Price Volatility Changes. In Proceedings of the 1976 Meeting of the Business and Economic Statistics Section. Washington: American Statistical Association, pp. 177–181. Bloomberg. 2017. Nasdaq Plans to Introduce Bitcoin Futures. Available online: https://www.bloomberg.com/ news/articles/2017-11-29/nasdaq-is-said-to-plan-bitcoin-futures-joining-biggest-rivals (accessed on 10 February 2019). Breedon, Francis, and Angelo Ranaldo. 2013. Intraday patterns in FX returns and order flow. Journal of Money, Credit and Banking 45: 953–65. [CrossRef] Brownlees, Christian T., and Giampiero M. Gallo. 2006. Financial econometric analysis at ultra-high frequency: Data handling concerns. Computational Statistics & Data Analysis 51: 2232–245.
J. Risk Financial Manag. 2019,12, 36 19 of 20 Catania, Leopoldo, and Stefano Grassi. 2017. Modelling crypto-currencies financial time-series. SSRN Electronic Journal. [CrossRef] Catania, Leopoldo, Stefano Grassi, and Francesco Ravazzolo. 2019. Forecasting cryptocurrencies under model and parameter instability. International Journal of Forecasting 35: 485–501. [CrossRef] Catania, Leopoldo, Stefano Grassi, and Francesco Ravazzolo. 2018. Predicting the volatility of cryptocurrency time–series. In Mathematical and Statistical Methods for Actuarial Sciences and Finance: MAF 2018. Edited by Marco Corazza, María Durbán, Aurea Grané, Cira Perna and Marilena Sibillo. New York: Springer. CME. 2017. CME Group Announces Launch of Bitcoin Futures. Available online: http://www.cmegroup.com/ media-room/press-releases/2017/10/31/cme_group_announceslaunchofbitcoinfutures.html (accessed on 10 February 2019). Corsi, Fulvio. 2008. A simple approximate long-memory model of realized volatility. Journal of Financial Econometrics 7: 174–96. [CrossRef] Corsi, Fulvio, Francesco Audrino, and Roberto Renò. 2012. HAR modeling for realized volatility forecasting. In Handbook of Volatility Models and Their Applications. Hoboken: John Wiley & Sons, Inc., pp. 363–82. Creal, Drew, Siem Jan Koopman, and André Lucas. 2013. Generalized Autoregressive Score Models with Applications. Journal of Applied Econometrics 28: 777–95. [CrossRef] Cryptocoinsnews. 2017. Tokyo Financial Exchange Plans for Bitcoin Futures Launch. Available online: https:// www.cryptocoinsnews.com/breaking-tokyo-financial-exchange-plans-bitcoin-futures-launch/ (accessed on 10 February 2019). Dacorogna, Michael M., Ulrich A. Müller, Robert J. Nagler, Richard B. Olsen, and Olivier V. Pictet. 1993. A geographical model for the daily and weekly seasonal volatility in the foreign exchange market. Journal of International Money and Finance 12: 413–38. [CrossRef] Diebold, Francis, and Robert Mariano. 1994. Comparing Predictive Accuracy. Journal of Business and Economic Statistics 13: 253–65. Dyhrberg, Anne H. 2016. Bitcoin, gold and the dollar—A GARCH volatility analysis. Finance Research Letters 16: 85–92. [CrossRef] Gencay, Ramazan, Michel Dacorogna, Ulrich A. Muller, Richard Olsen, and Olivier Pictet. 2001. An Introduction to High-Frequency Finance. Amsterdam: Elsevier Science Publishing Co. Inc. Hansen, Peter R., and Asger Lunde. 2005. A forecast comparison of volatility models: Does anything beat a garch (1, 1)? Journal of Applied Econometrics 20: 873–89. [CrossRef] Harvey, Andrew C. 2013. Dynamic Models for Volatility and Heavy Tails: With Applications to Financial and Economic Time Series. Cambridge: Cambridge University Press, Vol. 52. Katsiampa, Paraskevi. 2017. Volatility estimation for bitcoin: A comparison of GARCH models. Economics Letters 158: 3–6. [CrossRef] Liu, Lily, Andrew Patton, and Kevin Sheppard. 2015. Does anything beat 5-minute rv? A comparison of realized measures across multiple asset classes. Journal of Econometrics 187: 293–311. [CrossRef] Marcellino, Massimiliano, James H. Stock, and Mark W. Watson. 2006. A comparison of direct and iterated multistep ar methods for forecasting macroeconomic time series. Journal of econometrics 135: 499–526. [CrossRef] Nakamoto, Satoshi. 2009. Bitcoin: A Peer-to-Peer Electronic Cash System. Available online: https://bitcoin.org/ bitcoin.pdf (accessed on 10 February 2019). Nelson, Daniel B. 1991. Conditional heteroskedasticity in asset returns: A new approach. Econometrica: Journal of the Econometric Society 59: 347–70. [CrossRef] Phillip, Andrew, Jennifer S. K. Chan, and Shelton Peiris. 2018. A new look at cryptocurrencies. Economics Letters 163: 6–9. [CrossRef] Stavroyiannis, Stavros. 2018. Value-at-risk and related measures for the bitcoin. The Journal of Risk Finance 19: 127–136. [CrossRef] Taylor, Stephen J., and Xinzhong Xu. 1997. The incremental volatility information in one million foreign exchange quotations. Journal of Empirical Finance 4: 317–40. [CrossRef]
J. Risk Financial Manag. 2019,12, 36 20 of 20 Zakoian, Jean-Michel. 1994. Threshold Heteroskedastic Models. Journal of Economic Dynamics and Control 18: 931–55. [CrossRef] Zhang, Yuanyuan, Stephen Chan, Jeffrey Chu, and Saralees Nadarajah. 2019. Stylised facts for high frequency cryptocurrency data. Physica A: Statistical Mechanics and Its Applications 513: 598–612. [CrossRef] c 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).