Skip to main content
Log in

Deep Learning for Stock Market Prediction Using Sentiment and Technical Analysis

  • Original Research
  • Published:
SN Computer Science Aims and scope Submit manuscript

Abstract

Machine learning and deep learning techniques are applied by researchers with a background in both economics and computer science, to predict stock prices and trends. These techniques are particularly attractive as an alternative to existing models and methodologies because of their ability to extract abstract features from data. Most existing research approaches are based on using either numerical/economical data or textual/sentimental data. In this article, we use cutting-edge deep learning/machine learning approaches on both numerical/economical data and textual/sentimental data in order not only to predict stock market prices and trends based on combined data but also to understand how a stock's Technical Analysis can be strengthened by using Sentiment Analysis. Using the four tickers AAPL, GOOG, NVDA and S&P 500 Information Technology, we collected historical financial data and historical textual data and we used each type of data individually and in unison, to display in which case the results were more accurate and more profitable. We describe in detail how we analyzed each type of data, and how we used it to come up with our results.

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

Access this article

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
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12

Similar content being viewed by others

Data availability

The economic data utilized in this study was sourced from Yahoo Finance. Economic data used in this research is publicly available and can be accessed through Yahoo Finance's platform. The financial_phrasebank dataset referenced in this study was also utilized. The dataset is publicly available.

References

  1. Liberti JM, Petersen M. Information: hard and soft. Rev Corp Finance Stud. 2019;8(1):1–41.

    Article  Google Scholar 

  2. Chong E, Han C, Park FC. Deep learning networks for stock market analysis and prediction: methodology, data representations, and case studies. Expert Syst Appl. 2017;83:187–205.

    Article  Google Scholar 

  3. Fischer T, Krauss C. Deep learning with long short-term memory networks for financial market predictions. Eur J Oper Res. 2018;270(2):654–69.

    Article  MathSciNet  Google Scholar 

  4. Long W, Lu Z, Cui L. Deep learning-based feature engineering for stock price movement prediction. Knowl Based Syst. 2019;164:163–73.

    Article  Google Scholar 

  5. Zhong X, Enke D. Predicting the daily return direction of the stock market using hybrid machine learning algorithms. Financ Innov. 2019;5(1):1–20.

    Article  Google Scholar 

  6. Vignesh CK. Applying machine learning models in stock market prediction. EPRA Int J Res Dev. 2020;5(4):395–8.

    Google Scholar 

  7. Nabipour M, Nayyeri P, Jabani H, Mosavi A, Salwana E. Deep learning for stock market prediction. Entropy. 2020;22(8):840.

    Article  Google Scholar 

  8. Ferreira F, Gandomi A, Cardoso R. Artificial intelligence applied to stock market trading: a review. IEEE Access. 2021;9:30898–917.

    Article  Google Scholar 

  9. Sun A, Lachanski M, Fabozzi F. Trade the tweet: social media text mining and sparse matrix factorization for stock market prediction. Int Rev Financ Anal. 2016;48:272–81.

    Article  Google Scholar 

  10. Shapiro AH, Sudhof M, Wilson D. Measuring news sentiment, Federal Reserve Bank of San Francisco Working Paper 2017-01. 2017. https://doi.org/10.24148/wp2017-01.

  11. Pagolu VS, Reddy KN, Panda G, Majhi B (2016) Sentiment analysis of twitter data for predicting stock market movements. 2016 International Conference on Signal Processing, Communication, Power and Embedded System, Paralakhemundi, India, 3–5 October 2016, pp 1345–1350. https://doi.org/10.1109/SCOPES.2016.7955659

  12. Batra R, Daudpota SM. Integrating StockTwits with sentiment analysis for better prediction of stock price movement. In: Proceedings of International Conference on Computing, Mathematics and Engineering Technologies; 2018. pp. 1–5.

  13. Tabari N, Seyeditabari A, Peddi T, Hadzikadic M, Zadrozny W. A comparison of neural network methods for accurate sentiment analysis of Stock Market Tweets. In: ECML PKDD 2018 Workshops. MIDAS 2018, PAP 2018. LNCS, vol 11054. 2019; Springer.

  14. Chatziloizos G, Gunopulos D, Konstantinou K. Forecasting stock market trends using deep learning on financial and textual data. Proceedings of the 10th International Conference on Data Science, Technology and Applications (DATA 2021). SciTePress. pp. 105–114.

  15. Goodfellow I, Bengio Y, Courville A. Deep learning. Cambridge: MIT Press; 2016.

    Google Scholar 

  16. Ussama Y, Soon C, Vijayalakshmi A, Jaideep V. Sentiment-based analysis of tweets during the US Presidential Elections. 2017. pp. 1–10. https://doi.org/10.1145/3085228.3085285.

  17. Rao T, Srivastava S. Analyzing stock market movements using twitter sentiment analysis. Proceedings of the International Conference on Advances in Social Networks Analysis and Mining (ASONAM); 2012. pp. 119–123.

  18. Lounnapha S, Zhongdong W, Sookasame C. Research on stock price prediction method based on convolutional neural network. Proceedings of the international conference on virtual reality and intelligent systems (ICVRIS). IEEE; 2019. pp. 173–6.

  19. Yan X, Zhao J. Application of improved convolution neural network in financial forecasting. Proceedings of the 4th IEEE international conference on cloud computing and big data analytics. 2019. pp. 321–6.

  20. Cao J, Wang J. Stock price forecasting model based on modified convolution neural network and financial time series analysis. Int J Commun Syst. 2019;32:e3987.

    Article  Google Scholar 

  21. Malo P, Sinha A, Korhonen P, Wallenius J, Takala P. Good debt or bad debt. J Assoc Inf Sci Technol. 2014;65:782–96. https://doi.org/10.1002/asi.23062.

    Article  Google Scholar 

  22. Hutto CJ, Gilbert E. VADER: a parsimonious rule-based model for sentiment analysis of social media text. Proceedings of the 8th international conference on weblogs and social media. ICWSM; 2015.

  23. Loughran T, McDonald B. When is a liability not a liability? textual analysis, dictionaries and 10-Ks. J Finance. 2011;66:35–65.

    Article  Google Scholar 

  24. Fiol-Roig G, Miró-Julià M, Isern-Deyà AP. Applying data mining techniques to stock market analysis. In: Trends in practical applications of agents and multiagent systems. Advances in intelligent and soft computing, vol 71. Springer; 2010.

  25. chart-formations.com. http://www.chart-formations.com/indicators/atr.aspx?cat=volatility

  26. Larry Williams CTI Publishing. https://williamspercentr.com/the-original-percent-r

  27. Pedregosa F, et al. Scikit-learn: machine learning in Python. JMLR. 2011;12:2825–30.

    MathSciNet  Google Scholar 

  28. Kontopoulos E, Berberidis C, Dergiades T, Bassiliades N. Ontology-based sentiment analysis of twitter posts. Expert Syst Appl. 2013;40(10):4065–74.

    Article  Google Scholar 

Download references

Funding

This study has received no funding.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Georgios-Markos Chatziloizos.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

Additional information

Publisher's Note

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

This article is part of the topical collection “Data Science, Technology and Applications” guest edited by Slimane Hammoudi and Christoph Quix.

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

Chatziloizos, GM., Gunopulos, D. & Konstantinou, K. Deep Learning for Stock Market Prediction Using Sentiment and Technical Analysis. SN COMPUT. SCI. 5, 446 (2024). https://doi.org/10.1007/s42979-024-02651-5

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s42979-024-02651-5

Keywords

Navigation