Research Article

Bitcoin price prediction based on sentiment analysis and LSTM

Chenfeiyu Wen1,*, Xiangting Wu2, Chuyue Shen3, Zifei Huang4, Peiqi Cai5
1. Central South University
2. The Experimental High School Attached to Beijing Normal University
3. Hangzhou Dianzi University
4. The Ohio State University
5. Zhejiang University

* Corresponding author: [email protected]

Abstract

As cryptocurrencies become widely accepted due to technical improvements, reliable approaches to capture their future price movements of them become critical. This study mainly combines weighted sentiment analysis results from social media-related comments and financial news headlines with a stacked LSTM model to predict second-day Bitcoin price evolution. This study also compared our results and the results produced by MLP, RF, and SVM after feeding the sentiment analysis results.

Keywords: Bitcoin; LSTM; sentiment analysis; price prediction
Published: December 26, 2023
DOI: 10.54254/2755-2721/29/20230743
Volume: ACE Vol.29
pp. 148-159
Download PDF

References

  1. Ladislav Kristoufek. “BitCoin meets Google Trends and Wikipedia: Quantifying the relationship between phenomena of the Internet era”. en. In: Scientific Reports 3.1 (Dec. 2013), p. 3415. ISSN: 2045-2322. DOI: 10.1038/srep03415. URL: http://www.nature.com/articles/ srep03415 (visited on 03/12/2022).
  2. Paul C. Tetlock. “Giving Content to Investor Sentiment: The Role of Media in the Stock Market”. en. In: The Journal of Finance 62.3 (June 2007), pp. 1139–1168. ISSN: 00221082. DOI: 10.1111/j.1540-6261.2007.01232.x. URL: https://onlinelibrary.wiley.com/doi/10.1111/j.1540-6261.2007.01232.x (visited on 03/12/2022).
  3. Karalevicius, V., Degrande, N. and De Weerdt, J. (2018), "Using sentiment analysis to predict interday Bitcoin price movements", Journal of Risk Finance, Vol. 19 No. 1, pp. 56-75. https://doi.org/10.1108/JRF-06-2017-0092
  4. Adebiyi A. Ariyo, Adewumi O. Adewumi, and Charles K. Ayo. “Stock Price Prediction Using the ARIMA Model”. In: 2014 UKSim-AMSS 16th International Conference on Computer Modelling and Simulation. Cambridge, United Kingdom: IEEE, Mar. 2014, pp. 106–112. ISBN: 978-1-4799-4922-9 978-1-4799- 4923-6. DOI:10.1109/UKSim.2014.67. URL: http://ieeexplore.ieee.org/document/7046047/ (visited on 03/12/2022).
  5. Bhawna Panwar et al. “Stock Market Prediction Using Linear Regression and SVM”. In: 2021 International Conference on Advance Computing and Innovative Technologies in Engineering (ICACITE). Greater Noida, India: IEEE, Mar. 2021, pp. 629–631. ISBN: 978-1- 72817-741-0. DOI: 10.1109/ICACITE51222.2021. 9404733. URL:https://ieeexplore.ieee.org/document/9404733/ (visited on 03/12/2022).
  6. Sean McNally, Jason Roche, and Simon Caton. “Predicting the Price of Bitcoin Using Machine Learning”. In: 2018 26th Euromicro International Conference on Parallel, Distributed and Network-based Processing (PDP). Cambridge: IEEE, Mar. 2018, pp. 339–343. ISBN: 978-1-5386-4975-6. DOI: 10.1109/PDP2018.2018.00060. URL: https://ieeexplore.ieee.org/document/ 8374483/ (visited on 03/12/2022).
  7. Vladimir Naumovich Vapnik. The nature of statistical learning theory. 2nd ed. Statistics for engineering and information science. New York: Springer, 2000. ISBN: 978-0-387-98780-4.
  8. Yuling Lin, Haixiang Guo, and Jinglu Hu. “An SVM- based approach for stock market trend prediction”. In: The 2013 International Joint Conference on Neural Networks (IJCNN). Dallas, TX, USA: IEEE, Aug. 2013, pp. 1–7. ISBN: 978-1-4673-6129-3 978-1-4673-6128- 6. DOI: 10.1109/IJCNN.2013.6706743. URL: http://ieeexplore.ieee.org/document/6706743/ (visited on 03/12/2022).
  9. Ping-Feng Pai and Chih-Sheng Lin. “A hybrid ARIMA and support vector machines model in stock price forecasting”. en. In: Omega 33.6 (Dec. 2005), pp. 497–505. ISSN: 03050483. DOI: 10.1016/j.omega.2004.07.024.URL: https://linkinghub.elsevier.com/retrieve/pii/S0305048304001082 (visited on 03/12/2022).
  10. Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. “Deep learning”. en. In: Nature 521.7553 (May 2015), pp. 436–444. ISSN: 0028-0836, 1476-4687. DOI: 10.1038/nature14539. URL: http://www.nature.com/articles/nature14539 (visited on 03/12/2022).
  11. Aditi Mittal et al. “Short-Term Bitcoin Price Fluctuation Prediction Using Social Media and Web Search Data”. In: 2019 Twelfth International Conference on Contemporary Computing (IC3). Noida, India: IEEE, Aug. 2019, pp. 1–6. ISBN: 978-1-72813-591-5. DOI: 10.1109/IC3.2019.8844899. URL: https://ieeexplore.ieee.org/document/8844899/ (visited on 03/12/2022).
  12. David M. Q. Nelson, Adriano C. M. Pereira, and Renato A. de Oliveira. “Stock market’s price movement prediction with LSTM neural networks”. In: 2017 International Joint Conference on Neural Networks (IJCNN). Anchorage, AK, USA: IEEE, May 2017, pp. 1419– 1426. ISBN: 978-1-5090-6182-2. DOI: 10.1109/IJCNN.2017.7966019. URL: http://sieeexplore.ieee.org/document/7966019/ (visited on 03/12/2022).
  13. Samuel Olusegun Ojo et al. “Stock Market Behaviour Prediction using Stacked LSTM Networks”. In: 2019 International Multidisciplinary Information Technology and Engineering Conference (IMITEC). Vanderbijlpark, South Africa: IEEE, Nov. 2019, pp. 1–5. ISBN: 978- 1-72810-040-1. DOI: 10.1109/IMITEC45504.2019.9015840. URL: https://ieeexplore.ieee.org/document/9015840/ (visited on 03/12/2022).
  14. Walaa Medhat, Ahmed Hassan, and Hoda Korashy. “Sentiment analysis algorithms and applications: A survey”. en. In: Ain Shams Engineering Journal 5.4 (Dec. 2014), pp. 1093–1113. ISSN: 20904479. DOI: 10.1016/j.asej.2014.04.011. URL: https://linkinghub.elsevier.com/retrieve/pii/S2090447914000550 (visited on 03/12/2022).
  15. Apoorv Agarwal et al. “Sentiment Analysis of Twitter Data”. en. In: (), p. 9.
  16. Johan Bollen, Huina Mao, and Xiaojun Zeng. “Twitter mood predicts the stock market”. en. In: Journal of Computational Science 2.1 (Mar. 2011), pp. 1–8. ISSN: 18777503. DOI: 10.1016/j.jocs.2010.12.007. URL: https://linkinghub.elsevier.com/retrieve/pii/S187775031100007X (visited on 03/12/2022).
  17. Shaunak Joshi and Deepali Deshpande. “Twitter Sentiment Analysis System”. In: (2018). Publisher: arXiv Version Number: 1. DOI: 10.48550/ARXIV.1807.07752. URL: https://arxiv.org/abs/1807.07752 (visited on 03/12/2022).
  18. Dr. G. S. N. Murthy et al. “Text based Sentiment Analysis using LSTM”. en. In: International Journal of Engineering Research and V9.05 (May 2020), IJERTV9IS050290. ISSN: 2278-0181. DOI: 10.17577/ IJERTV9IS050290. URL: https://www.ijert.org/text-based-sentiment-analysis-using-lstm (visited on 03/12/2022).
  19. Faliang Huang et al. “Attention-Emotion-Enhanced Convolutional LSTM for Sentiment Analysis”. In: IEEE Transactions on Neural Networks and Learning Systems (2021), pp. 1–14. ISSN: 2162-237X, 2162-2388. DOI: 10.1109/TNNLS.2021.3056664. URL: https://ieeexplore.ieee.org/document/9358000/ (visited on 03/12/2022).
  20. Sachin Tiwari. “A Survey on LSTM-based Stock Market Prediction”. en. In: (), p. 8.
  21. Connor Lamon, Eric Nielsen, and Eric Redondo. “CRYPTOCURRENCY PRICE PREDICTION USING NEWS AND SOCIAL MEDIA SENTIMENT”. en. In: (), p. 1.
  22. Keyan Liu, Jianan Zhou, and Dayong Dong. “Improving stock price prediction using the long short-term memory model combined with online social networks”. en. In: Journal of Behavioral and Experimental Finance 30 (June 2021), p. 100507. ISSN: 22146350. DOI: 10.1016/j.jbef.2021.100507. URL: https://linkinghub.elsevier.com/retrieve/pii/S2214635021000514 (visited on 03/12/2022).
  23. Zhigang Jin, Yang Yang, and Yuhong Liu. “Stock clos- ing price prediction based on sentiment analysis and LSTM”. en. In: Neural Computing and Applications 32.13 (July 2020), pp. 9713–9729. ISSN: 0941-0643, 1433-3058. DOI: 10.1007/s00521-019-04504-2. URL: http://link.springer.com/10.1007/s00521-019-04504-2 (visited on 03/12/2022).
  24. Marah-Lisanne Thormann et al. “Stock Price Predic- tions with LSTM Neural Networks and Twitter Sentiment”. In: Statistics, Optimization & Information Computing 9.2 (May 2021), pp. 268–287. ISSN: 2310-5070, 2311-004X. DOI: 10.19139/soic-2310-5070-1202. URL: http://www.iapress.org/index.php/soic/article/view/1202 (visited on 03/12/2022).
  25. S M Raju and Ali Mohammad Tarif. “Real-Time Prediction of BITCOIN Price using Machine Learning Techniques and Public Sentiment Analysis”. In: (2020). Publisher: arXiv Version Number: 1. DOI: 10.48550/ARXIV.2006.14473. URL: https://arxiv.org/abs/2006.14473 (visited on 03/12/2022).
  26. Edward Loper and Steven Bird. “NLTK: The Natural Language Toolkit”. In: arXiv:cs/0205028 (May 2002). arXiv: cs/0205028. URL: http://arxiv.org/abs/cs/0205028 (visited on 04/08/2022).
  27. Clayton J. Hutto and Eric Gilbert. “VADER: A Parsi- monious Rule-Based Model for Sentiment Analysis of Social Media Text”. In: ICWSM. 2014.
  28. Anselm Strauss and Juliet Corbin. “Basics of qualitative research techniques”. In: (1998).