Abstract
This research proposes a novel method for enhancing the accuracy of stock price prediction by combining ensemble empirical mode decomposition (EEMD), ensemble convolutional neural network (CNN), and X (Twitter) sentiment scores based on historical stock data. The complexity and volatility of financial markets pose challenges to accurate stock price forecasting. To address this challenge, the presented approach utilizes EEMD to decompose the original stock price time series, X sentiment analysis data, and relative strength index (RSI) technical indicator data obtained from daily stock fluctuations into intrinsic mode functions (IMFs) and a residual component. Subsequently, an ensemble CNN is constructed, comprising parallel subnetworks that learn distinct IMF representations, and their combined predictions result in robust stock price forecasts. This ensemble CNN consists of multiple parallel subnetworks, each learning distinct IMF representations, and combining their predictions yields a robust stock price forecast. X sentiment scores are incorporated through a separate CNN that analyzes sentiment in tweets related to target equities, capturing polarity and intensity. Experiments with actual stock price and X data show that the proposed "EEMD–ensemble CNN" model outperforms baseline methods in accurate stock price forecasting. The incorporation of X sentiment scores improves forecasts by accounting for the influence of public sentiment on stock price fluctuations. This study demonstrates the potential benefits of social media sentiment analysis for financial forecasting and offers practical implications for investors, traders, and financial analysts seeking informed decisions in dynamic stock market environments.
Similar content being viewed by others
Availability of data and material
The datasets generated and/or analyzed during the current study are available from the corresponding author on reasonable request.
Code availability
All codes for data cleaning and analysis associated with the current submission are available
from the corresponding author upon reasonable request.
Change history
07 March 2024
A Correction to this paper has been published: https://doi.org/10.1007/s13278-024-01237-6
References
Alam M, Abid F, Guangpei C, Yunrong LV (2020) Social media sentiment analysis through parallel dilated convolutional neural network for smart city applications. Comput Commun 154:129–137. https://doi.org/10.1016/j.comcom.2020.02.044
Ali M, Khan DM, Alshanbari HM, El-Bagoury AAAH (2023) Prediction of complex stock market data using an improved hybrid EMD-LSTM model. Appl Sci. https://doi.org/10.3390/app13031429
Audrino F, Sigrist F, Ballinari D (2020) The impact of sentiment and attention measures on stock market volatility. Int J Forecast 36(2):334–357. https://doi.org/10.1016/j.ijforecast.2019.05.010
Banik S, Sharma N, Mangla M, Mohanty SN (2022) LSTM based decision support system for swing trading in stock market. Knowl Based Syst 239:107994. https://doi.org/10.1016/j.knosys.2021.107994
Batabyal D, Bandopadhyay D, Sadhukhan B, Das N, Mukherjee S (2023) Exploring stationarity and fractality in stock market time-series. In: 2023 international conference on intelligent systems, advanced computing and communication (ISACC), Feb. 2023, pp 1–6. https://doi.org/10.1109/ISACC56298.2023.10084056
Bisoi R, Dash PK, Parida AK (2019) Hybrid Variational Mode Decomposition and evolutionary robust kernel extreme learning machine for stock price and movement prediction on daily basis. Appl Soft Comput 74:652–678. https://doi.org/10.1016/j.asoc.2018.11.008
Cakra YE, Distiawan Trisedya B (2015) Stock price prediction using linear regression based on sentiment analysis. In: 2015 International Conference on Advanced Computer Science and Information Systems (ICACSIS), Oct. 2015, pp 147–154. https://doi.org/10.1109/ICACSIS.2015.7415179.
Chaki J, Dey N, Panigrahi BK, Shi F, Fong SJ, Sherratt RS (2020) Pattern mining approaches used in social media data. Int J Unc Fuzz Knowl Based Syst 28(Supp 02):123–152. https://doi.org/10.1142/S021848852040019X
Chandar SK (2022) Convolutional neural network for stock trading using technical indicators. Autom Softw Eng 29(1):16. https://doi.org/10.1007/s10515-021-00303-z
Chaudhuri A, Mukherjee S, Chowdhury S, Sadhukhan B, Goswami RT (2018) Fractality and stationarity analysis on stock market. In: 2018 international conference on advances in computing, communication control and networking (ICACCCN), Greater Noida (UP), India: IEEE, Oct. 2018, pp 395–398. https://doi.org/10.1109/ICACCCN.2018.8748504
Chen W, Shi K (2019) A deep learning framework for time series classification using relative position matrix and convolutional neural network. Neurocomputing 359:384–394. https://doi.org/10.1016/j.neucom.2019.06.032
Chicco D, Warrens MJ, Jurman G (2021) The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation. PeerJ Comput Sci 7:e623. https://doi.org/10.7717/peerj-cs.623
Chong LS, Lim KM, Lee CP (2020) Stock market prediction using ensemble of deep neural networks. In: 2020 IEEE 2nd international conference on artificial intelligence in engineering and technology (IICAIET), 2020, pp 1–5. https://doi.org/10.1109/IICAIET49801.2020.9257864.
Das S, Behera RK, Kumar M, Rath SK (2018) Real-time sentiment analysis of twitter streaming data for stock prediction. Procedia Comput Sci 132:956–964. https://doi.org/10.1016/j.procs.2018.05.111
Das N, Sadhukhan B, Chatterjee T, Chakrabarti S (2022) Effect of public sentiment on stock market movement prediction during the COVID-19 outbreak. Soc Netw Anal Min 12(1):92. https://doi.org/10.1007/s13278-022-00919-3
De Myttenaere A, Golden B, Grand BL, Rossi F (2016) Mean absolute percentage error for regression models. Neurocomputing 192:38–48. https://doi.org/10.1016/j.neucom.2015.12.114
Deveikyte J, Geman H, Piccari C, Provetti A (2022) A sentiment analysis approach to the prediction of market volatility. Front Artif Intell. https://doi.org/10.3389/frai.2022.836809
Faltermeier R, Zeiler A, Tomé AM, Brawanski A, Lang EW (2011) Weighted sliding empirical mode decomposition. Adv Adapt Data Anal 03(04):509–526. https://doi.org/10.1142/S1793536911000891
Gandhmal DP, Kumar K (2019) Systematic analysis and review of stock market prediction techniques. Comput Sci Rev 34:100190. https://doi.org/10.1016/j.cosrev.2019.08.001
Gu C, Kurov A (2020) Informational role of social media: evidence from Twitter sentiment. J Bank Finance 121:105969. https://doi.org/10.1016/j.jbankfin.2020.105969
Hossain MR, Ismail MT, Karim SABA (2021) Improving stock price prediction using combining forecasts methods. IEEE Access 9:132319–132328. https://doi.org/10.1109/ACCESS.2021.3114809
Ingle V, Deshmukh S (2021) Ensemble deep learning framework for stock market data prediction (EDLF-DP). Glob Trans Proc 2(1):47–66. https://doi.org/10.1016/j.gltp.2021.01.008
Jiang W (2021) Applications of deep learning in stock market prediction: recent progress. Expert Syst Appl 184:115537. https://doi.org/10.1016/j.eswa.2021.115537
Jin Z, Yang Y, Liu Y (2020) Stock closing price prediction based on sentiment analysis and LSTM. Neural Comput Appl 32(13):9713–9729. https://doi.org/10.1007/s00521-019-04504-2
Jin Z, Jin Y, Chen Z (2022) Empirical mode decomposition using deep learning model for financial market forecasting. PeerJ Comput Sci 8:e1076. https://doi.org/10.7717/peerj-cs.1076
Jothimani D, Shankar R, Yadav SS (2016) A hybrid EMD-ANN model for stock price prediction. In: Panigrahi BK, Suganthan PN, Das S, Satapathy SC (eds.) Swarm, evolutionary, and memetic computing in lecture notes in computer science. Springer International Publishing, Cham, pp 60–70. https://doi.org/10.1007/978-3-319-48959-9_6.
Kolasani SV, Assaf R (2020) Predicting stock movement using sentiment analysis of twitter feed with neural networks. J Data Anal Inf Process. https://doi.org/10.4236/jdaip.2020.84018
Kreinovich V, Nguyen H, Ouncharoen R (2014) How to estimate forecasting quality: a system-motivated derivation of symmetric mean absolute percentage error (SMAPE) and other similar characteristics. Departmental Technical Reports (CS), https://scholarworks.utep.edu/cs_techrep/865
Liu C-L, Hsaio W-H, Tu Y-C (2019) Time series classification with multivariate convolutional neural network. IEEE Trans Ind Electron 66(6):4788–4797. https://doi.org/10.1109/TIE.2018.2864702
Maji G, Mondal D, Dey N, Debnath NC, Sen S (2021) Stock prediction and mutual fund portfolio management using curve fitting techniques. J Ambient Intell Human Comput 12(10):9521–9534. https://doi.org/10.1007/s12652-020-02693-6
Mendoza-Urdiales RA, Núñez-Mora JA, Santillán-Salgado RJ, Valencia-Herrera H (2022) Twitter sentiment analysis and influence on stock performance using transfer entropy and EGARCH methods. Entropy (basel) 24(7):874. https://doi.org/10.3390/e24070874
Mukherjee S, Sadhukhan B, Sarkar N, Roy D, De S (2021) Stock market prediction using deep learning algorithms. CAAI Trans Intell Technol. https://doi.org/10.1049/cit2.12059
Oldfield GS, Santomero AM (2023) The place of risk management in financial institutions. Center for Financial Institutions Working Papers, Art. no. 95–05, Jan. 1997, Accessed: Jul. 20, 2023. https://ideas.repec.org//p/wop/pennin/95-05.html
Pagolu VS, Challa KNR, Panda G, Majhi B (2023) Sentiment analysis of twitter data for predicting stock market movements. arXiv: http://arxiv.org/abs/1610.09225
Panigrahi AK, Vachhani K, Chaudhury SK (2021) Trend identification with the relative strength index (RSI) technical indicator –a conceptual study. J Manag Res Anal 8(4):159–169. https://doi.org/10.18231/j.jmra.2021.033
Pishro-Nik H (2021) Mean squared error (MSE). Introduction to probability, statistics, and random processes. Accessed Oct. 19, 2021. https://www.probabilitycourse.com/chapter9/9_1_5_mean_squared_error_MSE.php
Rezaei H, Faaljou H, Mansourfar G (2021) Stock price prediction using deep learning and frequency decomposition. Expert Syst Appl 169:114332. https://doi.org/10.1016/j.eswa.2020.114332
Shafiee A et al (2016) ISAAC: a convolutional neural network accelerator with in-situ analog arithmetic in crossbars. SIGARCH Comput Archit News 44(3):14–26. https://doi.org/10.1145/3007787.3001139
Shah D, Isah H, Zulkernine F (2019) Stock market analysis: a review and taxonomy of prediction techniques. Int J Financ Stud. https://doi.org/10.3390/ijfs7020026
Shu W, Gao Q (2020) Forecasting stock price based on frequency components by EMD and neural networks. IEEE Access 8:206388–206395. https://doi.org/10.1109/ACCESS.2020.3037681
Singh S, Kaur A (2022) Twitter sentiment analysis for stock prediction. Rochester, NY,. https://doi.org/10.2139/ssrn.4157658
Srijiranon K, Lertratanakham Y, Tanantong T (2022) A hybrid framework using PCA, EMD and LSTM methods for stock market price prediction with sentiment analysis. Appl Sci 12(21):10823. https://doi.org/10.3390/app122110823
Wankhade M, Rao ACS, Kulkarni C (2022) A survey on sentiment analysis methods, applications, and challenges. Artif Intell Rev 55(7):5731–5780. https://doi.org/10.1007/s10462-022-10144-1
Wu Z, Huang NE (2009) Ensemble empirical mode decomposition: a noise-assisted data analysis method. Adv Adapt Data Anal 01(01):1–41. https://doi.org/10.1142/S1793536909000047
Xuan Y, Yu Y, Wu K (2020) Prediction of short-term stock prices based on EMD-LSTM-CSI neural network method. In: 2020 5th IEEE international conference on big data analytics (ICBDA), May 2020, pp 135–139. https://doi.org/10.1109/ICBDA49040.2020.9101194.
Yujun Y, Yimei Y, Jianhua X (2020) A hybrid prediction method for stock price using LSTM and ensemble EMD. Complexity 2020:e6431712. https://doi.org/10.1155/2020/6431712
Zhou F, Zhou H, Yang Z, Yang L (2019) EMD2FNN: a strategy combining empirical mode decomposition and factorization machine based neural network for stock market trend prediction. Expert Syst Appl 115:136–151. https://doi.org/10.1016/j.eswa.2018.07.065
Funding
No funding was received to assist with the preparation of this manuscript.
Author information
Authors and Affiliations
Contributions
Nabanita Das and Bikash Sadhukhan wrote the manuscript, Susmit Shekhar Bhakta worked on data and coding, Satyajit Chakraborty revised the draft. All authors reviewed the manuscript.
Corresponding author
Ethics declarations
Conflicts of interest
The authors have no conflicts of interest to declare that they are relevant to the content of this article.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
The original online version of this article was revised: to update one author name.
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.
About this article
Cite this article
Das, N., Sadhukhan, B., Bhakta, S.S. et al. Integrating EEMD and ensemble CNN with X (Twitter) sentiment for enhanced stock price predictions. Soc. Netw. Anal. Min. 14, 29 (2024). https://doi.org/10.1007/s13278-023-01190-w
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s13278-023-01190-w