Document Type : Original/Review Paper

Authors

Department of Computer Engineering, Yazd University, Yazd, Iran.

10.22044/jadm.2024.14831.2581

Abstract

This article proposes a novel hybrid network integrating three distinct architectures -CNN, GRU, and LSTM- to predict stock price movements. Here with Combining Feature Extraction and Sequence Learning and Complementary Strengths can Improved Predictive Performance. CNNs can effectively identify short-term dependencies and relevant features in time series, such as trends or spikes in stock prices. GRUs designed to handle sequential data. They are particularly useful for capturing dependencies over time while being computationally less expensive than LSTMs. In the hybrid model, GRUs help maintain relevant historical information in the sequence without suffering from vanishing gradient problems, making them more efficient for long sequences. LSTMs excel at learning long-term dependencies in sequential data, thanks to their memory cell structure. By retaining information over longer periods, LSTMs in the hybrid model ensure that important trends over time are not lost, providing a deeper understanding of the time series data. The novelty of the 1D-CNN-GRU-LSTM hybrid model lies in its ability to simultaneously capture short-term patterns and long-term dependencies in time series data, offering a more nuanced and accurate prediction of stock prices. The data set comprises technical indicators, sentiment analysis, and various aspects derived from pertinent tweets. Stock price movement is categorized into three categories: Rise, Fall, and Stable. Evaluation of this model on five years of transaction data demonstrates its capability to forecast stock price movements with an accuracy of 0.93717. The improvement of proposed hybrid model for stock movement prediction over existing models is 12% for accuracy and F1-score metrics.

Keywords

Main Subjects

  • A. Pérez, "Forecasting and optimization of stock trades," University of Seville, 2021.
  • M. Polanco-Martínez, "Dynamic relationship analysis between NAFTA stock markets using nonlinear, nonparametric, non-stationary methods," Nonlinear Dynamics, vol. 97, no. 1, pp. 369-389, 2019/07/01 2019, doi: 10.1007/s11071-019-04974-y.
  • F. Fama, "The behavior of stock-market prices," The journal of Business, vol. 38, no. 1, pp. 34-105, 1965.
  • Zhang, X. Liang, A. Zhiyuli, S. Zhang, R. Xu, and B. Wu, "At-lstm: An attention-based lstm model for financial time series prediction," in IOP Conference Series: Materials Science and Engineering, 2019, vol. 569, no. 5: IOP Publishing, p. 052037.
  • Shields, S. Ajour El Zein, and N. Vila Brunet, "An analysis on the NASDAQ’s potential for sustainable investment practices during the financial shock from Covid-19," Sustainability, vol. 13, no. 7, p. 3748, 2021.
  • K. Daradkeh, "A hybrid data analytics framework with sentiment convergence and multi-feature fusion for stock trend prediction," Electronics, vol. 11, no. 2, p. 250, 2022.
  • Chen and H. He, "Stock prediction using convolutional neural network," in IOP Conference series: materials science and engineering, 2018, vol. 435: IOP Publishing, p. 012026.
  • Pang, Y. Zhou, P. Wang, W. Lin, and V. Chang, "An innovative neural network approach for stock market prediction," The Journal of Supercomputing, vol. 76, pp. 2098-2118, 2020.
  • Cao and J. Wang, "Stock price forecasting model based on modified convolution neural network and financial time series analysis," International Journal of Communication Systems, vol. 32, no. 12, p. e3987, 2019.
  • Selvin, R. Vinayakumar, E. Gopalakrishnan, V. K. Menon, and K. Soman, "Stock price prediction using LSTM, RNN and CNN-sliding window model," in 2017 international conference on advances in computing, communications and informatics (icacci), 2017: IEEE, pp. 1643-1647.
  • M. Nelson, A. C. Pereira, and R. A. De Oliveira, "Stock market's price movement prediction with LSTM neural networks," in 2017 International joint conference on neural networks (IJCNN), 2017: Ieee, pp. 1419-1426.
  • B. Sezer and A. M. Ozbayoglu, "Algorithmic financial trading with deep convolutional neural networks: Time series to image conversion approach," Applied Soft Computing, vol. 70, pp. 525-538, 2018.
  • N. Bhandari, B. Rimal, N. R. Pokhrel, R. Rimal, K. R. Dahal, and R. K. Khatri, "Predicting stock market index using LSTM," Machine Learning with Applications, vol. 9, p. 100320, 2022.
  • Faghihi Nezhad and B. Minaei Bidgoli, "Development of an ensemble learning-based intelligent model for stock market forecasting," Scientia Iranica, vol. 28, no. 1, pp. 395-411, 2021.
  • Zhang, S. Cui, Y. Xu, Q. Li, and T. Li, "A novel data-driven stock price trend prediction system," Expert Systems with Applications, vol. 97, pp. 60-69, 2018..
  • Chen, "Stock Price Prediction Based on the Fusion of CNN-GRU Combined Neural Network and Attention Mechanism," in 2023 6th International Conference on Electronics Technology (ICET), 2023: IEEE, pp. 1166-1170.
  • Song and H. Choi, "Forecasting stock market indices using the recurrent neural network based hybrid models: CNN-LSTM, GRU-CNN, and ensemble models," Applied Sciences, vol. 13, no. 7, p. 4644, 2023.
  • E. Karim, M. Foysal, and S. Das, "Stock price prediction using Bi-LSTM and GRU-based hybrid deep learning approach," in Proceedings of Third Doctoral Symposium on Computational Intelligence: DoSCI 2022, 2022: Springer, pp. 701-711.
  • Zhou, C. Zhou, and X. Wang, "Stock prediction based on bidirectional gated recurrent unit with convolutional neural network and feature selection," PloS one, vol. 17, no. 2, p. e0262501, 2022.
  • Rezaei, H. Faaljou, and G. Mansourfar, "Stock price prediction using deep learning and frequency decomposition," Expert Systems with Applications, vol. 169, p. 114332, 2021.
  • Gite, H. Khatavkar, K. Kotecha, S. Srivastava, P. Maheshwari, and N. Pandey, "Explainable stock prices prediction from financial news articles using sentiment analysis," PeerJ Computer Science, vol. 7, p. e340, 2021.
  • Nayak, M. M. Pai, and R. M. Pai, "Prediction models for Indian stock market," Procedia Computer Science, vol. 89, pp. 441-449, 2016.
  • Ji, J. Yu, K. Hu, J. Xie, and X. Ji, "An adaptive feature selection schema using improved technical indicators for predicting stock price movements," Expert Systems with Applications, vol. 200, p. 116941, 2022.
  • Peng, P. H. M. Albuquerque, H. Kimura, and C. A. P. B. Saavedra, "Feature selection and deep neural networks for stock price direction forecasting using technical analysis indicators," Machine Learning with Applications, vol. 5, p. 100060, 2021.
  • Hoseinzade and S. Haratizadeh, "CNNpred: CNN-based stock market prediction using a diverse set of variables," Expert Systems with Applications, vol. 129, pp. 273-285, 2019.
  • A. Bakshi, P. R. Kolan, B. Behera, N. Kaushik, and A. M. Ismail, "Predicting Pregnant Shoppers Based on Purchase History Using Deep Convolutional Neural Networks," Journal of Advances in Information Technology Vol, vol. 9, no. 4, 2018.
  • Russakovskyet al., "Imagenet large scale visual recognition challenge," International journal of computer vision, vol. 115, pp. 211-252, 2015.
  • Chen, M. Jiang, W.-G. Zhang, and Z. Chen, "A novel graph convolutional feature based convolutional neural network for stock trend prediction," Information Sciences, vol. 556, pp. 67-94, 2021.
  • Chung, C. Gulcehre, K. Cho, and Y. Bengio, "Empirical evaluation of gated recurrent neural networks on sequence modeling," arXiv preprint arXiv:1412.3555, 2014.
  • Le, H. V. Ho, G. Lee, and S. Jung, "Application of long short-term memory (LSTM) neural network for flood forecasting," Water, vol. 11, no. 7, p. 1387, 2019.
  • Shen, Q. Tan, H. Zhang, P. Zeng, and J. Xu, "Deep learning with gated recurrent unit networks for financial sequence predictions," Procedia computer science, vol. 131, pp. 895-903, 2018.
  • Ł. Kaiser, and I. Sutskever, “Neural gpus learn algorithms,” arXiv preprint arXiv:1511.08228, 2015.
  • Yin, K. Kann, M. Yu, and H. Schütze, “Comparative study of CNN and RNN for natural language processing,” arXiv preprint arXiv:1702.01923, 2017.
  • E. Livieris, E. Pintelas, S. Stavroyiannis, and P. Pintelas, "Ensemble deep learning models for forecasting cryptocurrency time-series," Algorithms, vol. 13, no. 5, p. 121, 2020.
  • Moodi and H. Saadatfar, "An improved K‐means algorithm for big data," IET Software, vol. 16, no. 1, pp. 48-59, 2022.
  • Doğan, Ö. Metin, E. Tek, S. Yumuşak, and K. Öztoprak, "Speculator and influencer evaluation in stock market by using social media," in 2020 IEEE International Conference on Big Data (Big Data), 2020: IEEE, pp. 4559-4566.
  • Moodi, A. Jahangard-Rafsanjani, and S. Zarifzadeh, "A CNN-LSTM deep neural network with technical indicators and sentiment analysis for stock price forecastings," in 2024 20th CSI International Symposium on Artificial Intelligence and Signal Processing (AISP), 2024: IEEE, pp. 1-6.
  • Moodi, A. Jahangard-Rafsanjani, and S. Zarifzadeh, "Improving stock price prediction using technical indicators and sentiment analysis," TABRIZ JOURNAL OF ELECTRICAL ENGINEERING, 2024.
  • https://scikitlearn.org/stable/modules/generated/sklearn.preprocessing.MaxAbsScaler.html#sklearn.preprocessing.MaxAbsScaler
  • W. Granger, "Strategies for modelling nonlinear time‐series relationships," Economic Record, vol. 69, no. 3, pp. 233-238, 1993.
  • Zivot, J. Wang, E. Zivot, and J. Wang, "Rolling analysis of time series," Modeling financial time series with S-Plus®, pp. 299-346, 2003.
  • Wu, B. Green, X. Ben, and S. O'Banion, "Deep transformer models for time series forecasting: The influenza prevalence case," arXiv preprint arXiv:2001.08317, 2020.
  • Moodi, A. Jahangard-Rafsanjani, S. Zarifzadeh, “Evaluation of feature selection performance for identification of best effective technical indicators on stock market price prediction,” arXivPreprint, 2023. https://doi.org/10.48550/arXiv.2310.09903
  • Taghian, A. Asadi, and R. Safabakhsh, "A reinforcement learning based encoder-decoder framework for learning stock trading rules," arXiv preprint arXiv:2101.03867, 2021.