Article citationsMore >>

M. Li, L. Chen, J. Zhao and Q. Li, “"Sentiment analysis of chinese stock reviews based on bert model",” Applied Intelligence, pp. pp. 1-9, 2021.

has been cited by the following article:

Article

Predicting Stock Investments Based on Sentiment and Historical Price Data

1School of Computing and Digital Media, London Metropolitan University

2School of Computer Science and Electronic Engineering, University of Essex


International Journal of Data Envelopment Analysis and *Operations Research*. 2023, Vol. 4 No. 1, 1-32
DOI: 10.12691/ijdeaor-4-1-1
Copyright © 2023 Science and Education Publishing

Cite this paper:
I. O. Olawale, J. Iworiso, I. A. Amaunam. Predicting Stock Investments Based on Sentiment and Historical Price Data. International Journal of Data Envelopment Analysis and *Operations Research*. 2023; 4(1):1-32. doi: 10.12691/ijdeaor-4-1-1.

Correspondence to: J.  Iworiso, School of Computing and Digital Media, London Metropolitan University. Email: j.iworiso@londonmet.ac.uk

Abstract

This paper examines the impact of integrating sentiment data from Twitter with historical stock prices to enhance stock market prediction accuracy. The study employs a comparative analysis using machine learning and deep learning algorithms—Support Vector Machine (SVM), Recurrent Neural Network (RNN), and Bidirectional Encoder Representations from Transformers (BERT) on a single stock. Among these algorithms, BERT achieved the highest predictive accuracy with a rate of 93.21%. The outperformance of BERT algorithm over the other techniques in this study is an indicative evidence that deep learning classification algorithms are superior to conventional sentiment analysis in stock market predictability, with immense contribution to empirical literature. All computations and graphics in this study are obtained using Python. In an extension to this core analysis, the study simulates two distinct investment strategies using aggregated data from ten different stocks: a passive long-term investment and an active, sentiment-based bot trading strategy. These strategies were evaluated using separate machine learning algorithms—Random Forest and XGBoost classifiers—to inform real-time investment decisions. The results indicate that both versions of the bot trading strategies, regardless of the machine learning or deep learning model employed, consistently outperform the passive, long-term investment strategy. The findings corroborate the utility of incorporating social media sentiment into traditional stock prediction frameworks, thereby providing valuable insights for investors and financial institutions. This study underscores the transformative potential of advanced machine learning algorithms and sentiment analysis in reducing investment risks and enhancing decision-making.

Keywords