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

Authors

  • Kangana Wallapure Manikrao S. G. Balekundri Institute of Technology, Visvesvaraya Technological University, India https://orcid.org/0009-0002-5306-6647
  • Shridhar Allagi KLE Institute of Technology, Visvesvaraya Technological University, India
  • Wai Yie Leong INTI International University, Malaysia https://orcid.org/0000-0002-5389-1121
  • Mahantesh Laddi Anuvartik Mirji Bharatesh Institute of Technology, Visvesvaraya Technological University, India

DOI:

https://doi.org/10.47852/bonviewJCCE52026428

Keywords:

stock market, explainable AI (XAI), SHAP, LIME, LSTM, deep learning, interpretability

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.


Metrics

Metrics Loading ...

Downloads

Published

2025-12-11

Issue

Section

Research Articles

How to Cite

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