Research Article

A Hybrid CNN-LSTM Model for Stock Price Prediction with Spatial and Temporal Dependencies

Yi Lan*
School of Mathematics, Hefei University of Technology, Hefei, China

* Corresponding author: [email protected]

Abstract

Stock price prediction is crucial in financial decision-making and investment strategies, significantly influencing investors' profitability and market stability. This paper aims to systematically review and evaluate Machine Learning (ML) and Deep Learning (DL) methodologies, primarily focusing on Long Short-Term Memory (LSTM) networks and Convolutional Neural Networks (CNNs) for stock price forecasting. A hybrid CNN-LSTM model is proposed to enhance predictive accuracy. Specifically, the CNN component initially extracts essential spatial features from historical financial data, while the LSTM network subsequently captures the temporal dependencies to produce accurate predictions of future stock prices. Additionally, the review briefly addresses other ML techniques, including Autoregressive Integrated Moving Average (ARIMA) Model and various hybrid approaches, highlighting their strengths and limitations. This study covers diverse market conditions on publicly available financial datasets. Results indicate that the hybrid CNN-LSTM model outperforms individual LSTM and CNN models, effectively capturing both rapid fluctuations and long-term price trends. Experimental results demonstrate the proposed hybrid model's superior accuracy and potential as an effective predictive tool for investors and traders in financial markets.

Keywords: Machine Learning; Deep Learning; Convolutional Neural Networks; Long Short-Term Memory
Published: May 30, 2025
DOI: 10.54254/2755-2721/2025.GL23570
Volume: ACE Vol.155
pp. 236-242
Download PDF

References

  1. Mahadik, A., Vaghela, D., & Mhaisgawali, A. (2021). Stock price prediction using lstm and arima. In Second International Conference on Electronics and Sustainable Communication Systems, 1594-1601.
  2. Illa, P. K., Parvathala, B., & Sharma, A. K. (2022). Stock price prediction methodology using random forest algorithm and support vector machine. Materials Today: Proceedings, 56, 1776-1782.
  3. ArunKumar, K. E., Kalaga, D. V., Kumar, C. M. S. (2021). Forecasting of COVID-19 using deep layer recurrent neural networks (RNNs) with gated recurrent units (GRUs) and long short-term memory (LSTM) cells. Chaos, Solitons & Fractals, 146, 110861.
  4. Kirisci, M., & Cagcag Yolcu, O. (2022). A new CNN-based model for financial time series: TAIEX and FTSE stocks forecasting. Neural Processing Letters, 54(4), 3357-3374.
  5. Sen, J., Mehtab, S. (2022). Stock price prediction using deep learning and natural language processing. Machine Learning in the Analysis and Forecasting of Financial Time Series, 1-28.
  6. Awad, A. L., Elkaffas, S. M., & Fakhr, M. W. (2023). Stock market prediction using deep reinforcement learning. Applied System Innovation, 6(6), 106.
  7. Kumar, D., Sarangi, P. K., & Verma, R. (2022). A systematic review of stock market prediction using machine learning and statistical techniques. Materials Today: Proceedings, 49, 3187-3191.
  8. Raut, K., Kasture, P., Gosavi, C. (2022). Stock market prediction using Alpha Vantage API and machine learning algorithm. International Research Journal of Engineering and Technology.
  9. Sunny, M. A. I., Maswood, M. M. S., & Alharbi, A. G. (2020). Deep learning-based stock price prediction using LSTM and bi-directional LSTM model. In 2020 2nd novel intelligent and leading emerging sciences conference, 87-92.
  10. Lu, W., Li, J., Li, Y. (2020). A CNN‐LSTM‐based model to forecast stock prices. Complexity, 2020(1), 6622927.
  11. Rezaei, H., Faaljou, H., & Mansourfar, G. (2021). Stock price prediction using deep learning and frequency decomposition. Expert Systems with Applications, 169, 114332.
  12. Hoseinzade, E., & Haratizadeh, S. (2019). CNNpred: CNN-based stock market prediction using a diverse set of variables. Expert Systems with Applications, 129, 273-285.