Data Modeling
Does Financial News Sentiment Really Move Stock Prices? A Machine Learning Investigation Using Sentiment Analysis and LSTM Forecasting
Iffat Jahan
Data Modeling 3 (1) 1-8 https://doi.org/10.25163/data.3110810
Submitted: 25 October 2022 Revised: 10 December 2022 Accepted: 18 December 2022 Published: 20 December 2022
Abstract
Whether news sentiment genuinely moves markets, or merely appears to in hindsight, remains a surprisingly unsettled question — one this study revisits empirically rather than theoretically. Stock market behavior has long resisted prediction from historical price data alone, partly because unstructured signals such as financial news and social commentary inject volatility that purely numerical models tend to miss. Drawing on a large labeled corpus of financial headlines alongside seven years of company-level closing-price data, we built a two-stage system: first, a sentiment classifier (trained using Naive Bayes and Support Vector Machine algorithms) that scores news as positive, negative, or neutral; and second, a Long Short-Term Memory network that forecasts next-day price movement using both that sentiment score and historical closing price. The sentiment model reached roughly 75% accuracy — respectable, though not without room to grow — and, more tellingly, the forecasting model that incorporated sentiment outperformed the price-only baseline, suggesting sentiment is not just incidental noise but a meaningful predictive input. Correlational analysis reinforced this, showing closing price and news sentiment moving together on most observed trading days. These findings sit comfortably alongside, and to some extent extend, prior evidence from other exchanges and modeling approaches. What emerges is a cautious but fairly clear takeaway: text-derived sentiment adds real, if still imperfect, value to quantitative stock forecasting, and refining sentiment accuracy may be the most direct path toward sharper predictions.Keywords— Stock market prediction, financial news sentiment, Sentiment analysis, Long Short-Term Memory (LSTM), Support Vector Machine, Naive Bayes, Time series forecasting
References
Akter, S., & Aziz, M. T. (2016). Sentiment analysis on Facebook group using lexicon-based approach. In 2016 3rd International Conference on Electrical Engineering and Information Communication Technology (ICEEICT) (pp. 1–4). IEEE. https://doi.org/10.1109/ICEEICT.2016.7873080
Arif, M. H., Li, J., Iqbal, M., & Liu, K. (2018). Sentiment analysis and spam detection in short informal text using learning classifier systems. Soft Computing, 22(21), 7281–7291. https://doi.org/10.1007/s00500-017-2729-x
Batra, R., & Daudpota, S. M. (2018). Integrating StockTwits with sentiment analysis for better prediction of stock price movement. In 2018 International Conference on Computing, Mathematics and Engineering Technologies (ICoMET) (pp. 1–5). IEEE. https://doi.org/10.1109/ICOMET.2018.8346382
Biswas, S., Ghosh, A., Chakraborty, S., Roy, S., & Bose, R. (2020). Scope of sentiment analysis on news articles regarding stock market and GDP in struggling economic condition. International Journal of Emerging Trends in Engineering Research, 8(7), 3594–3609. https://doi.org/10.30534/ijeter/2020/117872020
Bonta, V., Kumaresh, N., & Janardhan, N. (2019). A comprehensive study on lexicon-based approaches for sentiment analysis. Asian Journal of Computer Science and Technology, 8(S2), 1–6.
Budiharto, W. (2021). Data science approach to stock prices forecasting in Indonesia during COVID-19 using Long Short-Term Memory (LSTM). Journal of Big Data, 8(1), Article 47. https://doi.org/10.1186/s40537-021-00430-0
Chaudhuri, A., Mukherjee, S., Chowdhury, S., & Sadhukhan, B. (2018). Fractality and stationarity analysis on stock market. In 2018 International Conference on Advances in Computing, Communication Control and Networking (ICACCCN) (pp. 395–398). IEEE. https://doi.org/10.1109/ICACCCN.2018.8748504
Chauhan, P., Sharma, N., & Sikka, G. (2021). The emergence of social media data and sentiment analysis in election prediction. Journal of Ambient Intelligence and Humanized Computing, 12(2), 2601–2627. https://doi.org/10.1007/s12652-020-02423-y
Chou, C., Park, J., & Chou, E. (2021). Predicting stock closing price after COVID-19 based on sentiment analysis and LSTM. In 2021 IEEE 5th Advanced Information Technology, Electronic and Automation Control Conference (IAEAC) (Vol. 5, pp. 2752–2756). IEEE. https://doi.org/10.1109/IAEAC50856.2021.9390845
Derakhshan, A., & Beigy, H. (2019). Sentiment analysis on stock social media for stock price movement prediction. Engineering Applications of Artificial Intelligence, 85, 569–578. https://doi.org/10.1016/j.engappai.2019.07.002
Dutta, A., Pooja, G., Jain, N., Panda, R. R., & Nagwani, N. K. (2021). A hybrid deep learning approach for stock price prediction. In A. Joshi, M. Khosravy, & N. Gupta (Eds.), Machine learning for predictive analysis (pp. 1–10). Springer. https://doi.org/10.1007/978-981-15-7106-0
Eck, M., Germani, J., Sharma, N., Seitz, J., & Ramdasi, P. P. (2021). Prediction of stock market performance based on financial news articles and their classification. In N. Sharma, A. Chakrabarti, V. E. Balas, & J. Martinovic (Eds.), Data management, analytics and innovation (pp. 35–44). Springer.
Elena, P. (2021). Predicting the movement direction of OMXS30 stock index using XGBoost and sentiment analysis [Bachelor's thesis, Blekinge Institute of Technology]. http://urn.kb.se/resolve?urn=urn:nbn:se:bth-21119
Géron, A. (2022). Hands-on machine learning with Scikit-Learn, Keras, and TensorFlow. O'Reilly Media.
Li, X., Wu, P., & Wang, W. (2020). Incorporating stock prices and news sentiments for stock market prediction: A case of Hong Kong. Information Processing & Management, 57(5), 102212. https://doi.org/10.1016/j.ipm.2020.102212
Li, X., Xie, H., Chen, L., Wang, J., & Deng, X. (2014). News impact on stock price return via sentiment analysis. Knowledge-Based Systems, 69, 14–23. https://doi.org/10.1016/j.knosys.2014.04.022
Mohan, S., Mullapudi, S., Sammeta, S., Vijayvergia, P., & Anastasiu, D. C. (2019). Stock price prediction using news sentiment analysis. In 2019 IEEE Fifth International Conference on Big Data Computing Service and Applications (BigDataService) (pp. 205–208). IEEE. https://doi.org/10.1109/BigDataService.2019.00035
Pavitha, N., Pungliya, V., Raut, A., Bhonsle, R., Purohit, A., Patel, A., & Shashidhar, R. (2022). Movie recommendation and sentiment analysis using machine learning. Global Transitions Proceedings, 3(1), 279–284.
Shynkevich, Y., McGinnity, T. M., Coleman, S., & Belatreche, A. (2015). Predicting stock price movements based on different categories of news articles. In 2015 IEEE Symposium Series on Computational Intelligence (pp. 703–710). IEEE. https://doi.org/10.1109/SSCI.2015.107
Su, J., Shirab, J. S., & Matwin, S. (2011). Large scale text classification using semisupervised multinomial Naive Bayes. In Proceedings of the 28th International Conference on Machine Learning (ICML 2011).
Syeda, F. S. (2022). Sentiment analysis of financial news with supervised learning [Manuscript].
Save
Citation
View
Share