Deep learning-based stock market forecasting: A comparative analysis of ANN, CNN, and LSTM
-
DOIhttp://dx.doi.org/10.21511/imfi.23(2).2026.17
-
Article InfoVolume 23 2026, Issue #2, pp. 219-234
- 20 Views
-
7 Downloads
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.
- Keywords
-
JEL Classification (Paper profile tab)C22, C45, C53, G15
-
References54
-
Tables4
-
Figures7
-
- 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
-
- Atsalakis, G. S., & Valavanis, K. P. (2009). Forecasting stock market short-term trends using a neuro-fuzzy based methodology. Expert Systems with Applications, 36(7), 10696-10707.
- Bao, W., Cao, Y., Yang, Y., Che, H., Huang, J., & Wen, S. (2025). Data-driven stock forecasting models based on neural networks: A review. Information Fusion, 113, 102616.
- Bao, W., Yue, J., & Rao, Y. (2017). A deep learning framework for financial time series using stacked autoencoders and long-short term memory. PLOS ONE, 12(7), e0180944.
- Barua, M., Kumar, T., Raj, K., & Roy, A. M. (2024). Comparative Analysis of Deep Learning Models for Stock Price Prediction in the Indian Market. FinTech, 3(4), 551-568.
- Bollerslev, T. (1986). Generalized autoregressive conditional heteroskedasticity. Journal of Econometrics, 31(3), 307-327.
- Box, G. E. P., & Jenkins, G. M. (1976). Time Series Analysis: Forecasting and Control. Holden-Day & S. Francisco (Eds) (2nd ed.).
- C M, C., Sharma, M., & Vikas, B. (2024). Relationship Between The Volume Of Trade And Volatility Spillover Between The Selected Developed And Emerging Asian Markets. Educational Administration Theory and Practices.
- Chai, T., & Draxler, R. R. (2014). Root mean square error (RMSE) or mean absolute error (MAE)? – Arguments against avoiding RMSE in the literature. Geoscientific Model Development, 7(3), 1247-1250.
- Chatfield, C. (2000). Time-Series Forecasting. Chapman and Hall/CRC.
- de Myttenaere, A., Golden, B., Le Grand, B., & Rossi, F. (2016). Mean Absolute Percentage Error for regression models. Neurocomputing, 192, 38-48.
- Engle, R. F. (1982). Autoregressive Conditional Heteroscedasticity with Estimates of the Variance of United Kingdom Inflation. Econometrica, 50(4), 987.
- Engle, R., & Mezrich, J. (1996). GARCH FOR GROUPS – A round-up of recent developments in GARCH techniques for estimating correlation. Risk: Managing Risk in the World’s Financial Markets, 9(8), 36-40.
- FAMA, E. F. (1991). Efficient Capital Markets: II. The Journal of Finance, 46(5), 1575-1617.
- Fischer, T., & Krauss, C. (2018). Deep learning with long short-term memory networks for financial market predictions. European Journal of Operational Research, 270(2), 654-669.
- Giantsidi, S., & Tarantola, C. (2025). Deep learning for financial forecasting: A review of recent trends. International Review of Economics & Finance, 104, 104719.
- Heaton, J. (2018). Ian Goodfellow, Yoshua Bengio, and Aaron Courville: Deep learning. Genetic Programming and Evolvable Machines, 19(1-2), 305-307.
- Hochreiter, S., & Schmidhuber, J. (1997a). Long Short-Term Memory. Neural Computation, 9(8), 1735-1780.
- Hochreiter, S., & Schmidhuber, J. (1997b). Long Short-Term Memory. Neural Computation, 9(8), 1735-1780.
- Huang, W., Nakamori, Y., & Wang, S.-Y. (2005). Forecasting stock market movement direction with support vector machine. Computers & Operations Research, 32(10), 2513-2522.
- Hyndman, R. J., & Koehler, A. B. (2006). Another look at measures of forecast accuracy. International Journal of Forecasting, 22(4), 679-688.
- Kara, Y., Acar Boyacioglu, M., & Baykan, Ö. K. (2011). Predicting direction of stock price index movement using artificial neural networks and support vector machines: The sample of the Istanbul Stock Exchange. Expert Systems with Applications, 38(5), 5311-5319.
- Kim, H. Y., & Won, C. H. (2018). Forecasting the volatility of stock price index: A hybrid model integrating LSTM with multiple GARCH-type models. Expert Systems with Applications, 103, 25-37.
- Kim, K. (2003). Financial time series forecasting using support vector machines. Neurocomputing, 55(1-2), 307-319.
- Kim, S., & Kim, H. (2016). A new metric of absolute percentage error for intermittent demand forecasts. International Journal of Forecasting, 32(3), 669-679.
- Kim, T., & Kim, H. Y. (2019). Forecasting stock prices with a feature fusion LSTM-CNN model using different representations of the same data. PLOS ONE, 14(2), e0212320.
- Kumar Meher, B., Thonse Hawaldar, I., Spulbar, C., & Birau, R. (2021). Forecasting stock market prices using mixed ARIMA model: a case study of Indian pharmaceutical companies. Investment Management and Financial Innovations, 18(1), 42-54.
- Kumaria, A., Rajkar, A., Raut, A., & Nair, R. S. (2023). Forecasting the Indian Financial Markets with LSTM and Price Indicators (pp. 395-403).
- Leung, Y., Mei, C.-L., & Zhang, W.-X. (2000). Statistical Tests for Spatial Nonstationarity Based on the Geographically Weighted Regression Model. Environment and Planning A: Economy and Space, 32(1), 9-32.
- Li, Y., & Ma, W. (2010). Applications of Artificial Neural Networks in Financial Economics: A Survey. 2010 International Symposium on Computational Intelligence and Design, 211-214.
- Lo, A. W. (2004). The Adaptive Markets Hypothesis. The Journal of Portfolio Management, 30(5), 15-29.
- Makridakis, S., Spiliotis, E., & Assimakopoulos, V. (2018). Statistical and Machine Learning forecasting methods: Concerns and ways forward. PLOS ONE, 13(3), e0194889.
- Mienye, I. D., & Swart, T. G. (2024). A Comprehensive Review of Deep Learning: Architectures, Recent Advances, and Applications. Information, 15(12), 755.
- Moosa, I., & Burns, K. (2016). The random walk as a forecasting benchmark: drift or no drift? Applied Economics, 48(43), 4131-4142.
- Nelson, D. B. (1991). Conditional Heteroskedasticity in Asset Returns: A New Approach. Econometrica, 59(2), 347.
- Nelson, D. M. Q., Pereira, A. C. M., & de Oliveira, R. A. (2017). Stock market’s price movement prediction with LSTM neural networks. 2017 International Joint Conference on Neural Networks (IJCNN), 1419-1426.
- Patel, J., Shah, S., Thakkar, P., & Kotecha, K. (2015). Predicting stock and stock price index movement using Trend Deterministic Data Preparation and machine learning techniques. Expert Systems with Applications, 42(1), 259-268.
- Pesaran, M. H., & Timmermann, A. (1992). A Simple Nonparametric Test of Predictive Performance. Journal of Business & Economic Statistics, 10(4), 461.
- Poon, S.-H., & Granger, C. W. J. (2003). Forecasting Volatility in Financial Markets: A Review. Journal of Economic Literature, 41(2), 478-539.
- Semenoglou, A.-A., Spiliotis, E., & Assimakopoulos, V. (2023). Image-based time series forecasting: A deep convolutional neural network approach. Neural Networks, 157, 39-53.
- Sezer, O. B., Gudelek, M. U., & Ozbayoglu, A. M. (2020). Financial time series forecasting with deep learning: A systematic literature review: 2005–2019. Applied Soft Computing, 90, 106181.
- Shiller, R. J. (2003). From Efficient Markets Theory to Behavioral Finance. Journal of Economic Perspectives, 17(1), 83-104.
- Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., & Salakhutdinov, R. (2014). Dropout: A Simple Way to Prevent Neural Networks from Overfitting. Journal of Machine Learning Research, 15(56), 1929-1958.
- Thanh Noi, P., & Kappas, M. (2017). Comparison of Random Forest, k-Nearest Neighbor, and Support Vector Machine Classifiers for Land Cover Classification Using Sentinel-2 Imagery. Sensors, 18(1), 18.
- Tsantekidis, A., Passalis, N., Tefas, A., Kanniainen, J., Gabbouj, M., & Iosifidis, A. (2017). Using deep learning to detect price change indications in financial markets. 2017 25th European Signal Processing Conference (EUSIPCO), 2511-2515.
- Tsay, R. S. (2010). Analysis of Financial Time Series. Wiley.
- Vamossy, D. F. (2021). Investor emotions and earnings announcements. Journal of Behavioral and Experimental Finance, 30, 100474.
- Vasenska, I. (2025). Comparative Analysis of Machine Learning and Deep Learning Models for Tourism Demand Forecasting with Economic Indicators. FinTech, 4(3), 46.
- Vivas, E., Allende-Cid, H., & Salas, R. (2020). A Systematic Review of Statistical and Machine Learning Methods for Electrical Power Forecasting with Reported MAPE Score. Entropy, 22(12), 1412.
- World Bank Group. (2023, June). Global Economic Prospects.
- Yang, J., Zhang, L., Chen, C., Li, Y., Li, R., Wang, G., Jiang, S., & Zeng, Z. (2020). A hierarchical deep convolutional neural network and gated recurrent unit framework for structural damage detection. Information Sciences, 540, 117-130.
- Zhang, G. P. (2003). Time series forecasting using a hybrid ARIMA and neural network model. Neurocomputing, 50, 159-175.
- Zhang, G., Eddy Patuwo, B., & Y. Hu, M. (1998). Forecasting with artificial neural networks: International Journal of Forecasting, 14(1), 35-62.
- Zhang, M.-L., & Zhou, Z.-H. (2007). ML-KNN: A lazy learning approach to multi-label learning. Pattern Recognition, 40(7), 2038-2048.
- Zhang, X., Liang, X., Zhiyuli, A., Zhang, S., Xu, R., & Wu, B. (2019). AT-LSTM: An Attention-based LSTM Model for Financial Time Series Prediction. IOP Conference Series: Materials Science and Engineering, 569(5), 052037.


