XFinInsight-HI: A Human-in-the-Loop Explainable Artificial Intelligence Framework for Trustworthy Stock Market Prediction Using Yahoo Finance Data
Main Article Content
Abstract
Artificial Intelligence (AI) has become an important technology for stock market prediction by learning complex patterns from historical financial data. Although machine learning and deep learning models have achieved promising predictive performance, they often operate as black-box systems, limiting transparency, investor trust, and practical adoption in financial decision-making. Existing Explainable Artificial Intelligence (XAI) approaches mainly provide post-hoc explanations without incorporating expert knowledge into the prediction process. To address these limitations, this paper proposes XFinInsight-HI, a Human-in-the-Loop Explainable Artificial Intelligence framework for trustworthy stock market prediction using historical data collected from Yahoo Finance. The proposed framework performs data preprocessing and extracts technical indicators, including Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), Simple Moving Average (SMA), Exponential Moving Average (EMA), Bollinger Bands, volatility measures, and volume-based indicators to construct representative financial features. Random Forest, XGBoost, and Long Short-Term Memory (LSTM) models are developed for stock price prediction and evaluated using Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and Directional Accuracy. Experimental results show that XGBoost achieves the best predictive performance with an RMSE of 9.23 USD and an MAE of 5.86 USD on the held-out test dataset. SHAP is employed to generate both global and local explanations, demonstrating that moving average-based technical indicators contribute most significantly to stock price prediction. Furthermore, the proposed Human-in-the-Loop validation mechanism enables financial analysts to review uncertain predictions and provide corrective feedback, reducing the RMSE from 10.06 USD to 9.28 USD and the MAE from 6.18 USD to 5.60 USD on the review subset. The proposed XFinInsight-HI framework improves prediction reliability, transparency, and user trust by integrating accurate forecasting, explainable AI, and expert validation into a unified decision-support system for intelligent stock market analysis.
Article Details

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