Forecasting Realized Volatility of Bitcoin: The Role of the Trade War

Abstract

We analyze the role of the US–China trade war in forecasting out-of-sample daily realized volatility of Bitcoin returns. We study intraday data spanning from 1st July 2017 to 30th June 2019. We use the heterogeneous autoregressive realized volatility model (HAR-RV) as the benchmark model to capture stylized facts such as heterogeneity and long-memory. We then extend the HAR-RV model to include a metric of US–China trade tensions. This is our primary forecasting variable of interest, and it is based on Google Trends. We also control for jumps, realized skewness, and realized kurtosis. For our empirical analysis, we use a machine-learning technique that is known as random forests. Our findings reveal that US–China trade uncertainty does improve forecast accuracy for various configurations of random forests and forecast horizons.

This is a preview of subscription content, access via your institution.

Fig. 1

Notes

  1. 1.

    In the empirical-finance literature, the term volatility is often used for the standard deviation of returns. In our research, because there is no risk of confusion, we use the term volatility to denote the realized variance of Bitcoin returns (as defined in Eq. (1) in Section 2.1).

  2. 2.

    To be precise, we should use the notation \(RV_{t+h}\) in Eq. (2) because we forecast realized volatility, where h is an index for the forecast horizon. For ease of notation, we use a somewhat simpler but less precise notation in Eq. (2).

  3. 3.

    In the context of analyses of bagging and random forecasts the so-called out-of-bag forecasts often play a central role. Out-of-bag forecasts are forecasts of the dependent variable for those observations that are left out from a bootstrap sample. It should be emphasized that we rather study out-of-sample forecasts, that is, predictions of the period \(t+h\) realized volatility based on data available in period of time t. We only use out-of-bag forecasts in Table 3 to construct measures of fit of the estimated models.

  4. 4.

    Notably, Google Trends provide data for up to 5 years on a weekly basis, whereas daily data can be download for 90 days only. To address this limitation and overcome the individual scaling that might prevent us from stringing several 90-day data together (Baur and Dimpfl 2016), we follow the procedure described below. We extracted five 90-day periods at once, and fortunately the search data from these periods will have the same maximum scale of 0–100. Given our sample period (1st July 2017 to 30th June 2019) includes at least 8 quarters, we repeat this process to connect the series together while using the overlapping quarters for chaining the series together (i.e., for 2018, we use each quarter of 2018 and the last quarter of 2017, etc.). Each daily series is based on a monthly moving window and rescaled with respect to monthly series over the whole period. Each term has been searched five times with random alphanumerical codes added to them and averaged over the whole period (we have run 20 repetitions for each term, and our main results are not be biased by this issue). Data are then converted to a 0–100 scale as they are typically given by Google Trends.

  5. 5.

    All estimation results documented in this study were computed with the use of the R programming environment (R Core Team 2019). In particular, the following R packages were used: “RandomForest” for the estimation of random forests (see Liaw and Wiener 2002), the R package “forecast” (see Hyndman 2017; Hyndman and Khandakar 2008) for the computation of the Diebold–Mariano test’s p values (based on the well-known modified Diebold–Mariano test proposed by Harvey et al. 1997).

  6. 6.

    Results (available from the authors upon request) turned out to be qualitatively similar when we increased the number of trees to 1000.

  7. 7.

    The news-basedindex is constructed by counting the frequency of joint occurrences of trade policy (tariff, import duty, import barrier, and anti-dumping) and uncertainty (uncertainty, risk, or potential) terms across major newspapers (Boston Globe, Chicago Tribune, Guardian, Los Angeles Times, New York Times, Wall Street Journal, and Washington Post). The data is downloadable from the website of Professor Matteo Iacoviello at: https://www2.bc.edu/matteo-iacoviello/tpu.htm.

  8. 8.

    The models that could select the alternative metrics of trade uncertainty also feature all other covariates of realized volatility except for the Google Trends-based metric of trade-related uncertainty. Because the alternative metrics do not add much forecasting value in such a model, we decided not to consider a model that includes simultaneously the Google-Trends-based metric and the alternative metrics in the list of predictors.

  9. 9.

    Hastie et al. (2009) discuss the pros and cons of alternative machine-learning technique (see Table 10.1, Page 351 in their book) and state “Of all the well-known learning methods, decision trees come closest to meeting the requirements for serving as an off-the-shelf procedure for data mining.” (Page 352).

References

  1. Acharya, V. V., Lochstoer, L. A., & Ramadorai, T. (2013). Limits to arbitrage and hedging: Evidence from commodity markets. Journal of Financial Economics, 109, 441–465.

    Google Scholar 

  2. Agnolucci, P. (2009). Volatility in crude oil futures: A comparison of the predictive ability of GARCH and implied volatility models. Energy Economics, 31, 316–321.

    Google Scholar 

  3. Amaya, D., Christoffersen, P., Jacobs, K., & Vasquez, A. (2015). Does realized skewness predict the cross-section of equity returns? Journal of Financial Economics, 118, 135–167.

    Google Scholar 

  4. Andersen, T. G., & Bollerslev, T. (1998). Answering the skeptics: Yes, standard volatility models do provide accurate forecasts. International Economic Review, 39(4), 885–905.

    Google Scholar 

  5. Andersen, T. G., Bollerslev, T., Diebold, F. X., & Labys, P. (2001). The distribution of realized exchange rate volatility. Journal of the American Statistical Association, 96, 42–55.

    Google Scholar 

  6. Andersen, T. G., Bollerslev, T., Diebold, F. X., & Labys, P. (2003). Modeling and forecasting realized volatility. Econometrica, 71, 579–625.

    Google Scholar 

  7. Andersen, T. G., Bollerslev, T., & Diebold, F. X. (2007). Roughing it up: Including jump components in the measurement, modeling, and forecasting of return volatility. Review of Economics and Statistics, 89, 701–720.

    Google Scholar 

  8. Andersen, T. G., Bollerslev, T., & Diebold, F. X. (2010). Parametric and nonparametric volatility measurement. In L. P. Hansen & Y. Ait-Sahalia (Eds.), Handbook of Financial Econometrics: Tools and Techniques (pp. 67–137). North-Holland: Elsevier.

    Google Scholar 

  9. Andersen, T. G., Dobrev, D., & Schaumburg, E. (2012). Jump-robust volatility estimation using nearest neighbor truncation. Journal of Econometrics, 169, 75–93.

    Google Scholar 

  10. Ardia, D., Bluteau, K., & Rede, M. (2019). Regime changes in bitcoin GARCH volatility dynamics. Finance Research Letters, 29, 266–271.

    Google Scholar 

  11. Arouri, M. E. H., Lahiani, A., Lévy, A., & Nguyen, D. K. (2012). Forecasting the conditional volatility of oil spot and futures prices with structural breaks and long memory models. Energy Economics, 34, 283–293.

    Google Scholar 

  12. Aysan, A. F., Demir, E., Gozgor, G., & Lau, C. K. M. (2019). Effects of the geopolitical risks on Bitcoin returns and volatility. Research in International Business and Finance, 47, 511–518.

    Google Scholar 

  13. Barndorff-Nielsen, O. E., & Shephard, N. (2006). Econometrics of testing for jumps in financial economics using bipower variation. Journal of Financial Econometrics, 4, 1–30.

    Google Scholar 

  14. Barndorff-Nielsen, O. E., Kinnebrouk, S., & Shephard, N. (2010). Measuring downside Risk: Realised semivariance. In T. Bollerslev, J. Russell, & M. Watson (Eds.), Volatility and time series econometrics: Essays in honor of Robert F. Engle (pp. 117–136). Oxford: Oxford University Press.

    Google Scholar 

  15. Baur, D. G., & Dimpfl, T. (2016). Googling gold and mining bad news. Resources Policy, 50, 306–311.

    Google Scholar 

  16. Baur, D. G., & Dimfl, T. (2018). Asymmetric volatility in cryptocurrencies. Economics Letters, 173, 148–151.

    Google Scholar 

  17. Bollerslev, T., & Ghysels, E. (1996). Periodic autoregressive conditional heteroscedasticity. Journal of Business and Economic Statistics, 14, 139–151.

    Google Scholar 

  18. Bollerslev, T., Li, S. Z., & Zhao, B. (forthcoming). Good volatility, bad volatility and the cross-section of stock returns. Journal of Financial and Quantitative Analysis.

  19. Bouri, E., Gil-Alana, L. A., Gupta, R., & Roubaud, D. (2019a). Modelling long memory volatility in the Bitcoin market: Evidence of persistence and structural breaks. International Journal of Finance and Economics, 24, 412–426.

    Google Scholar 

  20. Bouri, E., Gkillas, K., & Gupta, R. (2020). Trade uncertainties and the hedging abilities of Bitcoin. Economic Notes, forthcoming. https://doi.org/10.1111/ecno.12173.

  21. Bouri, E., & Gupta, R. (2019). Predicting Bitcoin returns: Comparing the roles of newspaper- and internet search-based measures of uncertainty. Finance Research Letters. https://doi.org/10.1016/j.frl.2019.101398.

  22. Bouri, E., Gupta, R., Lau, C. K. M., Roubaud, D., & Wang, S. (2018). Bitcoin and global financial stress: A copula-based approach to dependence and causality in the quantiles. Quarterly Review of Economics and Finance, 69, 297–307.

    Google Scholar 

  23. Bouri, E., Gupta, R., Tiwari, A. K., & Roubaud, D. (2017). Does Bitcoin hedge global uncertainty? Evidence from wavelet-based quantile-in-quantile regressions. Finance Research Letters, 23, 87–95.

    Google Scholar 

  24. Bouri, E., Roubaud, D., & Shahzad, S. J. H. (2019b). Do Bitcoin and other cryptocurrencies jump together? Quarterly Review of Economics and Finance. https://doi.org/10.1016/j.qref.2019.09.003.

  25. Breiman, L. (1996). Bagging predictors. Machine Learning, 24, 123–140.

    Google Scholar 

  26. Breiman, L. (2001). Random forests. Machine Learning, 45, 5–32.

    Google Scholar 

  27. Caldara, D., Iacoviello, M., Molligo, P., Prestipino, A., & Raffo, A. (2019a). The economic effects of trade policy uncertainty. Journal of Monetary Economics,. https://doi.org/10.1016/j.jmoneco.2019.11.002.

    Article  Google Scholar 

  28. Chaim, P., & Laurini, M. P. (2018). Volatility and return jumps in bitcoin. Economics Letters, 173, 158–163.

    Google Scholar 

  29. Chen, Y., Ma, F., & Zhang, Y. (2019). Good, bad cojumps and volatility forecasting: New evidence from crude oil and the U.S. stock markets. Energy Economics, 81, 52–62.

    Google Scholar 

  30. Chu, J., Chan, S., Nadarajah, S., & Osterrieder, J. (2017). GARCH modelling of cryptocurrencies. Journal of Risk and Financial Management, 10, 17.

    Google Scholar 

  31. Clark, T. D., & West, K. D. (2007). Approximately normal tests for equal predictive accuracy in nested models. Journal of Econometrics, 138, 291–311.

    Google Scholar 

  32. Conrad, C., Custovic, A., & Ghysels, E. (2018). Long- and short-term cryptocurrency volatility components: A GARCH-MIDAS analysis. Journal of Risk and Financial Management, 11, 23.

    Google Scholar 

  33. Corsi, F. (2009). A simple approximate long-memory model of realized volatility. Journal of Financial Econometrics, 7, 174–196.

    Google Scholar 

  34. Demirer, R., Gkillas, K. Gupta, R., & Pierdzioch, C. (2019). Risk aversion and the predictability of crude oil market volatility: A forecasting experiment with random forests. Department of Economics, University of Pretoria, Working Paper No. 201972.

  35. Diebold, F. X., & Mariano, R. S. (1995). Comparing predictive accuracy. Journal of Business and Economic Statistics, 13, 253–263.

    Google Scholar 

  36. Duong, D., & Swanson, N. R. (2011). Volatility in discrete and continuous-time models: A survey with new evidence on large and small jumps. Missing Data Methods: Time-Series Methods and Applications (pp. 179–233). Emerald Group Publishing Limited.

  37. Duong, D., & Swanson, N. R. (2015). Empirical evidence on the importance of aggregation, asymmetry, and jumps for volatility prediction. Journal of Econometrics, 187, 606–621.

    Google Scholar 

  38. Fang, L., Bouri, E., Gupta, R., & Roubaud, D. (2019). Does global economic uncertainty matter for the volatility and hedging effectiveness of Bitcoin? International Review of Financial Analysis, 61, 29–36.

    Google Scholar 

  39. Gkillas, K., Gupta, R., & Pierdzioch, C. (2019). Forecasting realized volatility of bitcoin returns: Tail events and asymmetric loss. Department of Economics, University of Pretoria, Working Paper No. 201905.

  40. Gkillas, K., Gupta, R., & Pierdzioch, C. (2020). Forecasting realized oil-price volatility: The Role of financial stress and asymmetric loss. Journal of International Money and Finance, 104(2020), 102137.

    Google Scholar 

  41. Gkillas, K., & Longin, F. (2018). Is bitcoin the new digital gold? Evidence from extreme price movements in financial markets. https://doi.org/10.2139/ssrn.3245571.

  42. Gozgor, G., Tiwari, A. K., Demir, E., & Akron, S. (2019). The relationship between Bitcoin returns and trade policy uncertainty. Finance Research Letters, 29, 75–82.

    Google Scholar 

  43. Gupta, Rangan, Pierdzioch, C., Vivian, A. J., & Wohar, M. E. (2019). The predictive value of inequality measures for stock returns: An analysis of long-span UK data using quantile random forests. Finance Research Letters, 29, 315–322.

    Google Scholar 

  44. Guo, H., Wang, K., & Zhou, H. (2019). Good jumps, bad jumps, and conditional equity premium. Asian Finance Association (AsianFA) 2014 Conference Paper, PBCSF-NIFR Research Paper No. 14-05.

  45. Harvey, D., Leybourne, S., & Newbold, P. (1997). Testing the equality of prediction mean squared errors. International Journal of forecasting, 13, 281–291.

    Google Scholar 

  46. Hastie, T., Tibshirani, R., & Friedman, J. (2009). The elements of statistical learning: Data mining, inference, and prediction (2nd ed.). New York, NY: Springer.

    Google Scholar 

  47. Hyndman, R. J. (2017). Forecast: Forecasting functions for time series and linear models. R package version 8.0. http://github.com/robjhyndman/forecast.

  48. Hyndman, R. J., & Khandakar, Y. (2008). Automatic time series forecasting: The forecast package for R. Journal of Statistical Software, 26, 1–22.

    Google Scholar 

  49. Huang, X., & Tauchen, G. (2005). The relative contribution of jumps to total price variance. Journal of Financial Econometrics, 3, 456–499.

    Google Scholar 

  50. Kristoufek, L. (2013). BitCoin meets Google Trends and Wikipedia: Quantifying the relationship between phenomena of the Internet era. Scientific Reports, 3, 3415.

    Google Scholar 

  51. Liaw, A., & Wiener, M. (2002). Classification and regression by random forest. R News, 2, 18–22.

    Google Scholar 

  52. Liu, L. Y., Patton, A. J., & Sheppard, K. (2015). Does anything beat 5-minute RV? A comparison of realized measures across multiple asset classes. Journal of Econometrics, 187, 293–311.

    Google Scholar 

  53. McAleer, M., & Medeiros, M. C. (2008). Realized volatility: A review. Econometric Reviews, 27, 10–45.

    Google Scholar 

  54. Mei, D., Liu, J., Ma, F., & Chen, W. (2017). Forecasting stock market volatility: Do realized skewness and kurtosis help? Physica A: Statistical Mechanics and its Applications, 481, 153–159.

    Google Scholar 

  55. Müller, U. A., Dacorogna, M. M., Davé, R. D., Olsen, R. B., & Pictet, O. V. (1997). Volatilities of different time resolutions—Analyzing the dynamics of market components. Journal of Empirical Finance, 4, 213–239.

    Google Scholar 

  56. Nasir, M. A., Huynh, T. L. D., Nguyen, S. P., & Duong, D. (2019). Forecasting cryptocurrency returns and volume using search engines. Financial Innovation, 5 (Article No. 2), https://doi.org/10.1186/s40854-018-0119-8.

  57. Panagiotidis, T., Stengos, T., & Vravosinos, O. (2018). On the determinants of bitcoin returns: A LASSO approach. Finance Research Letters, 27(C), 235–240.

    Google Scholar 

  58. Panagiotidis, T., Stengos, T., & Vravosinos, O. (2019). The effects of markets, uncertainty and search intensity on bitcoin returns. International Review of Financial Analysis, 63, 220–242.

    Google Scholar 

  59. Patton, A. J., & Sheppard, K. (2015). Good volatility, bad volatility: Signed jumps and the persistence of volatility. Review of Economics and Statistics, 97, 683–697.

    Google Scholar 

  60. Pierdzioch, C., & Risse, M. (forthcoming). Forecasting precious metal returns with multivariate random forests. Empirical Economics.

  61. Poon, S.-H., & Granger, C. W. J. (2003). Forecasting volatility in financial markets: A review. Journal of Economic Literature, 41, 478–539.

    Google Scholar 

  62. R Core Team (2019). R: A language and environment for statistical computing, Vienna, Austria: R Foundation for Statistical Computing. http://www.R-project.org/. R version 3.6.0.

  63. Subramaniam, S., & Chakraborty, M. (2020). Investor attention and cryptocurrency returns: Evidence from quantile causality approach. Journal of Behavioral Finance, 21, 103–115.

    Google Scholar 

  64. Takaishi, T. (2018). Statistical properties and multifractality of Bitcoin. Physica A: Statistical Mechanics and Its Applications, 506, 507–519.

    Google Scholar 

  65. Walther, T., Klein, T., & Bouri, E. (2019). Exogenous drivers of Bitcoin and cryptocurrency volatility: A mixed data sampling approach to forecasting. Journal of International Financial Markets Institutions and Money, 63, 101–113.

    Google Scholar 

  66. Wu, S., Tong, M., Yang, Z., & Derbali, A. (2019). Does gold or Bitcoin hedge economic policy uncertainty? Finance Research Letters, 31, 171–178.

    Google Scholar 

Download references

Funding

Funding was provided by German Science Foundation (Grant No. 275693836).

Author information

Affiliations

Authors

Corresponding author

Correspondence to Konstantinos Gkillas.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Bouri, E., Gkillas, K., Gupta, R. et al. Forecasting Realized Volatility of Bitcoin: The Role of the Trade War. Comput Econ 57, 29–53 (2021). https://doi.org/10.1007/s10614-020-10022-4

Download citation

Keywords

  • Bitcoin
  • Realized volatility
  • Trade war
  • Random forests

Mathematics Subject Classification

  • G17
  • Q02
  • Q47