Skip to main content
Log in

Improving stock market prediction accuracy using sentiment and technical analysis

  • Published:
Electronic Commerce Research Aims and scope Submit manuscript

Abstract

The utilization of sentiment analysis as a method for predicting stock market trends has gained significant attention recently, especially during economic crises. This research aims to assess the predictive accuracy of sentiment analysis in the stock market by constructing a reinforced model that integrates both sentiment and technical analysis. While prior studies have concentrated on social media sentiment for stock price prediction, this research introduces an enhanced model that combines sentiment analysis with technical indicators to improve the precision of stock market prediction. The study creates and evaluates predictive models for stock prices and trends using a substantial dataset of tweets from twenty prominent companies. Finally the re-enforced model has been developed and tested on the stock prices of: Apple, General Electric, Ford Motors and Amazon. The deliberate selection of these companies, each representing distinct industry sectors, serves a dual purpose. It not only facilitates a practical evaluation of our model across diverse market conditions but also ensures computational feasibility, allowing for a focused and detailed analysis of the model’s predictive accuracy and reliability in various economic landscapes. The study’s outcomes offer valuable insights into the effectiveness of the reinforced model, which combines sentiment and technical analysis to predict stock market movements, providing a more comprehensive approach to understanding market sentiment’s influence on stock prices. Furthermore, these findings contribute to the existing knowledge on stock market prediction techniques and emphasize the importance of considering multiple factors in decision-making.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

Data availability

There is no data associated with this research. In addition, implementation source code will be delivered upon request to the corresponding author Chaker Abdelaziz Kerrache.

Notes

  1. https://github.com/Nitinkumar3399/Batchelor-Thesis-Project-II/blob/main/AMZN.csv.

  2. Twitter developer API resource link: https://developer.twitter.com/en/portal/products/pro.

References

  1. Lu, W., Li, J., Wang, J., & Qin, L. (2021). A CNN-BILSTM-AM method for stock price prediction. Neural Computing and Applications, 33, 4741–4753.

    Article  Google Scholar 

  2. Zhang, L., Wang, S., & Liu, B. (2018). Deep learning for sentiment analysis: A survey. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 8(4), e1253.

    Google Scholar 

  3. Deveikyte, J., Geman, H., Piccari, C., & Provetti, A. (2022). A sentiment analysis approach to the prediction of market volatility. Frontiers in Artificial Intelligence, 5, 836809.

    Article  Google Scholar 

  4. Chandrasekaran, G., Nguyen, T. N., & Hemanth, D. J. (2021). Multimodal sentimental analysis for social media applications: A comprehensive review. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 11(5), e1415.

    Google Scholar 

  5. Chandrasekaran, G., Antoanela, N., Andrei, G., Monica, C., & Hemanth, J. (2022). Visual sentiment analysis using deep learning models with social media data. Applied Sciences, 12(3), 1030.

    Article  Google Scholar 

  6. Bhargava, M. G., & Rao, D. R. (2018). Sentimental analysis on social media data using r programming. International Journal of Engineering & Technology (IJET), 7(2), 80–84.

    Google Scholar 

  7. de Oliveira Carosia, A. E., Coelho, G. P., & da Silva, A. E. A. (2021). Investment strategies applied to the Brazilian stock market: A methodology based on sentiment analysis with deep learning. Expert Systems with Applications, 184, 115470.

    Article  Google Scholar 

  8. Li, S., Liu, F., Zhang, Y., & Yu, Z. (2023). Lean persuasive design of electronic word-of-mouth (e-WOM) indexes for e-commerce stores based on Fogg behavior model. Electronic Commerce Research. https://doi.org/10.1007/s10660-023-09753-x

  9. Pagolu, V. S., Reddy, K. N., Panda, G., Majhi, & Majhi, B. (2016). Sentiment analysis of twitter data for predicting stock market movements. In International conference on signal processing, communication, power and embedded system (SCOPES) (Vol. 2016, pp. 1345–1350). IEEE.

  10. Smailović, J., Grčar, M., Lavrač, N., & Žnidaršič, M. (2013). Predictive sentiment analysis of tweets: A stock market application. In Human–computer interaction and knowledge discovery in complex, unstructured, big data: 3rd international workshop, HCI-KDD. Held at SouthCHI 2013, Maribor, Slovenia, July 1–3, 2013. Proceedings (Vol. 2013, pp. 77–88). Springer.

  11. Abbas, Y., & Malik, M. (2023). Defective products identification framework using online reviews. Electronic Commerce Research, 23(2), 899–920.

    Article  Google Scholar 

  12. Ko, C. R., & Chang, H. T. (2021). LSTM-based sentiment analysis for stock price forecast. PeerJ Computer Science, 7, e408. https://doi.org/10.7717/peerj-cs.408

  13. Khedr, A. E., & Yaseen, N. (2017). Predicting stock market behavior using data mining technique and news sentiment analysis. International Journal of Intelligent Systems and Applications, 9(7), 22.

    Article  Google Scholar 

  14. Sun, S., Luo, C., & Chen, J. (2017). A review of natural language processing techniques for opinion mining systems. Information Fusion, 36, 10–25.

    Article  Google Scholar 

  15. Malagrino, L. S., Roman, N. T., & Monteiro, A. M. (2018). Forecasting stock market index daily direction: A Bayesian network approach. Expert Systems with Applications, 105, 11–22.

    Article  Google Scholar 

  16. Shah, D., Isah, H., & Zulkernine, F. (2018). Predicting the effects of news sentiments on the stock market. In 2018 IEEE international conference on big data (big data) (pp. 4705–4708). IEEE.

  17. Wu, D. D., Zheng, L., & Olson, D. L. (2014). A decision support approach for online stock forum sentiment analysis. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 44(8), 1077–1087.

    Article  Google Scholar 

  18. Lavanya, M., & Gnanasekaran, P. (2023). Prediction of stock price using machine learning (classification) algorithms. In 2023 international conference on advances in computing, communication and applied informatics (ACCAI) (pp. 1–5).

  19. Deepa, P., & Daisy, J. (2023). Identification of persisting trend in the Indian stock markets using AI. In 2023 international conference on advances in computing, communication and applied informatics (accai) (pp. 1–9).

  20. Chaudhary, J. K., Tyagi, S., Sharma, H. P., Akram, S. V., Sisodia, D. R., & Kapila, D. (2023). Machine learning model-based financial market sentiment prediction and application. In 2023 3rd international conference on advance computing and innovative technologies in engineering (ICACITE) (pp. 1456–1459). IEEE.

  21. Bhatt, R., Kumari, A., Rajesh, A., Rajasekaran, S. B., Deshmukh, V. P., & Srivastava, A. (2023). Technique for forecasting future market movement using machine learning and deep learning algorithms. In 2023 3rd international conference on advance computing and innovative technologies in engineering (ICACITE) (pp. 471–474). IEEE.

  22. Deswal, V., & Kumar, D. (2023). Stock market price prediction using machine learning techniques: A review. In 2023 international conference on computational intelligence and sustainable engineering solutions (CISES) (pp. 693–698). IEEE.

  23. He, W., Guo, L., Shen, J., & Akula, V. (2016). Social media-based forecasting: A case study of tweets and stock prices in the financial services industry. Journal of Organizational and End User Computing (JOEUC), 28(2), 74–91.

    Article  Google Scholar 

  24. Zhang, J., Cui, S., Xu, Y., Li, Q., & Li, T. (2018). A novel data-driven stock price trend prediction system. Expert Systems with Applications, 97, 60–69.

    Article  Google Scholar 

  25. Oliveira, N., Cortez, P., & Areal, N. (2017). The impact of microblogging data for stock market prediction: Using twitter to predict returns, volatility, trading volume and survey sentiment indices. Expert Systems with Applications, 73, 125–144.

    Article  Google Scholar 

  26. Yang, S. Y., Mo, S. Y. K., & Liu, A. (2015). Twitter financial community sentiment and its predictive relationship to stock market movement. Quantitative Finance, 15(10), 1637–1656.

    Article  Google Scholar 

  27. Kaplan, A. M., & Haenlein, M. (2010). Users of the world, unite! the challenges and opportunities of social media. Business Horizons, 53(1), 59–68.

    Article  Google Scholar 

  28. Java, A., Song, X., Finin, T., & Tseng, B. (2007). Why we Twitter: Understanding microblogging usage and communities. In Proceedings of the 9th WebKDD and 1st SNA-KDD 2007 workshop on Web mining and social network analysis (pp. 56–65).

  29. Elbagir, S., & Yang, J. (2019). Twitter sentiment analysis using natural language toolkit and vader sentiment. In Proceedings of the international multiconference of engineers and computer scientists (Vol. 122, p. 16).

  30. Chen, R., & Dong, R. (2023). The relationship between twitter sentiment and stock performance: A decision tree approach. In Proceedings of the 56th Hawaii International Conference on System Sciences. https://hdl.handle.net/10125/103225

  31. Ruiz, E. J., Hristidis, V., Castillo, C., Gionis, A., & Jaimes, A. (2012). Correlating financial time series with micro-blogging activity. In Proceedings of the fifth ACM international conference on Web search and data mining (pp. 513–522).

  32. Chen, K., Li, X., Luo, P., & Zhao, J. L. (2021). News-induced dynamic networks for market signaling: Understanding the impact of news on firm equity value. Information Systems Research, 32(2), 356–377.

    Article  Google Scholar 

  33. Tirunillai, S., & Tellis, G. J. (2012). Does chatter really matter? dynamics of user-generated content and stock performance. Marketing Science, 31(2), 198–215.

    Article  Google Scholar 

Download references

Acknowledgements

This work has been partially funded by both the R&D project SERB-SURE SUR/2022/001051 and the R&D project PID2021-122580NB-100, from MCIN/AEI/10.13039/501100011033 and “ERDF A way of making Europe”.

Author information

Authors and Affiliations

Authors

Contributions

Authors equally contributed to this work with more implementation-related efforts from Shubham Agrawal and Nitin Kumar.

Corresponding author

Correspondence to Chaker Abdelaziz Kerrache.

Ethics declarations

Conflict of interest

On behalf of all authors, the corresponding author states that there is no Competing interest.

Ethical and informed consent for data used

Not applicable.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Agrawal, S., Kumar, N., Rathee, G. et al. Improving stock market prediction accuracy using sentiment and technical analysis. Electron Commer Res (2024). https://doi.org/10.1007/s10660-024-09874-x

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10660-024-09874-x

Keywords

Navigation