An Explainable AI for Stock Market Prediction: A Machine Learning Approach with XAI and Deep Neural Networks
DOI:
https://doi.org/10.47852/bonviewJCCE52026428Keywords:
stock market, explainable AI (XAI), SHAP, LIME, LSTM, deep learning, interpretabilityAbstract
Forecasting stock prices remains a complex challenge due to the inherent nonlinearity and volatility of financial markets. This study proposes a deep learning framework that integrates a long short-term memory (LSTM) network with a multiplicative attention mechanism to dynamically prioritize informative time steps in historical data. To improve robustness during training, a hybrid loss function combining mean absolute error (MAE) and mean absolute percentage error (MAPE) is employed, effectively penalizing both absolute and relative prediction errors. The framework incorporates sentiment signals and technical indicators from historical stock data to enrich the feature set. Explainable artificial intelligence (XAI) techniques, including SHAP and LIME, are integrated to ensure the global and local interpretability of the model's decisions. Experimental evaluation across 25 independent runs demonstrates that the proposed model consistently outperforms baseline approaches such as XGBoost, random forest, and conventional LSTM, achieving a low MSE of 2.45, an RMSE of 1.56, an MAE of 1.08, and an R² score of 0.88. These results validate the model's effectiveness in delivering highly accurate and interpretable stock price forecasts, thereby supporting more transparent and informed financial decision-making in real-world applications.
Received: 10 June 2025 | Revised: 30 September 2025 | Accepted: 11 October 2025
Conflicts of Interest
The authors declare that they have no conflicts of interest to this work.
Data Availability Statement
The data that support the findings of this study are openly available in Yahoo Finance at https://finance.yahoo.com/quote/AAPL/history/?utm_source=chatgpt.com&period1=1577836800&period2=1735603200.
Author Contribution Statement
Kangana Wallapure Manikrao: Conceptualization, Methodology, Software, Validation, Formal analysis, Investigation, Resources, Data curation, Writing – original draft, Writing – review & editing, Visualization. Shridhar Allagi: Validation, Resources, Writing –review & editing, Supervision, Project administration. Wai Yie Leong: Supervision, Project administration. Mahantesh Laddi: Visualization.
Metrics
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Authors

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