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.
Similar content being viewed by others
Notes
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.
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.
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).
Results (available from the authors upon request) turned out to be qualitatively similar when we increased the number of trees to 1000.
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.
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.
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
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.
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.
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.
Andersen, T. G., & Bollerslev, T. (1998). Answering the skeptics: Yes, standard volatility models do provide accurate forecasts. International Economic Review, 39(4), 885–905.
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.
Andersen, T. G., Bollerslev, T., Diebold, F. X., & Labys, P. (2003). Modeling and forecasting realized volatility. Econometrica, 71, 579–625.
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.
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.
Andersen, T. G., Dobrev, D., & Schaumburg, E. (2012). Jump-robust volatility estimation using nearest neighbor truncation. Journal of Econometrics, 169, 75–93.
Ardia, D., Bluteau, K., & Rede, M. (2019). Regime changes in bitcoin GARCH volatility dynamics. Finance Research Letters, 29, 266–271.
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.
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.
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.
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.
Baur, D. G., & Dimpfl, T. (2016). Googling gold and mining bad news. Resources Policy, 50, 306–311.
Baur, D. G., & Dimfl, T. (2018). Asymmetric volatility in cryptocurrencies. Economics Letters, 173, 148–151.
Bollerslev, T., & Ghysels, E. (1996). Periodic autoregressive conditional heteroscedasticity. Journal of Business and Economic Statistics, 14, 139–151.
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.
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.
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.
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.
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.
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.
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.
Breiman, L. (1996). Bagging predictors. Machine Learning, 24, 123–140.
Breiman, L. (2001). Random forests. Machine Learning, 45, 5–32.
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.
Chaim, P., & Laurini, M. P. (2018). Volatility and return jumps in bitcoin. Economics Letters, 173, 158–163.
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.
Chu, J., Chan, S., Nadarajah, S., & Osterrieder, J. (2017). GARCH modelling of cryptocurrencies. Journal of Risk and Financial Management, 10, 17.
Clark, T. D., & West, K. D. (2007). Approximately normal tests for equal predictive accuracy in nested models. Journal of Econometrics, 138, 291–311.
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.
Corsi, F. (2009). A simple approximate long-memory model of realized volatility. Journal of Financial Econometrics, 7, 174–196.
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.
Diebold, F. X., & Mariano, R. S. (1995). Comparing predictive accuracy. Journal of Business and Economic Statistics, 13, 253–263.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Harvey, D., Leybourne, S., & Newbold, P. (1997). Testing the equality of prediction mean squared errors. International Journal of forecasting, 13, 281–291.
Hastie, T., Tibshirani, R., & Friedman, J. (2009). The elements of statistical learning: Data mining, inference, and prediction (2nd ed.). New York, NY: Springer.
Hyndman, R. J. (2017). Forecast: Forecasting functions for time series and linear models. R package version 8.0. http://github.com/robjhyndman/forecast.
Hyndman, R. J., & Khandakar, Y. (2008). Automatic time series forecasting: The forecast package for R. Journal of Statistical Software, 26, 1–22.
Huang, X., & Tauchen, G. (2005). The relative contribution of jumps to total price variance. Journal of Financial Econometrics, 3, 456–499.
Kristoufek, L. (2013). BitCoin meets Google Trends and Wikipedia: Quantifying the relationship between phenomena of the Internet era. Scientific Reports, 3, 3415.
Liaw, A., & Wiener, M. (2002). Classification and regression by random forest. R News, 2, 18–22.
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.
McAleer, M., & Medeiros, M. C. (2008). Realized volatility: A review. Econometric Reviews, 27, 10–45.
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.
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.
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.
Panagiotidis, T., Stengos, T., & Vravosinos, O. (2018). On the determinants of bitcoin returns: A LASSO approach. Finance Research Letters, 27(C), 235–240.
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.
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.
Pierdzioch, C., & Risse, M. (forthcoming). Forecasting precious metal returns with multivariate random forests. Empirical Economics.
Poon, S.-H., & Granger, C. W. J. (2003). Forecasting volatility in financial markets: A review. Journal of Economic Literature, 41, 478–539.
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.
Subramaniam, S., & Chakraborty, M. (2020). Investor attention and cryptocurrency returns: Evidence from quantile causality approach. Journal of Behavioral Finance, 21, 103–115.
Takaishi, T. (2018). Statistical properties and multifractality of Bitcoin. Physica A: Statistical Mechanics and Its Applications, 506, 507–519.
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.
Wu, S., Tong, M., Yang, Z., & Derbali, A. (2019). Does gold or Bitcoin hedge economic policy uncertainty? Finance Research Letters, 31, 171–178.
Funding
Funding was provided by German Science Foundation (Grant No. 275693836).
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
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
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10614-020-10022-4