Loading article...
Loading article...
Stream/Area:
-
Subject:
-
Paper ID:
IJSREM63926
Volume:
10 |
5 |
May 2026
Pages:
1-11
Publication Frequency:
Monthly (12 issues per year)
License:International Journal of Scientific Research in Engineering and Management follows the Creative Commons Attribution 4.0 (CC BY 4.0) License, allowing free use and distribution with proper attribution.

Faculty of Sciences (Computer Science)
Suresh Gyan Vihar University, Jaipur, India
Department of Mechanical Engineering
Suresh Gyan Vihar University, Jaipur, India
Faculty of Sciences (Computer Science)
Suresh Gyan Vihar University, Jaipur, India
Department of Mechanical Engineering
Suresh Gyan Vihar University, Jaipur, India
— Stock market prediction using deep learning has come a long way, but one problem keeps showing up in practice: these models give a prediction without explaining why. A trader looking at a GRU output that says "buy tomorrow" has no way of knowing whether the signal came from the RSI crossing a threshold, the price breaking above the 50-day moving average, or something entirely different buried deep inside the network. This is the black-box problem, and it is the reason why many traders still prefer simple rule-based charts over sophisticated neural networks. This paper directly tackles that problem. We trained five deep learning architectures — LSTM, GRU, Bidirectional LSTM, CNN-LSTM, and Transformer — on five years of NIFTY 50 daily price data (January 2021 to December 2025), using 41 technical indicators as inputs covering trend, momentum, volatility, volume, and price-lag domains. After comparing all five models on eight performance metrics including directional accuracy and RMSE, we identified GRU as the best performer with an RMSE of 544.69 INR and a directional accuracy of 56.82%. We then applied SHAP (SHapley Additive exPlanations) using the GradientExplainer method to open the GRU's black box completely. The results showed that the 50-day Simple Moving Average is the single most important indicator, and that three indicator families — Trend (33.61%), Lag (29.24%), and Volatility (28.78%) — together account for over 91% of what drives the model's predictions. Most importantly, we generated day-specific waterfall explanations for actual BUY and SELL trading days, showing precisely which indicators pushed the prediction up or down on each day. Any trader can read these charts without needing to understand neural networks. We believe this kind of transparency is what makes AI trustworthy enough to use in real financial decisions.
KEYWORDS
This paper started with a problem that is more practical than theoretical: deep learning models for stock market prediction work reasonably well, but traders cannot verify why they make the calls they make. We set out to change that for NIFTY 50 prediction, and we think the results make a genuine contribution to that goal. We trained five deep learning architectures on five years of NIFTY 50 data using 41 technical indicators. GRU outperformed the others on every important metric — RMSE of 544.69 INR, Directional Accuracy of 56.82%, and a Composite Score of 0.623. The Diebold-Mariano test confirmed this advantage is statistically robust, not a lucky outcome. LSTM and Bi-LSTM both collapsed to predicting near the mean with zero directional skill, and Transformer and CNN-LSTM both landed below the 50% random baseline on direction. The SHAP analysis on the GRU model yielded findings that are genuinely useful for the field. The 50-day Simple Moving Average is the most important single indicator (Mean |SHAP| = 0.000835), and removing it from the model more than doubles the RMSE. Trend indicators as a group account for 33.61% of the model's decision-making, closely followed by Lag features at 29.24% and Volatility indicators at 28.78%. Momentum oscillators contributed just 4.83%, and volume-based indicators contributed only 1.17% — a finding that challenges the conventional emphasis on volume confirmation in technical analysis. Most importantly, the individual BUY and SELL day waterfall charts demonstrate that SHAP can translate a neural network's internal reasoning into a format that any technically-oriented trader can read and evaluate. On the BUY day (t=15), every major indicator aligned in the same direction. On the SELL day (t=16) that followed immediately, the same indicators lost enough of their conviction collectively to flip the directional call. Neither of those dynamics would have been visible without SHAP. They are now. For future research, we suggest three directions. First, applying the same SHAP framework to individual NIFTY 50 constituent stocks to see whether the indicator rankings change at the stock level. Second, incorporating temporal SHAP — keeping the time axis instead of averaging over it — to identify which of the 60 days in the look-back window contribute most to the prediction. Third, testing this approach in bearish and sideways market periods to see how the category attribution shifts when trend-following conditions break down. The code and configuration for this study are available from the corresponding author on request. We hope the methodology described here — clear data pipeline, reproducible evaluation, and SHAP-based transparency at global, category, and day-specific levels — is useful to researchers working on explainable AI in other financial contexts.
[1] S. Hochreiter and J. Schmidhuber, "Long short-term memory," Neural Computation, vol. 9, no. 8, pp. 1735–1780, 1997. [2] K. Cho et al., "Learning phrase representations using RNN encoder-decoder for statistical machine translation," in Proc. EMNLP, 2014, pp. 1724–1734. [3] M. Schuster and K. K. Paliwal, "Bidirectional recurrent neural networks," IEEE Trans. Signal Process., vol. 45, no. 11, pp. 2673–2681, 1997. [4] A. Vaswani et al., "Attention is all you need," in Advances in Neural Information Processing Systems, vol. 30, 2017, pp. 5998–6008. [5] S. M. Lundberg and S.-I. Lee, "A unified approach to interpreting model predictions," in Advances in Neural Information Processing Systems, vol. 30, 2017, pp. 4765–4774. [6] T. Fischer and C. Krauss, "Deep learning with long short-term memory networks for financial market predictions," European Journal of Operational Research, vol. 270, no. 2, pp. 654–669, 2018. [7] F. A. Gers, J. Schmidhuber, and F. Cummins, "Learning to forget: Continual prediction with LSTM," Neural Computation, vol. 12, no. 10, pp. 2451–2471, 2000. [8] I. Goodfellow, Y. Bengio, and A. Courville, Deep Learning. Cambridge, MA: MIT Press, 2016. [9] F. X. Diebold and R. S. Mariano, "Comparing predictive accuracy," Journal of Business and Economic Statistics, vol. 13, no. 3, pp. 253–263, 1995. [10] J. J. Murphy, Technical Analysis of the Financial Markets. New York: New York Institute of Finance, 1999.
Publication Date
5/24/2026
Peer Review Type
Double-Blind Peer Review
Review Rounds: 2
Documents
Article Views
0
Total views since publication
PDF Downloads
3
Total downloads since publication
Geographic Reach
5
Digital Preservation: This article is permanently archived on Zenodo and complies with all data preservation standards across major indexing platforms.
Plagiarism Screening
This manuscript has been checked for plagiarism using TurnitinPlagiarismChecker software.
Conflict of Interest
The authors declare no conflict of interest related to this research work.
Funding Information
No funding information available for this research.
Related research in the same subject area
Loading similar articles...