An Explainable AI for Stock Market Prediction: A Machine Learning Approach with XAI and Deep Neural Networks

  • Wallapure Manikrao K
  • Allagi S
  • Leong W
  • et al.
2Citations
Citations of this article
22Readers
Mendeley users who have this article in their library.

Abstract

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.

Cite

CITATION STYLE

APA

Wallapure Manikrao, K., Allagi, S., Leong, W. Y., & Laddi, M. (2025). An Explainable AI for Stock Market Prediction: A Machine Learning Approach with XAI and Deep Neural Networks. Journal of Computational and Cognitive Engineering. https://doi.org/10.47852/bonviewjcce52026428

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free