Deep learning-based stock market forecasting: A comparative analysis of ANN, CNN, and LSTM

  • 20 Views
  • 7 Downloads

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License

Type of the article:

Abstract
The changing economy, macroeconomic factors, political decisions, and investor sentiment contribute to the dynamic nature of any financial market. Conventional econometric models are constrained by linear assumptions and rigid structures. This study aims to comparatively evaluate the predictive performance of selected deep learning models for forecasting stock index movements in the Indian equity market using multiple evaluation metrics, including Mean Absolute Percentage Error (MAPE), Root Mean Square Error (RMSE), and Directional Accuracy (DA). NSE index daily closing values from January 2017 to June 2025 are analyzed using Convolutional Neural Networks (CNN), Artificial Neural Networks (ANN), and Long Short-Term Memory (LSTM) networks. The findings reveal significant disparities in forecasting precision among the models. The CNN model achieves the lowest error, with a Mean Absolute Percentage Error (MAPE) of 0.63, followed by LSTM at 0.72, while ANN records a higher error of 0.89. When benchmarked against ARIMA and Random Walk models, which exhibit substantially higher errors (MAPE: 1.21 and 1.47), the findings indicate improved predictive capability beyond trend-following behavior. Statistical validation using the Diebold–Mariano test confirms that deep learning models significantly outperform benchmark approaches (p < 0.05). Confidence interval analysis indicates that CNN and LSTM provide stable predictions. These results suggest that CNN models are particularly effective in capturing short-term market dynamics, whereas LSTM models perform better in modeling temporal dependencies. Overall, deep learning approaches demonstrate superior capability in handling the nonlinear characteristics of financial time series compared to conventional econometric models.

Acknowledgment / Funding Statement
The authors acknowledge Kingdom University, Bahrain, for funding article processing charges through research grant number KU-SRU-BA-01.

view full abstract hide full abstract
    • Figure 1. NSE Index closing values
    • Figure 2. Simple moving average and closing prices
    • Figure 3. Correlation heatmap
    • Figure 4. Volatility and close values of NSE
    • Figure 5. Actual and predicted NSE data using the CNN Model
    • Figure 6. Actual and predicted NSE data using the ANN model
    • Figure 7. Actual and predicted NSE data using an LSTM model
    • Table 1. Model architecture and training configuration
    • Table 2. Comparative result table
    • Table 3. Diebold–Mariano test results (pairwise forecast accuracy comparison)
    • Table 4. Actual and predicted values using the three models
    • Conceptualization
      Charithra C. M., Vinish P.
    • Data curation
      Charithra C. M., Prakash Pinto
    • Investigation
      Charithra C. M., Iqbal Thonse Hawaldar , Prakash Pinto
    • Methodology
      Charithra C. M., Iqbal Thonse Hawaldar , Vinish P.
    • Software
      Charithra C. M., Vinish P., Prakash Pinto
    • Writing – original draft
      Charithra C. M., Vinish P., Prakash Pinto
    • Funding acquisition
      Iqbal Thonse Hawaldar
    • Project administration
      Iqbal Thonse Hawaldar , Chetan Shetty
    • Supervision
      Iqbal Thonse Hawaldar , Vinish P., Prakash Pinto, Chetan Shetty
    • Validation
      Iqbal Thonse Hawaldar , Chetan Shetty
    • Visualization
      Iqbal Thonse Hawaldar , Prakash Pinto, Chetan Shetty
    • Writing – review & editing
      Iqbal Thonse Hawaldar , Vinish P., Prakash Pinto, Chetan Shetty
    • Formal Analysis
      Vinish P., Prakash Pinto, Chetan Shetty
    • Resources
      Vinish P., Prakash Pinto, Chetan Shetty