Research Article

The Influence of Social Media on Stock Market: A Transformer-Based Stock Price Forecasting with External Factors

Authors

  • Mst Zannatun Ferdus Department of Science in Information Technology (MSIT), Washington University of Science and Technology Alexandria, USA
  • Nishat Anjum Department of Computer Science, University of South Dakota, Vermillion, South Dakota, USA
  • Tuan Ngoc Nguyen VNDirect Securities, 97 Lo Duc, Hai Ba Trung, Hanoi, Vietnam
  • Afjal Hossain Jisan Department of Supply Chain & Information Systems, The Pennsylvania State University, University Park, Pennsylvania, USA
  • Md Azad Hossain Raju Department of Computer Science, University of South Dakota, Vermillion, South Dakota, USA

Abstract

This paper introduces an innovative approach to forecasting stock prices. Forecasting stock prices is crucial in assisting investors in making informed decisions. Our research presents a unique method that utilizes transformer-based machine learning approach for stock price forecasting. This method exploits self-attention mechanisms to grasp intricate patterns and dynamics within historical stock price data. To bolster our model performance, we integrate investors’ sentiment collected from social media by using sentiment analysis with the help of natural language processing. Utilizing the variation caused by investors’ sentiment over time, as well as external macroeconomic factors, our proposed model outperforms benchmark models. Through extensive comparisons with various benchmark machine-learning algorithms, results produced by our proposed method are favorably comparable to those produced by conventional approaches. Across multiple machine learning models, our preferred model demonstrates superior performance, achieving an RMSE value of 0.96 compared to the RMSE value of 1.58 obtained from LSTM model.

Article information

Journal

Journal of Computer Science and Technology Studies

Volume (Issue)

6 (1)

Pages

189-194

Published

2024-02-13

How to Cite

Mst Zannatun Ferdus, Nishat Anjum, Tuan Ngoc Nguyen, Afjal Hossain Jisan, & Md Azad Hossain Raju. (2024). The Influence of Social Media on Stock Market: A Transformer-Based Stock Price Forecasting with External Factors. Journal of Computer Science and Technology Studies, 6(1), 189–194. https://doi.org/10.32996/jcsts.2024.6.1.20

Downloads

Keywords:

Stock Price Forecasting, Transformer Models, Sentiment Analysis, Investment, Social Media