Temporal Modeling of Stock Directional Changes Using RNN and Attention Architectures with Sentiment Signals
DOI:
https://doi.org/10.32628/CSEIT26121336Keywords:
Stock Market Prediction, Behavioral Finance, Sentiment Analysis, Social Media Analytics, VADER Sentiment Scoring, Deep Learning, LSTM, GRU, BiLSTM, Attention Mechanisms, Machine Learning, Time-Series Classification, Investor Psychology, Market Direction Forecasting, NLP-Based Sentiment Modeling, Financial Data MiningAbstract
Investors' opinions and attitudes toward an investment have become increasingly important in today's world. The increasing amount of platforms (such as Twitter) for sharing information has enabled people's sentiments (how they feel about something) to be leveraged as quantifiable data for academic analysis. The study conducted quantifiable methodology to ascertain whether or not sentiment as a standalone variable would be an appropriate metric to predict the direction of stock prices. The traditional method of using regression analysis to create predictive models was replaced with a binary-classification format where the sentiment around the company was combined with the previous day's closing price to produce a model predicting whether the stock would rise or fall. Tweets were collected about numerous companies and subjected to comprehensive NLP analysis (including tokenization, lemmatization, and removing stopwords) before being summed with the VADER model, creating a continually changing visual representation of investor sentiment. Once the models were developed, traditional machine-learning techniques and deep-learning architectures were utilized to compare performance. Overall the results showed significant improvements in predicting price movement direction by including investor sentiment as a metric in the pricing model compared with models based solely on historical data. The enhanced performance, particularly observed in temporal models like BiLSTM+Attention, provides robust evidence that human emotion, quantified through collective social discourse, significantly improves accuracy and flexibility in data-driven stock market prediction systems. This study validates the integration of behavioral insights as a critical, non-technical source of alpha in quantitative finance.
Downloads
References
H. Mehta and H. Pandya, “Sentiment Analysis of Indian Stock Market Volatility,” Procedia Computer Science, 2020.
M. Costola, O. Hinz, M. Pelizzon, “Machine Learning Sentiment Analysis, COVID-19 News and Stock Market Reactions,” Int. Review of Financial Analysis, 2023. DOI: https://doi.org/10.1016/j.ribaf.2023.101881
H. Mehta, P. Pandya, and K. Kotecha, “Harvesting Social Media Sentiment Analysis to Enhance Stock Market Prediction Using Deep Learning,” PeerJ Computer Science, 2021. DOI: https://doi.org/10.7717/peerj-cs.476
Kataria, B., Jethva, H.B., Shinde, P.V., Banait, S.S., Shaikh, F., Ajani, S. (2023). SLDEB: Design of a secure and lightweight dynamic encryption bio-inspired model for IoT networks. International Journal of Safety and Security Engineering, Vol. 13, No. 2, pp. 325-331. DOI: https://doi.org/10.18280/ijsse.130214
A. Mittal and A. Goel, “Stock Prediction Using Twitter Sentiment Analysis,” Procedia Computer Science, 2019.
X. Li, P. Wu, and W. Wang, “Incorporating Twitter Sentiment and Technical Indicators for Stock Price Prediction,” Applied Soft Computing, 2020.
T. Nguyen, K. Shirai, and J. Velcin, “Sentiment Analysis on Social Media for Stock Movement Prediction,” Expert Systems with Applications, 2019.
J. Singh, D. Sharma, and R. Verma, “Combining Social Media Sentiment and Deep Learning for Stock Market Forecasting,” Neural Computing and Applications, 2022.
Y. Zhang and S. Skiena, “Trading Strategies to Exploit Blog and News Sentiment,” AAAI ICWSM, 2020.
X. Chen et al., “Spatiotemporal Transformer for Stock Movement Prediction,” arXiv:2305.03835, 2023.
B. Yang et al., “CNN-LSTM Hybrid Model for Stock Sentiment Prediction,” ACM, 2025.
J. Gu et al., “Predicting Stock Prices with FinBERT-LSTM,” ACM, 2024.
G. Shobayo et al., “Sentiment Analysis and Prediction of Stock Price Using FinBERT, GPT-4,” BDCC, 2024. DOI: https://doi.org/10.20944/preprints202409.1089.v1
H. Correia, J. Madureira, and J. Bernardino, “Deep Neural Networks Applied to Stock Market Sentiment Analysis,” Sensors, 2022. DOI: https://doi.org/10.3390/s22124409
A. Paramanik and R. Singhal, “Sentiment Analysis of Indian Stock Market Volatility,” Procedia Computer Science, 2020. DOI: https://doi.org/10.1016/j.procs.2020.08.035
R. Amin et al., “Stock Market Prediction with Transductive LSTM and Social Media Sentiment,” IEEE, 2024.
V. Singh and K. Kotecha, “Deep Learning Approaches for Stock Prediction,” Expert Systems, 2023.
A. Kumar and S. Garg, “Short-Term Stock Prediction Using LSTM and Technical Indicators,” IJMLC, 2021.
H. Chen and Y. Liu, “GRU-Based Market Direction Prediction,” Applied Intelligence, 2022.
C. Qiu et al., “Financial Forecasting Using Multi-Head Attention,” arXiv, 2023.
A. Zhai and R. Hsu, “Stock Price Movement Prediction With Transformer Networks,” arXiv, 2021.
Y. Feng et al., “Master: Market-Guided Transformer for Stock Forecasting,” arXiv:2312.15235, 2024.
A. Han et al., “Adaptive Multi-View Attention Networks for Stock Movement Prediction,” IEEE, 2023.
J. Liu et al., “Transformer-Based Deep Learning Model for Stock Price Prediction,” arXiv:2208.08300, 2022.
P. Wu et al., “Multi-iTR: A Multi-Task Transformer for Closing Price Prediction,” SSRN, 2024.
W. Luo et al., “FinBERT-XL: Larger Transformer for Finance,” arXiv, 2024.
K. Jiang et al., “Stock Trend Prediction Using GNN and Twitter Sentiment,” ACM, 2023.
S. Patel and A. Shah, “Ensemble Deep Learning with FinBERT for Stock Forecasting,” Neural Networks, 2024.
M. Zhai, “Hybrid CNN-RNN Models for Financial Time Series,” Expert Systems, 2022.
J. Hu, “Emotion-Aware Stock Prediction Using LSTM,” Information Processing & Management, 2021.
L. Wang et al., “Deep Multimodal Stock Movement Prediction,” arXiv, 2024.
R. Dutta and S. Bhattacharya, “Sentiment-Augmented GRU Models for Stock Market Prediction,” Applied Intelligence, 2023.
N. Bar-Haim et al., “Dynamic Sentiment Aggregation for Financial Forecasting,” ACL Workshops, 2022.
Y. Kim, “CNN for Sentence Classification,” EMNLP, 2014.
S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory,” Neural Computation, 1997. DOI: https://doi.org/10.1162/neco.1997.9.8.1735
K. Cho et al., “Learning Phrase Representations using GRU,” EMNLP, 2014.
A. Vaswani et al., “Attention Is All You Need,” NeurIPS, 2017.
T. Wu and J. Chan, “Stock Prediction Using VADER Sentiment Signals,” Expert Systems with Applications, 2022.
S. Patel, “Financial Time Series Classification Using Deep Learning,” Pattern Recognition Letters, 2023.
L. Li et al., “Modeling Stock Direction with BiLSTM,” IEEE Access, 2022.
K. Yang and L. Zhao, “Attention-Augmented LSTM for Price Movement Prediction,” Knowledge-Based Systems, 2021.
R. Hafner et al., “Market Sentiment and Volatility Dynamics,” Finance Research Letters, 2023.
M. Zafari et al., “Economic Prediction from Twitter Sentiment,” Applied Soft Computing, 2020.
S. Liu, “Behavioral Finance and Social Media Sentiment,” Economic Modelling, 2021.
C. Ding et al., “Temporal Fusion Networks for Stock Forecasting,” arXiv, 2022.
S. Hu and B. Yu, “Sentiment Analysis and Temporal Price Prediction,” IEEE Transactions on Affective Computing, 2023.
P. Ghosh and A. Sengupta, “Stock Market Prediction Using Hybrid ML Models,” Journal of Finance & Data Science, 2022.
C. Brown and M. White, “Investor Sentiment and Market Reactions,” Journal of Behavioral Finance, 2019.
Nandal, P., Dahiya, M., Singh, M., Dagur, A., & Kumar, B. (Eds.). (2025). Progressive Computational Intelligence, Information Technology and Networking. CRC Press. DOI: https://doi.org/10.1201/9781003650010
Downloads
Published
Issue
Section
License
Copyright (c) 2026 International Journal of Scientific Research in Computer Science, Engineering and Information Technology

This work is licensed under a Creative Commons Attribution 4.0 International License.