journal article·2022-10-25Open access

A Hybrid Framework Using PCA, EMD and LSTM Methods for Stock Market Price Prediction with Sentiment Analysis

Krittakom Srijiranon, Yoskorn Lertratanakham, Tanatorn Tanantong

Applied Sciences· Volume 12· Issue 21

Abstract

The aim of investors is to obtain the maximum return when buying or selling stocks in the market. However, stock price shows non-linearity and non-stationarity and is difficult to accurately predict. To address this issue, a hybrid prediction model was formulated combining principal component analysis (PCA), empirical mode decomposition (EMD) and long short-term memory (LSTM) called PCA-EMD-LSTM to predict one step ahead of the closing price of the stock market in Thailand. In this research, news sentiment analysis was also applied to improve the performance of the proposed framework, based on financial and economic news using FinBERT. Experiments with stock market price in Thailand collected from 2018–2022 were examined and various statistical indicators were used as evaluation criteria. The obtained results showed that the proposed framework yielded the best performance compared to baseline methods for predicting stock market price. In addition, an adoption of news sentiment analysis can help to enhance performance of the original LSTM model.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Stock Market Forecasting Methods · Energy Load and Power Forecasting · Currency Recognition and Detection

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Thammasat Research Unit in Data Innovation and Artificial Intelligence, Department of Computer Science, Faculty of Science and Technology, Thammasat University, Pathum Thani 12121, Thailand

References (53)

Show source-provided references
1. Pongsupatt, T., and Pongsupatt, A. (2019, January 17). Factors affecting stock price: The case of Thailand stock exchange SET100 index. Proceedings of the 51st International Academic Conference, Vienna, Austria.10.20472/IAC.2019.051.032 ↗
2. Can investor sentiment be a momentum time-series predictor? evidence from China10.1016/j.jempfin.2017.04.001 ↗
3. A novel text mining approach to Financial Time Series forecasting10.1016/j.neucom.2011.12.013 ↗
4. A convolutional neural network framework for classifying inappropriate online video contents
5. Deep learning10.1038/nature14539 ↗
6. A systematic review of stock market prediction using machine learning and statistical techniques10.1016/j.matpr.2020.11.399 ↗
7. Zhao, K., Zhang, J., and Liu, Q. (2022). Dual-hybrid modeling for option pricing of CSI 300ETF. Information, 13.10.3390/info13010036 ↗
8. Surveying stock market forecasting techniques—part II: Soft computing methods10.1016/j.eswa.2008.07.006 ↗
9. Vargas, M.R., dos Anjos, C.E., Bichara, G.L., and Evsukoff, A.G. (2018, January 8–13). Deep Leaming for stock market prediction using technical indicators and financial news articles. Proceedings of the 2018 International Joint Conference on Neural Networks (IJCNN), Rio de Janeiro, Brazil.10.1109/IJCNN.2018.8489208 ↗
10. Stock market prediction using machine learning classifiers and social media, news10.1007/s12652-020-01839-w ↗
11. Chen, G., Liu, S., and Jiang, F. (2022). Daily Weather Forecasting Based on Deep Learning Model: A Case Study of Shenzhen City, China. Atmosphere, 13.10.3390/atmos13081208 ↗
12. Wu, C., Huang, L., and Wang, W. (2020, January 28–30). De-noising Method of Joint Empirical Mode Decomposition and Principal Component Analysis. Proceedings of the IEEE International Conference on Power, Intelligent Computing and Systems, Virtual Conference.10.1109/ICPICS50287.2020.9201968 ↗
13. The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis10.1098/rspa.1998.0193 ↗
14. Nava, N., Matteo, T., and Aste, T. (2018). Financial time series forecasting using empirical mode decomposition and support vector regression. Risks, 6.10.3390/risks6010007 ↗
15. 24-hour prediction of PM2.5 concentrations by combining empirical mode decomposition and bidirectional long short-term memory neural network10.1016/j.scitotenv.2022.153276 ↗
16. New insights and best practices for the successful use of empirical mode decomposition, iterative filtering and derived algorithms10.1038/s41598-020-72193-2 ↗
17. Ensemble empirical mode decomposition: A noise-assisted data analysis method10.1142/S1793536909000047 ↗
18. A fault diagnosis method of rolling element bearings based on CEEMDAN10.1177/0954406215624126 ↗
19. Torres, M.E., Colominas, M.A., Schlotthauer, G., and Flandrin, P. (2011, January 22–27). A complete ensemble empirical mode decomposition with adaptive noise. Proceedings of the 2011 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Prague, Czech Republic.10.1109/ICASSP.2011.5947265 ↗
20. Liu, T., Luo, Z., Huang, J., and Yan, S. (2018). A Comparative Study of Four Kinds of Adaptive Decomposition Algorithms and Their Applications. Sensors, 18.10.3390/s18072120 ↗
21. Wind speed prediction using a hybrid model of EEMD and LSTM considering seasonal features10.1016/j.egyr.2022.07.007 ↗
22. Crude oil price prediction using CEEMDAN and LSTM-attention with news sentiment index10.2516/ogst/2021010 ↗
23. (2022, May 01). Curse of Dimensionality-A “Curse” to Machine Learning. Available online: https://towardsdatascience.com/curse-of-dimensionality-a-curse-to-machine-learning-c122ee33bfeb.
24. A literature review of (sparse) exponential family PCA10.1007/s42519-021-00238-4 ↗
25. (2022, May 01). 7.1: Eigenvalues and Eigenvectors of a Matrix. Mathematics LibreTexts. Available online: https://math.libretexts.org/Bookshelves/Linear_Algebra/A_First_Course_in_Linear_Algebra_(Kuttler)/07%3A_Spectral_Theory/7.01%3A_Eigenvalues_and_Eigenvectors_of_a_Matrix.
26. Joshi, C., and Panda, S. (2022, January 7–9). PCA-LSTM: Deep Learning Approach for the Indian Large-Caps. Proceedings of the 7th International conference for Convergence in Technology, Pune, India.10.1109/I2CT54291.2022.9824697 ↗
27. Analyzing potential tourist behavior using PCA and modified affinity propagation clustering based on baidu index: Taking beijing city as an example10.1016/j.dsm.2021.05.001 ↗
28. A novel decision-making system for selecting offshore wind turbines with PCA and D numbers10.1016/j.energy.2022.124818 ↗
29. Forecasting daily stock market return using dimensionality reduction10.1016/j.eswa.2016.09.027 ↗
30. Dang, N.C., Moreno-García, M.N., and De la Prieta, F. (2020). Sentiment Analysis Based on Deep Learning: A Comparative Study. Electronics, 9.10.3390/electronics9030483 ↗
31. Bhavitha, B.K., Rodrigues, A.P., and Chiplunkar, N.N. (2017, January 10–11). Comparative Study of Machine Learning Techniques in Sentimental Analysis. Proceedings of the International Conference on Inventive Communication and Computational Technologies, Tamilnadu, India.10.1109/ICICCT.2017.7975191 ↗
32. Can twitter help predict firm-level earnings and stock returns?
33. Liu, Z., Huang, D., Huang, K., Li, Z., and Zhao, J. (15, January 7). Finbert: A pre-trained financial language representation model for financial text mining. Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, Yokohama, Japan.
34. (2022, May 05). Deep Learning Architectures. Available online: https://developer.ibm.com/articles/cc-machine-learning-deep-learning-architectures.
35. A review of Deep Machine Learning10.4028/www.scientific.net/JERA.24.124 ↗
36. Long Short-Term Memory10.1162/neco.1997.9.8.1735 ↗
37. (2022, October 15). Colah’s Blog, Understanding LSTM Networks. Available online: https://colah.github.io/posts/2015-08-Understanding-LSTMs/.
38. Data Science Approach to stock prices forecasting in Indonesia during COVID-19 using long short-term memory (LSTM)10.1186/s40537-021-00430-0 ↗
39. Chou, S.-Y., Dewabharata, A., Zulvia, F.E., and Fadil, M. (2022). Forecasting Building Energy Consumption Using Ensemble Empirical Mode Decomposition, Wavelet Transformation, and Long Short-Term Memory Algorithms. Energies, 15.10.3390/en15031035 ↗
40. Forecasting monthly gas field production based on the CNN-LSTM model10.1016/j.energy.2022.124889 ↗
41. Lhasiw, N., Sanglerdsinlapachai, N., and Tanantong, T. (2021, January 21–23). A Bidirectional LSTM Model for Classifying Chatbot Messages. Proceedings of the 16th International Joint Symposium on Artificial Intelligence and Natural Language Processing, Virtual Conference.10.1109/iSAI-NLP54397.2021.9678173 ↗
42. Mahawan, A., Jaiteang, S., Srijiranon, K., and Eiamkanitchat, N. (March, January 28). Hybrid ARIMAX and LSTM Model to Predict Rice Export Price in Thailand. Proceedings of the International Conference on Cybernetics and Innovations, Ratchaburi, Thailand.
43. Cross-validation
44. Evaluating time series forecasting models: An empirical study on performance estimation methods10.1007/s10994-020-05910-7 ↗
45. Syed, A.R. (2011). A Review of Cross Validation and Adaptive Model Selection. [Master’s Thesis, Georgia State University].
46. (2022, May 05). Unit Root Testing. Available online: http://www.eviews.com/help/helpintro.html#page/content/advtimeser-Unit_Root_Testing.html.
47. (2022, May 05). Augmented Dickey-Fuller (ADF) Test—Must Read Guide. Available online: https://www.machinelearningplus.com/timeseries/augmented-dickey-fuller-test.
48. (2022, May 05). Statsmodels, Statistical Models, Hypothesis Tests, and Data Exploration. Available online: https://www.statsmodels.org/stable/index.html.
49. (2022, May 05). GitHub Repository, Technical Analysis Library in Python. Available online: https://github.com/bukosabino/ta.
50. (2022, May 05). GitHub Repository, VADER-Sentiment-Analysis. Available online: https://github.com/cjhutto/vaderSentiment.
51. (2022, May 05). GitHub Repository, TextBlob: Simplified Text Processing. Available online: https://github.com/sloria/textblob.
52. Effective machine learning model combination based on selective ensemble strategy for time series forecasting10.1016/j.ins.2022.09.002 ↗
53. Deep learning combined wind speed forecasting with hybrid time series decomposition and multi-objective parameter optimization10.1016/j.apenergy.2022.118674 ↗