Syed Abul, Basher and Perry, Sadorsky (2022): Forecasting Bitcoin price direction with random forests: How important are interest rates, inflation, and market volatility? Forthcoming in: Machine Learning with Applications
Preview |
PDF
MPRA_paper_113293.pdf Download (1MB) | Preview |
Abstract
Bitcoin has grown in popularity and has now attracted the attention of individual and institutional investors. Accurate Bitcoin price direction forecasts are important for determining the trend in Bitcoin prices and asset allocation. This paper addresses several unanswered questions. How important are business cycle variables like interest rates, inflation, and market volatility for forecasting Bitcoin prices? Does the importance of these variables change across time? Are the most important macroeconomic variables for forecasting Bitcoin prices the same as those for gold prices? To answer these questions, we utilize tree-based machine learning classifiers, along with traditional logit econometric models. The analysis reveals several important findings. First, random forests predict Bitcoin and gold price directions with a higher degree of accuracy than logit models. Prediction accuracy for bagging and random forests is between 75% and 80% for a five-day prediction. For 10-day to 20-day forecasts bagging and random forests record accuracies greater than 85%. Second, technical indicators are the most important features for predicting Bitcoin and gold price direction, suggesting some degree of market inefficiency. Third, oil price volatility is important for predicting Bitcoin and gold prices indicating that Bitcoin is a substitute for gold in diversifying this type of volatility. By comparison, gold prices are more influenced by inflation than Bitcoin prices, indicating that gold can be used as a hedge or diversification asset against inflation.
Item Type: | MPRA Paper |
---|---|
Original Title: | Forecasting Bitcoin price direction with random forests: How important are interest rates, inflation, and market volatility? |
Language: | English |
Keywords: | forecasting; machine learning; random forests; Bitcoin; gold; inflation |
Subjects: | C - Mathematical and Quantitative Methods > C5 - Econometric Modeling > C58 - Financial Econometrics E - Macroeconomics and Monetary Economics > E4 - Money and Interest Rates > E44 - Financial Markets and the Macroeconomy G - Financial Economics > G1 - General Financial Markets > G17 - Financial Forecasting and Simulation |
Item ID: | 113293 |
Depositing User: | Syed Basher |
Date Deposited: | 14 Jun 2022 06:56 |
Last Modified: | 14 Jun 2022 06:56 |
References: | Achelis, S. B. (2013). Technical Analysis from A to Z, 2nd Edition (2 edition). McGraw-Hill Education. Adcock, R., & Gradojevic, N. (2019). Non-fundamental, non-parametric Bitcoin forecasting. Physica A: Statistical Mechanics and Its Applications, 531, 121727. https://doi.org/10.1016/j.physa.2019.121727 Alameer, Z., Elaziz, M. A., Ewees, A. A., Ye, H., & Jianhua, Z. (2019). Forecasting gold price fluctuations using improved multilayer perceptron neural network and whale optimization algorithm. Resources Policy, 61, 250–260. https://doi.org/10.1016/j.resourpol.2019.02.014 Areal, N., Oliveira, B., & Sampaio, R. (2015). When times get tough, gold is golden. The European Journal of Finance, 21(6), 507–526. https://doi.org/10.1080/1351847X.2013.854821 Atsalakis, G. S., Atsalaki, I. G., Pasiouras, F., & Zopounidis, C. (2019). Bitcoin price forecasting with neuro-fuzzy techniques. European Journal of Operational Research, 276(2), 770–780. https://doi.org/10.1016/j.ejor.2019.01.040 Baker, S. R., Bloom, N., & Davis, S. J. (2016). Measuring Economic Policy Uncertainty. The Quarterly Journal of Economics, 131(4), 1593–1636. https://doi.org/10.1093/qje/qjw024 Ballings, M., Van den Poel, D., Hespeels, N., & Gryp, R. (2015). Evaluating multiple classifiers for stock price direction prediction. Expert Systems with Applications, 42(20), 7046–7056. https://doi.org/10.1016/j.eswa.2015.05.013 Basak, S., Kar, S., Saha, S., Khaidem, L., & Dey, S. R. (2019). Predicting the direction of stock market prices using tree-based classifiers. The North American Journal of Economics and Finance, 47, 552–567. https://doi.org/10.1016/j.najef.2018.06.013 Baur, D. G., & Lucey, B. M. (2010). Is Gold a Hedge or a Safe Haven? An Analysis of Stocks, Bonds and Gold. Financial Review, 45(2), 217–229. https://doi.org/10.1111/j.1540-6288.2010.00244.x Baur, D. G., & McDermott, T. K. (2010). Is gold a safe haven? International evidence. Journal of Banking & Finance, 34(8), 1886–1898. https://doi.org/10.1016/j.jbankfin.2009.12.008 Baur, D. G., & McDermott, T. K. J. (2016). Why is gold a safe haven? Journal of Behavioral and Experimental Finance, 10, 63–71. https://doi.org/10.1016/j.jbef.2016.03.002 Beckmann, J., Berger, T., & Czudaj, R. (2015). Does gold act as a hedge or a safe haven for stocks? A smooth transition approach. Economic Modelling, 48, 16–24. https://doi.org/10.1016/j.econmod.2014.10.044 Bekiros, S., Boubaker, S., Nguyen, D. K., & Uddin, G. S. (2017). Black swan events and safe havens: The role of gold in globally integrated emerging markets. Journal of International Money and Finance, 73, 317–334. https://doi.org/10.1016/j.jimonfin.2017.02.010 Bergmeir, C., Hyndman, R. J., & Koo, B. (2018). A note on the validity of cross-validation for evaluating autoregressive time series prediction. Computational Statistics & Data Analysis, 120, 70–83. https://doi.org/10.1016/j.csda.2017.11.003 Blose, L. E. (2010). Gold prices, cost of carry, and expected inflation. Journal of Economics and Business, 62(1), 35–47. https://doi.org/10.1016/j.jeconbus.2009.07.001 Breiman, L. (2001). Random Forests. Machine Learning, 45(1), 5–32. https://doi.org/10.1023/A:1010933404324 Breiman, L., Cutler, A., Liaw, A., & Wiener, M. (2018). RandomForest: Breiman and Cutler’s Random Forests for Classification and Regression. R package version 4.6-14. (4.6-14) [Computer software]. https://www.stat.berkeley.edu/~breiman/RandomForests/ Bustos, O., & Pomares-Quimbaya, A. (2020). Stock market movement forecast: A Systematic review. Expert Systems with Applications, 156, 113464. https://doi.org/10.1016/j.eswa.2020.113464 Chatziantoniou, I., Filippidis, M., Filis, G., & Gabauer, D. (2021). A closer look into the global determinants of oil price volatility. Energy Economics, 95, 105092. https://doi.org/10.1016/j.eneco.2020.105092 Chen, Z., Li, C., & Sun, W. (2020). Bitcoin price prediction using machine learning: An approach to sample dimension engineering. Journal of Computational and Applied Mathematics, 365, 112395. https://doi.org/10.1016/j.cam.2019.112395 Chevallier, J. (2020). COVID-19 Pandemic and Financial Contagion. Journal of Risk and Financial Management, 13(12), 309. https://doi.org/10.3390/jrfm13120309 Chiang, T. C. (2022). Evidence of Economic Policy Uncertainty and COVID-19 Pandemic on Global Stock Returns. Journal of Risk and Financial Management, 15(1), 28. https://doi.org/10.3390/jrfm15010028 Christoffersen, P. F., & Diebold, F. X. (2006). Financial Asset Returns, Direction-of-Change Forecasting, and Volatility Dynamics. Management Science, 52(8), 1273–1287. https://doi.org/10.1287/mnsc.1060.0520 Ciner, C., Gurdgiev, C., & Lucey, B. M. (2013). Hedges and safe havens: An examination of stocks, bonds, gold, oil and exchange rates. International Review of Financial Analysis, 29, 202–211. https://doi.org/10.1016/j.irfa.2012.12.001 Dyhrberg, A. H. (2016). Hedging capabilities of bitcoin. Is it the virtual gold? Finance Research Letters, 16, 139–144. https://doi.org/10.1016/j.frl.2015.10.025 Gray, W., & Vogel, J. (2016). Quantitative Momentum: A Practitioner’s Guide to Building a Momentum-Based Stock Selection System. John Wiley & Sons. Greenwell, B., Boehmke, B., Cunningham, J., & Developers (https://github.com/gbm-developers), G. B. M. (2020). gbm: Generalized Boosted Regression Models (2.1.8) [Computer software]. https://CRAN.R-project.org/package=gbm Hamayel, M. J., & Owda, A. Y. (2021). A Novel Cryptocurrency Price Prediction Model Using GRU, LSTM and bi-LSTM Machine Learning Algorithms. AI, 2(4), 477–496. https://doi.org/10.3390/ai2040030 Hastie, T., Tibshirani, R., & Friedman, J. (2009). The Elements of Statistical Learning: Data Mining, Inference, and Prediction, Second Edition (2nd ed.). Springer-Verlag. https://doi.org/10.1007/978-0-387-84858-7 Henriques, I., & Sadorsky, P. (2018). Can Bitcoin Replace Gold in an Investment Portfolio? Journal of Risk and Financial Management, 11(3), 48. https://doi.org/10.3390/jrfm11030048 Hillier, D., Draper, P., & Faff, R. (2006). Do Precious Metals Shine? An Investment Perspective. Financial Analysts Journal, 62(2), 98–106. https://doi.org/10.2469/faj.v62.n2.4085 Hoang, T. H. V., Lahiani, A., & Heller, D. (2016). Is gold a hedge against inflation? New evidence from a nonlinear ARDL approach. Economic Modelling, 54, 54–66. https://doi.org/10.1016/j.econmod.2015.12.013 Hood, M., & Malik, F. (2013). Is gold the best hedge and a safe haven under changing stock market volatility? Review of Financial Economics, 22(2), 47–52. https://doi.org/10.1016/j.rfe.2013.03.001 Hussain Shahzad, S. J., Bouri, E., Roubaud, D., & Kristoufek, L. (2020). Safe haven, hedge and diversification for G7 stock markets: Gold versus bitcoin. Economic Modelling, 87, 212–224. https://doi.org/10.1016/j.econmod.2019.07.023 Iqbal, J. (2017). Does gold hedge stock market, inflation and exchange rate risks? An econometric investigation. International Review of Economics & Finance, 48, 1–17. https://doi.org/10.1016/j.iref.2016.11.005 Israel, R., Kelly, B. T., & Moskowitz, T. J. (2020). Can Machines “Learn” Finance? (SSRN Scholarly Paper ID 3624052). Social Science Research Network. https://doi.org/10.2139/ssrn.3624052 James, G., Witten, D., Hastie, T., & Tibshirani, R. (2013). An Introduction to Statistical Learning: With Applications in R. Springer-Verlag. https://doi.org/10.1007/978-1-4614-7138-7 Jang, H., & Lee, J. (2018). An Empirical Study on Modeling and Prediction of Bitcoin Prices With Bayesian Neural Networks Based on Blockchain Information. IEEE Access, 6, 5427–5437. https://doi.org/10.1109/ACCESS.2017.2779181 Jaquart, P., Dann, D., & Weinhardt, C. (2021). Short-term bitcoin market prediction via machine learning. The Journal of Finance and Data Science, 7, 45–66. https://doi.org/10.1016/j.jfds.2021.03.001 Joseph, A. (2019, May 24). Opening the machine learning black box. Bank Underground. https://bankunderground.co.uk/2019/05/24/opening-the-machine-learning-black-box/ Junttila, J., Pesonen, J., & Raatikainen, J. (2018). Commodity market based hedging against stock market risk in times of financial crisis: The case of crude oil and gold. Journal of International Financial Markets, Institutions and Money, 56, 255–280. https://doi.org/10.1016/j.intfin.2018.01.002 Kaur, A., Nayyar, A., & Singh, P. (2020). Blockchain: A Path to the Future. In Cryptocurrencies and Blockchain Technology Applications (pp. 25–42). John Wiley & Sons, Ltd. https://doi.org/10.1002/9781119621201.ch2 Kayal, P., & Rohilla, P. (2021). Bitcoin in the economics and finance literature: A survey. SN Business & Economics, 1(7), 88. https://doi.org/10.1007/s43546-021-00090-5 Khan, W., Ghazanfar, M. A., Azam, M. A., Karami, A., Alyoubi, K. H., & Alfakeeh, A. S. (2020). Stock market prediction using machine learning classifiers and social media, news. Journal of Ambient Intelligence and Humanized Computing. https://doi.org/10.1007/s12652-020-01839-w Kraaijeveld, O., & De Smedt, J. (2020). The predictive power of public Twitter sentiment for forecasting cryptocurrency prices. Journal of International Financial Markets, Institutions and Money, 65, 101188. https://doi.org/10.1016/j.intfin.2020.101188 Kuhn, M., Wing, J., Weston, S., Williams, A., Keefer, C., Engelhardt, A., Cooper, T., Mayer, Z., Kenkel, B., R Core Team, Benesty, M., Lescarbeau, R., Ziem, A., Scrucca, L., Tang, Y., Candan, C., & Hunt, T. (2020). caret: Classification and Regression Training (6.0-86) [Computer software]. https://CRAN.R-project.org/package=caret Kyriazis, N. A. (2020). Is Bitcoin Similar to Gold? An Integrated Overview of Empirical Findings. Journal of Risk and Financial Management, 13(5), 88. https://doi.org/10.3390/jrfm13050088 Lahmiri, S., & Bekiros, S. (2019). Cryptocurrency forecasting with deep learning chaotic neural networks. Chaos, Solitons & Fractals, 118, 35–40. https://doi.org/10.1016/j.chaos.2018.11.014 Lee, B.-S. (1992). Causal Relations Among Stock Returns, Interest Rates, Real Activity, and Inflation. The Journal of Finance, 47(4), 1591–1603. https://doi.org/10.1111/j.1540-6261.1992.tb04673.x Leung, M. T., Daouk, H., & Chen, A.-S. (2000). Forecasting stock indices: A comparison of classification and level estimation models. International Journal of Forecasting, 16(2), 173–190. https://doi.org/10.1016/S0169-2070(99)00048-5 Livieris, I. E., Pintelas, E., & Pintelas, P. (2020). A CNN–LSTM model for gold price time-series forecasting. Neural Computing and Applications, 32(23), 17351–17360. https://doi.org/10.1007/s00521-020-04867-x Lo, A. W., Mamaysky, H., & Wang, J. (2000). Foundations of Technical Analysis: Computational Algorithms, Statistical Inference, and Empirical Implementation. The Journal of Finance, 55(4), 1705–1765. https://doi.org/10.1111/0022-1082.00265 Lohrmann, C., & Luukka, P. (2019). Classification of intraday S&P500 returns with a Random Forest. International Journal of Forecasting, 35(1), 390–407. https://doi.org/10.1016/j.ijforecast.2018.08.004 Mahato, P. K., & Attar, V. (2014). Prediction of gold and silver stock price using ensemble models. 2014 International Conference on Advances in Engineering Technology Research (ICAETR - 2014), 1–4. https://doi.org/10.1109/ICAETR.2014.7012821 Moskowitz, T. J., Ooi, Y. H., & Pedersen, L. H. (2012). Time series momentum. Journal of Financial Economics, 104(2), 228–250. https://doi.org/10.1016/j.jfineco.2011.11.003 Mudassir, M., Bennbaia, S., Unal, D., & Hammoudeh, M. (2020). Time-series forecasting of Bitcoin prices using high-dimensional features: A machine learning approach. Neural Computing and Applications. https://doi.org/10.1007/s00521-020-05129-6 Nakamoto, S. (2008). Bitcoin: A Peer-to-Peer Electronic Cash System. Bitcoin.Org, 9. Nakano, M., Takahashi, A., & Takahashi, S. (2018). Bitcoin technical trading with artificial neural network. Physica A: Statistical Mechanics and Its Applications, 510, 587–609. https://doi.org/10.1016/j.physa.2018.07.017 Neely, C. J., Rapach, D. E., Tu, J., & Zhou, G. (2014). Forecasting the Equity Risk Premium: The Role of Technical Indicators. Management Science, 60(7), 1772–1791. https://doi.org/10.1287/mnsc.2013.1838 Nyberg, H. (2011). Forecasting the direction of the US stock market with dynamic binary probit models. International Journal of Forecasting, 27(2), 561–578. https://doi.org/10.1016/j.ijforecast.2010.02.008 Nyberg, H., & Pönkä, H. (2016). International sign predictability of stock returns: The role of the United States. Economic Modelling, 58, 323–338. https://doi.org/10.1016/j.econmod.2016.06.013 O’Connor, F. A., Lucey, B. M., Batten, J. A., & Baur, D. G. (2015). The financial economics of gold—A survey. International Review of Financial Analysis, 41, 186–205. https://doi.org/10.1016/j.irfa.2015.07.005 Pabuçcu, H., Ongan, S., & Ongan, A. (2020). Forecasting the movements of Bitcoin prices: An application of machine learning algorithms. Quantitative Finance and Economics, 4(4), 679–692. https://doi.org/10.3934/QFE.2020031 Parisi, A., Parisi, F., & Díaz, D. (2008). Forecasting gold price changes: Rolling and recursive neural network models. Journal of Multinational Financial Management, 18(5), 477–487. https://doi.org/10.1016/j.mulfin.2007.12.002 Pesaran, M. H., & Timmermann, A. (2002). Market timing and return prediction under model instability. Journal of Empirical Finance, 9(5), 495–510. https://doi.org/10.1016/S0927-5398(02)00007-5 Pierdzioch, C., & Risse, M. (2020). Forecasting precious metal returns with multivariate random forests. Empirical Economics, 58(3), 1167–1184. https://doi.org/10.1007/s00181-018-1558-9 Pierdzioch, C., Risse, M., & Rohloff, S. (2015). Forecasting gold-price fluctuations: A real-time boosting approach. Applied Economics Letters, 22(1), 46–50. https://doi.org/10.1080/13504851.2014.925040 Pierdzioch, C., Risse, M., & Rohloff, S. (2016a). A quantile-boosting approach to forecasting gold returns. The North American Journal of Economics and Finance, 35, 38–55. https://doi.org/10.1016/j.najef.2015.10.015 Pierdzioch, C., Risse, M., & Rohloff, S. (2016b). A boosting approach to forecasting the volatility of gold-price fluctuations under flexible loss. Resources Policy, 47, 95–107. https://doi.org/10.1016/j.resourpol.2016.01.003 Plakandaras, V., Gogas, P., & Papadimitriou, T. (2021). Gold Against the Machine. Computational Economics, 57(1), 5–28. https://doi.org/10.1007/s10614-020-10019-z Pönkä, H. (2016). Real oil prices and the international sign predictability of stock returns. Finance Research Letters, 17, 79–87. https://doi.org/10.1016/j.frl.2016.01.011 R Core Team. (2019). R: A Language and Environment for Statistical Computing (R version 3.6.0 (2019-04-26)) [Computer software]. The R Project for Statistical Computing. https://www.r-project.org/ Reboredo, J. C. (2013). Is gold a safe haven or a hedge for the US dollar? Implications for risk management. Journal of Banking & Finance, 37(8), 2665–2676. https://doi.org/10.1016/j.jbankfin.2013.03.020 Risse, M. (2019). Combining wavelet decomposition with machine learning to forecast gold returns. International Journal of Forecasting, 35(2), 601–615. https://doi.org/10.1016/j.ijforecast.2018.11.008 Sadorsky, P. (2021). Predicting Gold and Silver Price Direction Using Tree-Based Classifiers. Journal of Risk and Financial Management, 14(5), 198. https://doi.org/10.3390/jrfm14050198 Selmi, R., Mensi, W., Hammoudeh, S., & Bouoiyour, J. (2018). Is Bitcoin a hedge, a safe haven or a diversifier for oil price movements? A comparison with gold. Energy Economics, 74, 787–801. https://doi.org/10.1016/j.eneco.2018.07.007 Shahzad, S. J. H., Bouri, E., Roubaud, D., Kristoufek, L., & Lucey, B. (2019). Is Bitcoin a better safe-haven investment than gold and commodities? International Review of Financial Analysis, 63, 322–330. https://doi.org/10.1016/j.irfa.2019.01.002 Thorbecke, W. (1997). On Stock Market Returns and Monetary Policy. The Journal of Finance, 52(2), 635–654. https://doi.org/10.2307/2329493 Tronzano, M. (2021). Financial Crises, Macroeconomic Variables, and Long-Run Risk: An Econometric Analysis of Stock Returns Correlations (2000 to 2019). Journal of Risk and Financial Management, 14(3), 127. https://doi.org/10.3390/jrfm14030127 Ulrich, J. (2020). TTR: Technical Trading Rules (0.24.2) [Computer software]. https://CRAN.R-project.org/package=TTR Umar, M., Su, C.-W., Rizvi, S. K. A., & Shao, X.-F. (2021). Bitcoin: A safe haven asset and a winner amid political and economic uncertainties in the US? Technological Forecasting and Social Change, 167, 120680. https://doi.org/10.1016/j.techfore.2021.120680 Wang, Y., Liu, L., & Wu, C. (2020). Forecasting commodity prices out-of-sample: Can technical indicators help? International Journal of Forecasting, 36(2), 666–683. https://doi.org/10.1016/j.ijforecast.2019.08.004 Yao, X., Li, J., Shang, Z., Le, W., & Li, J. (2021). Impacts of COVID-19 on financial markets: From the perspective of financial stress. Applied Economics Letters, 1–5. https://doi.org/10.1080/13504851.2021.2009756 Yazdani-Chamzini, A., Yakhchali, S. H., Volungevičienė, D., & Zavadskas, E. K. (2012). Forecasting gold price changes by using adaptive network fuzzy inference system. Journal of Business Economics and Management, 13(5), 994–1010. https://doi.org/10.3846/16111699.2012.683808 Yin, L., & Yang, Q. (2016). Predicting the oil prices: Do technical indicators help? Energy Economics, 56, 338–350. https://doi.org/10.1016/j.eneco.2016.03.017 Yin, L., Yang, Q., & Su, Z. (2017). Predictability of structural co-movement in commodity prices: The role of technical indicators. Quantitative Finance, 17(5), 795–812. https://doi.org/10.1080/14697688.2016.1225977 |
URI: | https://mpra.ub.uni-muenchen.de/id/eprint/113293 |