FFA Working Papers 4:006 (2022)3723
Application of the XGBoost algorithm and Bayesian optimization for the Bitcoin price prediction during the COVID-19 period
- Prague University of Economics and Business
Aim of this paper is to use Machine Learning algorithm called XGBoost developed by Tianqi Chen and Carlos Guestrin in 2016 to predict future development of the Bitcoin (BTC) price and build an algorithmic trading strategy based on the predictions from the model. For the final algorithmic strategy, six XGBoost models are estimated in total, estimating following n-th day BTC Close predictions: 1,2,5,10,20,30. Bayesian optimization techniques are used twice during the development of the trading strategy. First, when appropriate hyperparameters of the XGBoost model are selected. Second, for the optimization of each model prediction weight, in order to obtain the most profitable trading strategy. The paper shows, that even though the XGBoost model has several limitations, it can fairly accurately predict future development of the BTC price, even for further predictions. The paper aims specifically for the potential of algorithmic trading during the COVID-19 period, where BTC cryptocurrency suffered extremely volatile period, reaching its new all-time highest prices as well as 50% losses during few consecutive months. The applied trading strategy shows promising results, as it beats the B&H strategy both from the perspective of total profit, Sharpe ratio or Sortino ratio.
Keywords: XGBoost, Bayesian Optimization, Bitcoin, Algorithmic trading
JEL classification: C11, C39, C61, G11
Received: March 24, 2022; Revised: May 9, 2022; Accepted: May 10, 2022; Published online: February 21, 2022 Show citation
ACS | AIP | APA | ASA | Harvard | Chicago | Chicago Notes | IEEE | ISO690 | MLA | NLM | Turabian | Vancouver |
References
- Ayala, J., García-Torres, M., Noguera, J. L., Gómez-Vela, F., & Divina, F. (2021). Technical analysis strategy optimization using a machine learning approach in stock market indices. Knowledge-Based Systems, 225, p. 107119.
Go to original source...
- Bergstra, J., & Bengio, Y. (2012, 03). Random Search for Hyper-Parameter Optimization. The Journal of Machine Learning Research, 13, pp. 281-305.
- Brochu, E., Cora, V. M., & de Freitas, N. (2010). A Tutorial on Bayesian Optimization of Expensive Cost Functions, with Application to Active User Modeling and Hierarchical Reinforcement Learning. ArXiv, abs/1012.2599.
- Dufour, J.-M., & Neves, J. (2019). Chapter 1 - Finite-sample inference and nonstandard asymptotics with Monte Carlo tests and R. In H. D. Vinod, & C. R. Rao (Eds.). Elsevier.
Go to original source...
- Giudici, G., Milne, A., & Vinogradov, D. (2019, 09). Cryptocurrencies: market analysis and perspectives. Journal of Industrial and Business Economics, 47.
Go to original source...
- Gramacy, R. (2020, 03). Surrogates: Gaussian Process Modeling, Design, and Optimization for the Applied Sciences.
Go to original source...
- Güneº, F., Tharrington, R., Hunt, R., & Xing, E. (2020). How to Explain Your Black-Box Models in SAS. SAS GLOBAL FORUM Paper SAS4502-2020.
- Chan, E. (2009, 01). Quantitative Trading : How to Build Your Own Algorithmic Trading Business / E.P. Chan.
- Chandra, R., & He, Y. (2021, 07). Bayesian neural networks for stock price forecasting before and during COVID-19 pandemic. PLOS ONE, 16(7), pp. 1-32.
Go to original source...
- Chang, K. C., & Tian, Z. H. (2015). Market analysis and trading strategies with Bayesian networks. 2015 18th International Conference on Information Fusion (Fusion), pp. 1922-1929.
- Chen, M.-H., Huang, L., Ibrahim, J., & Kim, S. (2008, 08). Bayesian Variable Selection and Computation for Generalized Linear Models with Conjugate Priors. Bayesian analysis (Online), 3, pp. 585-614.
Go to original source...
- Chen, T., & Guestrin, C. (2016). XGBoost: {A} Scalable Tree Boosting System. CoRR, abs/1603.02754.
Go to original source...
- Jaquart, P., Dann, D., & Weinhardt, C. (2021). Short-term bitcoin market prediction via machine learning. The Journal of Finance and Data Science, 7, pp. 45-66.
Go to original source...
- Malik, S., Harode, R., & Singh, A. (2020, 02). XGBoost: A Deep Dive into Boosting ( Introduction Documentation ).
- Rashmi, K., & Gilad-Bachrach, R. (2015, 05). DART: Dropouts meet Multiple Additive Regression Trees.
- Snoek, J., Larochelle, H., & Adams, R. (2012, 06). Practical Bayesian Optimization of Machine Learning Algorithms. Advances in Neural Information Processing Systems, 4.
- Trassinelli, M. (2020, 01). An introduction to Bayesian statistics for atomic physicists. Journal of Physics: Conference Series, 1412, p. 062008.
Go to original source...
- Zhang, X., Johnson, T., Little, R., & Cao, Y. (2010, 03). A Bayesian Image Analysis of Radiation Induced Changes in Tumor Vascular Permeability. Bayesian analysis (Online), 5, pp. 189-212.
Go to original source...
- Zheng, X., Zaheer, M., Ahmed, A., Wang, Y., Xing, E., & Smola, A. (2017, 11). State Space LSTM Models with Particle MCMC Inference.
- Zolotareva, E. (2021, 10). Aiding Long-Term Investment Decisions with XGBoost Machine Learning Model.
Go to original source...