• May 21 - 22, 2025
  • ADSM, Abu Dhabi

ICAIMT Proceedings

#ICAIMT2025

International Conference on Artificial Intelligence Management and Trends

Conference Date: May 21, 2025

Abu Dhabi School of Management (ADSM), Abu Dhabi

Article

AI-Driven Sentiment Analysis in Financial Markets: Using Transformer-Based Models and Social Media Signals for Stock Market Prediction

Rashid Khalil - School of Business & Logistics - Bahrain Polytechnic University - Manama, Bahrain - rashid.khalil@bahrainpolytechnic.bh
Published: 01 Sep 2025 https://doi.org/10.63962/LGTC2652
PDF downloadable

Abstract

This study investigates the predictive potential of transformer-based sentiment analysis in financial forecasting by combining social media signals with technical indicators. The sentiment data was collected from Reddit and Bloomberg and processed using FinBERT to classify polarity scores. The integrated model achieved 68.5% directional accuracy for AAPL, with Granger causality confirming sentiment's predictive power. Reddit exhibited greater sentiment volatility compared to Bloomberg, particularly during the 2023 banking crisis. The paper introduces a visual framework to clarify the modeling pipeline and discusses ethical concerns such as platform bias and explainability. Findings highlight the need for culturally adaptive, transparent sentiment-driven forecasting systems.

Keywords: Sentiment analysis; FinBERT; financial forecasting; Granger causality; LSTM; explainable AI (XAI); Reddit and Bloomberg; ethical finance.
I. INTRODUCTION
In recent years, artificial intelligence (AI) and natural language processing (NLP) have transformed the landscape of financial decision-making [1]. As markets become increasingly data-driven, there has been a notable shift from reliance on structured indicators, such as historical prices and financial ratios, toward unstructured, real-time signals extracted from financial news, analyst commentary, social media, and crowd sentiment [2]. Sentiment analysis, in particular, has emerged as a powerful tool for identifying patterns in investor behavior, predicting volatility spikes, and improving trading signals. This is especially relevant as the influence of retail investors has grown substantially, and platforms like Reddit and Twitter now serve as dominant forums for investor discourse [3].

While the emergence of large language models (LLMs), such as BERT and its domain-adapted version FinBERT, has enhanced the capacity to semantically interpret market language, many sentiment models still fall short in capturing contextual nuance, platform bias, and cultural semantics [4]. For example, a phrase like “fire sale” may carry negative implications in one market context while signifying opportunity in another. These nuances are critical to ensuring accurate polarity classification and avoiding misinterpretation in sentiment-augmented trading systems. Despite progress, three methodological challenges remain.

First, most sentiment forecasting models either overfit short-term volatility or rely on narrowly curated datasets, leading to inconsistent performance in real-world, event-driven markets [5]. Second, cross-platform discrepancies, particularly between informal sentiment sources like Reddit and structured sources like Bloomberg, are often underexplored. This creates blind spots when models fail to account for differences in editorial tone, emotional bias, or information latency [6]. Third, explainability remains an ongoing challenge, especially in regulatory or institutional settings where decision transparency is essential [7]. The application of explainable AI (XAI) in financial NLP is still nascent, despite its growing importance for interpretability and trust.

This study addresses these gaps by designing and evaluating a sentiment-augmented forecasting framework that fuses FinBERT-based sentiment classification with technical indicators and machine learning-based prediction models. Sentiment data were extracted from Reddit and Bloomberg across multiple financial events, including the 2023 U.S. banking crisis, and mapped against sectoral stock performance. The directional accuracy analysis and Granger causality tests are applied to evaluate predictive strength, and introduced sectoral normalization to compare trends across industries such as Technology, Energy, and Finance [8]. Moreover, a system architecture (Figure 1) is developed to visually illustrate the full data pipeline, from text ingestion and polarity scoring to prediction and evaluation.

Empirical results reveal that Reddit sentiment is more volatile and emotionally skewed than Bloomberg sentiment, particularly during crisis periods. In the case of Apple Inc. (AAPL), Reddit-derived sentiment was found to Granger-cause stock price changes, achieving 68.5% directional accuracy in short-term forecasting [9]. The findings also highlight practical implications for model design, including the need to handle cultural sentiment variation and domain-specific language adaptation. The paper contributes to ongoing discourse around responsible AI in finance by emphasizing the importance of ethical safeguards. For example, during events like the 2021 “meme stock” rally, user-generated sentiment was linked to price surges that were disconnected from fundamentals, underscoring the potential for synthetic sentiment manipulation. To mitigate such risks, bias audits are recommended for sentiment models and cultural tuning to capture localized investor language [10], [11]. Overall, this work bridges computational linguistics and quantitative finance to offer a transparent, scalable, and ethically aware framework for real-time financial forecasting.
II. METHODOLOGY
A. Data
This study employs a multi-stage methodology combining sentiment extraction, transformer-based classification, and predictive modeling to evaluate the relationship between social sentiment and equity price movements. Sentiment data were collected from two primary sources: Reddit and Bloomberg. Reddit was selected due to its high engagement, retail-driven discussions, particularly on forums like r/stocks and r/investing. Posts and comments from January 2019 to December 2023 were retrieved using the Pushshift API. Bloomberg headlines and news summaries were obtained via RSS feeds and processed manually to maintain financial domain relevance. During high-impact events, such as the March 2023 U.S. banking crisis and the collapse of Silicon Valley Bank (SVB), daily sentiment snapshots were temporally aligned with corresponding stock price data from Yahoo Finance, using closing prices for synchronization [3], [10].

The full data processing and modeling workflow is visually illustrated in Figure 1 Sentiment-Augmented Forecasting Framework, which outlines the sequence from data ingestion to prediction outputs.

Fig. 1. Sentiment-Augmented Forecasting Framework
Figure 1: Sentiment-Augmented Forecasting Framework

B. Sentiment Modelling
This study employed FinBERT, a financial-domain-adapted version of BERT, for multi-class sentiment classification (positive, neutral, negative) due to its superior contextual understanding over lexicon-based methods [4]. Preprocessing included lowercasing, punctuation removal, stop-word filtering, and lemmatization. Reddit text was tokenized into 512-token sequences to comply with FinBERT’s maximum input length. Only English-language posts were retained. To reflect sentiment strength, daily polarity scores were weighted by post engagement (i.e., upvotes and comment counts), forming an intensity-weighted sentiment index. Bloomberg articles showed higher neutrality, reinforcing platform-based sentiment asymmetry [7]. Engagement-driven weighting was applied only to Reddit to avoid skew from editorial uniformity in Bloomberg.

C. Predictive Modelling
A hybrid sentiment-price forecasting model is constructed by integrating polarity scores with traditional market indicators such as trading volume, historical volatility, and moving averages. Stocks analyzed included AAPL, TSLA, JPM, and NVDA to reflect sectoral diversity. To examine temporal causality, Granger causality tests were applied with a lag of up to 3 days, revealing statistically significant p-values (<0.01) for key stocks during crisis periods. For predictive modeling, LSTM neural networks are tested, to optimize sequential financial data, and Random Forest classifiers for comparative performance. The LSTM model comprised two hidden layers with 64 and 32 units respectively, followed by a dense output layer for binary classification. Dropout (0.2) was used to prevent overfitting. Moreover, a time-aware 70/30 training/validation split is adopted, avoiding random shuffling to preserve temporal structure. Hyperparameters were optimized using grid search with early stopping.

D. Evaluation Metrics
Model performance was evaluated using Accuracy, Precision, Recall, Root Mean Square Error (RMSE), and Directional Accuracy, the latter being most relevant for trading strategy applications. Directional accuracy was calculated as the percentage of times the model correctly predicted the direction (up or down) of price movement. A hybrid model using Reddit sentiment employed to measure the directional accuracy. RMSE was used for regression-based validation to measure absolute forecast deviation. Additionally, sector-wise normalization was applied by setting all price series to a 2019 base of 100, allowing comparative performance analysis across industries such as Technology, Healthcare, and Finance [8]. These methods were selected not only for performance but for interpretability and transparency, critical elements for integrating sentiment models into regulated financial systems [7], [11].
III. RESULTS
The results of the hybrid sentiment-price forecasting framework reveal robust evidence supporting the predictive influence of social sentiment on stock price movements, particularly during high-volatility financial events. Based on Reddit and Bloomberg sentiment datasets and normalizing equity price indices across sectors, this study systematically evaluates both causality and model performance.

A. Sentiment-Price Relationship
The Granger causality tests reveal that social sentiment significantly predicts short-term stock price changes in specific sectors. For instance, sentiment polarity derived from Reddit was found to Granger-cause AAPL price changes with an F-statistic of 5.1 (p = 0.009), and similar outcomes were observed for TSLA (F = 4.8, p = 0.012) and JPM (F = 3.2, p = 0.042). However, no significant causal effect was observed in defensive sectors like Healthcare and Energy (e.g., JNJ and XOM), where sentiment shifts did not precede price changes [5]. Table I presents sector-wise Granger causality test results, supporting the arguments that sentiment exerts more influence in retail-sensitive industries.

TABLE I. GRANGER CAUSALITY TEST RESULTS
SectorTicker/IndexF-Statisticp-valueLagConclusion
TechnologyAAPL5.10.0092Sentiment Granger-causes returns
TechnologyTSLA4.80.0122Sentiment Granger-causes returns
FinanceJPM3.20.0422Sentiment Granger-causes returns
HealthcareJNJ1.80.182No significant causality
EnergyXOM2.10.112No significant causality


Crisis periods offer stronger validation of sentiment-price linkages. During the 2023 U.S. banking collapse, Reddit sentiment plummeted from −0.2 to −0.8 between March 8 and March 10, precisely overlapping the Silicon Valley Bank failure. Stock index data showed a simultaneous drop from 100 to 92.8. A partial recovery in sentiment (−0.4) and prices (to 94.2) by March 13 further supports sentiment reflexivity.

Fig. 2. Sector-Wise Stock Price Trends (2019–2024)
Figure 2: Sector-wise stock price trends and sentiment shifts (2019–2024)

B. Cross-Platform Sentiment Comparison
A comparative analysis of Reddit and Bloomberg sentiment reveals structural differences in emotional tone and informativeness. On average, 32% of Reddit posts were negative compared to only 15% of Bloomberg entries. Meanwhile, Bloomberg exhibited a dominant neutral sentiment (60%) due to editorial curation, while Reddit reflected higher volatility, speculation, and emotional expression during crisis windows [3].

Fig. 3. Sentiment Score Distribution Reddit & Bloomberg (2019–2024)
Figure 3: Sentiment score distribution for Reddit and Bloomberg (2019–2024)

C. Model Performance and Predictive Accuracy
The hybrid modeling framework, combining FinBERT-derived sentiment with market indicators, achieved strong predictive accuracy. For AAPL, the Reddit-enhanced model reached 68.5% directional accuracy, outperforming both Bloomberg (61.2%) and a baseline moving average model (55.7%). When using combined sentiment sources and technical indicators, the LSTM-based model achieved 71.3% directional accuracy on next-day forecasts.

TABLE II. MODEL PERFORMANCE COMPARISON
ModelMAPE (%)RMSEDirectional Accuracy (%)
LSTM + Random Forest2.318.768.5
ARIMA5.132.452.1
GPT-4 + Attention3.924.563.8


Fig. 4. Feature Importance Analysis
Figure 4: Feature importance / normalized sector-wise trends

D. Interpretability and Model Trust
Although FinBERT and LSTM models provided strong performance, their interpretability remains a concern for real-world deployment. Sentiment-weighted outputs can be post-processed using SHAP values or attention heatmaps, but stakeholder trust still requires intuitive visual explanations. This aligns with the call for Explainable AI (XAI) in financial decision systems [7]. Ethically, the findings raise flags around the weaponization of crowd sentiment, especially in retail-driven platforms like Reddit. Incorporating audit logs, multilingual adaptation, and regional lexicons can help mitigate these risks [10], [11].

Overall, these results validate the practical viability of incorporating sentiment-driven insights into short-term trading models while acknowledging the ethical and interpretive complexities surrounding their use. The platform disparity in sentiment behavior, especially during crises, underscores the importance of explainable AI tools and transparency when deploying such models in financial contexts [7], [11].
IV. CONCLUSION
This study highlights the significant predictive potential of transformer-based sentiment analysis in financial market forecasting, particularly when combining platform-specific sentiment signals with traditional market indicators. The hybrid framework, leveraging FinBERT and LSTM models, achieved strong directional accuracy, particularly in retail-sensitive sectors such as technology. Reddit-derived sentiment was found to Granger-cause equity price changes during crisis windows, exemplified by the SVB collapse, highlighting the timeliness and reactivity of crowd-sourced sentiment indicators.

However, several limitations temper the robustness of these findings. First, sentiment-based models trained on historical data may underperform during black-swan events due to a lack of prior pattern analogues [6]. Second, while FinBERT improves classification accuracy over traditional lexicons, it operates as a black-box model, which restricts interpretability for institutional stakeholders and regulators. This opacity poses a barrier in high-stakes environments where model decisions must be explainable and auditable [7].

Additionally, the emotional volatility and platform bias embedded in Reddit sentiment increase the risk of misinformation, hype cycles, or manipulation. The meme-stock events of 2021 offer cautionary examples, where coordinated sentiment spikes fueled price rallies decoupled from fundamentals. These risks underscore the need for safeguards such as engagement filters, misinformation classifiers, and synthetic sentiment detectors to flag coordinated activity. Regulatory frameworks must also evolve to define platform-specific thresholds for acceptable volatility in sentiment inputs, and developers should embed audit trails in AI-driven trading models.

From a policy standpoint, the observed divergence between Reddit and Bloomberg sentiment suggests that no single source can offer a complete market signal. Models should incorporate platform-aware calibration, giving higher weight to crowd sentiment during volatility spikes while relying on institutional tone for long-term equilibrium forecasting.

Future research can advance this work along several dimensions. First, multimodal sentiment models, incorporating textual, auditory, and visual cues from earnings calls or investor interviews, could improve emotion classification accuracy while raising new ethical challenges around consent and privacy [4]. Second, sentiment analysis in decentralized finance (DeFi) ecosystems, including NFT discussions and on-chain signals, presents emerging frontiers but requires robust manipulation safeguards [12], [13]. Third, longitudinal studies should assess how continuous AI integration influences investor decision-making, market microstructure, and systemic risk dynamics over extended horizons.

In conclusion, this study contributes a scalable, sentiment-augmented forecasting pipeline that bridges computational linguistics and quantitative finance. It advocates for a paradigm that balances predictive efficacy with ethical design, cultural inclusivity, and regulatory transparency, ensuring that AI-based forecasting enhances financial decision-making.

REFERENCES

[1] Y. K. Dwivedi, D. L. Hughes, A. M. Baabdullah, and S. Ribeiro-Navarrete, “Metaverse and Web 3.0: The new digital frontiers of innovation,” J. Bus. Res., 153, 673–684, 2023.

[2] R. Belk, “AI and the consumer finance marketplace: Risks and opportunities,” J. Consum. Policy, 45(3), 457–475, 2022.

[3] S. Ghosh, “Leading AI innovation in emerging economies: Challenges and opportunities,” J. Glob. Inf. Manag., 31(1), 1–18, 2023.

[4] Y. Yang, B. Sun, and J. Hu, “FinBERT: A pre-trained financial language representation model for financial tasks,” in Proc. EMNLP, 2020.

[5] A. M. Pattanayak and A. Swetapadma, “Exploring different dynamics of recurrent neural network methods for stock market prediction—A comparative study,” Appl. Artif. Intell., 38(2), 143–161, 2024.

[6] I. Rahwan, M. Cebrian, N. Obradovich, et al., “Machine behaviour,” Nature, 568(7753), 477–486, 2019.

[7] M. Mueller, “Risks of large language models in finance: Governance, hallucinations, and black swans,” AI Soc., 38(2), 445–460, 2023.

[8] G. Wu, G. Subramaniam, and Z. Li, “Using AI technology to enhance data-driven decision-making in the financial sector,” Wiley Online Library, 2025.

[9] J. Ajaka and G. Azzi, AI in the Stock Market, Springer, Cham, 2025.

[10] M. S. Al-Absy, N. H. Abu Jamie, and T. N. Abu-Jamie, “Advances in AI and their effects on finance and economic analysis,” Springer, 2024.

[11] A. Jobin, M. Ienca, and E. Vayena, “The global landscape of AI ethics guidelines,” Nat. Mach. Intell., 1(9), 389–399, 2019.

[12] M. A. Khalil, P. Sinliamthong, and R. Khalil, “From paper to pixels for a world of purpose: A systematic review of sustainable finance, blockchain, and digital assets,” in Sustainable Financing—A Contemporary Guide for Green Finance, Crowdfunding and Digital Currencies, World Sustainability Series. Springer, Cham, 2025. Available: https://doi.org/10.1007/978-3-031-80969-9_5

[13] S. Bahoo, M. Cucculelli, and J. Mondolo, “Artificial intelligence in finance: A comprehensive review through bibliometric and content analysis,” Springer, 2024.