Bitcoin Price Prediction Using Machine Learning Algorithm
Abstract
Bitcoin, being one of the top cryptocurrencies, sees its price influenced by market trends and public opinions. This study introduces a prediction model that uses a Random Forest Classifier along with sentiment analysis to forecast Bitcoin prices. Data on Bitcoin’s past and current performance was gathered using the finance library, while sentiment analysis was conducted on news and comments related to Bitcoin, collected through mwclient. The model’s success was measured using accuracy, precision, recall, and F1-score. The findings show that combining market data with sentiment analysis helps in making more accurate predictions. The model leverages a Random Forest Classifier, which is trained on historical Bitcoin price data sourced from the finance library. In addition, sentiment analysis is conducted on news articles and public discussions related to Bitcoin, collected using the mwclient library, to assess the prevailing public sentiment and its potential influence on price fluctuations. The model’s performance is measured using key evaluation metrics such as accuracy, precision, recall, and F1-score, offering a thorough assessment of its effectiveness. The findings reveal that incorporating sentiment analysis alongside market data significantly boosts the model's predictive power when compared to traditional models that rely solely on past price data. This integrated approach holds promise for enhancing price prediction models in the cryptocurrency market, where factors like public sentiment and social dynamics play a crucial role in shaping price movements.
References
Koker TE, Koutmos D. Cryptocurrency trading using machine learning. Journal of Risk and Financial Management. 2020 Aug 10;13(8):178.
Corbet S, Hou YG, Hu Y, Larkin C, Lucey B, Oxley L. Cryptocurrency liquidity and volatility interrelationships during the COVID-19 pandemic. Finance Research Letters. 2022 Mar 1; 45:102137.
Gupta R, Shukla A, Tanwar S. BATS: A blockchain and AI-empowered drone-assisted telesurgery system towards 6G. IEEE Transactions on Network Science and Engineering. 2020 Dec 8;8(4):2958-67.
Haridas P, Chennupati G, Santhi N, Romero P, Eidenbenz S. Code characterization with graph convolutions and capsule networks. IEEE Access. 2020 Jul 27; 8:136307-15.
Shanaev S, Sharma S, Ghimire B, Shuraeva A. Taming the blockchain beast? Regulatory implications for the cryptocurrency Market. Research in International Business and Finance. 2020 Jan 1;51:101080.
Sin E, Wang L. Bitcoin price prediction using ensembles of neural networks. In2017 13th International conference on natural computation, fuzzy systems and knowledge discovery (ICNC-FSKD) 2017 Jul 29 (pp. 666-671). IEEE.
Saad M, Choi J, Nyang D, Kim J, Mohaisen A. Toward characterizing blockchain-based cryptocurrencies for highly accurate predictions. IEEE Systems Journal. 2019 Sep 17;14(1):321-32.
Jay P, Kalariya V, Parmar P, Tanwar S, Kumar N, Alazab M. Stochastic neural networks for cryptocurrency price prediction. Ieee access. 2020 Apr 27; 8:82804-18.
Huynh TL, Burggraf T, Wang M. Gold, platinum, and expected Bitcoin returns. Journal of Multinational Financial Management. 2020 Sep 1; 56:100628.
Okorie DI, Lin B. Crude oil price and cryptocurrencies: Evidence of volatility connectedness and hedging strategy. Energy economics. 2020 Mar 1; 87:104703.
