Does Tweets Play a Role in Shaping Human Sentiment: A Stock Market Analysis Using Machine Learning, Deep Learning, and Pre-Trained Methods
As a social media platform, Twitter significantly influences stock market movement in the contemporary digital era. Twitter users can share real-time events and opinions about financial news instantly among the mass population. However, tweets sentiments on financial news have complexity considering sentiment ambiguity, financial jargon, and lack of context and linguistic style. Here, we employed machine learning models (Random Forest, XGBoostGradient Boosting, support vector Machine, Logistic Regression), pre-trained models (RoBERTa, DistilBERT, FinBERT, XLNet, and Vedar), and deep learning models (LSTM, GRU, and a combination of CNN and LSTM) to analyze stock market sentiment utilizing the Twitter dataset. We also deployed a word cloud analysis to identify investors' sentiments. This research utilized a Twitter stock news dataset[7] [binary sentiment labeled as positive (1) or negative (-1)] from Kaggle containing 5971 tweets. Furthermore, we reported the effectiveness of the multiple computational methods in classifying financial sentiment. The study findings demonstrated that DistilBERT, the pre-trained model, outperformed all the machine learning, deep learning, and other pre-trained models. It had the highest accuracy score of 80%, the highest F-1 score of 84.10%, and RoBERTa had the highest area under the curve score of 86.43%. As per word cloud analysis, market sentiment of tweets are well represented by the resulting cloud word (e.g, “short”, “volume”, “low”, “bullish”, “earning”, “target”, “breakout”). This research benefits investors, financial analysts, AI researchers, and hedge funds by providing a robust sentiment-driven stock price prediction framework. Future work should focus on multi-source sentiment incorporation and enhance domain-specific knowledge to enhance predictive accuracy and reliability.
Authors
- Rezwanul Parvez (ORCID: https://orcid.org/0000-0001-5167-699X)
- Mostofa Ahsan (ORCID: https://orcid.org/0000-0002-1748-5652)
- Tanvir Ahmed (ORCID: https://orcid.org/0000-0002-6748-2441)
- Sydul Arefin (ORCID: https://orcid.org/0009-0003-2108-0003)
- Mst Jannatul Ferdus
- Md Amzad Hossain Lachchu
Institutions
- Dakota State University (US)
- Troy University (US)
- Red Rocks Community College (US)
- Texas A&M University – Texarkana (US)
- Colorado State University (US)
Publication Details
- Published
- 2025-05-29
- DOI
- https://doi.org/10.1109/eit64391.2025.11103689
- Primary Topic
- Stock Market Forecasting Methods
- Type
- article
- Field-Weighted Citation Impact
- 0.00