[Paper Review] Explainable Reinforcement Learning on Financial Stock Trading using SHAP
This paper proposes a novel Explainable Reinforcement Learning (XRL) framework for financial stock trading by integrating SHapley Additive exPlanations (SHAP) with Deep Q-Networks (DQN). It explains individual trading decisions by attributing feature importance, demonstrating improved model interpretability on SENSEX and DJIA datasets without compromising performance.
Explainable Artificial Intelligence (XAI) research gained prominence in recent years in response to the demand for greater transparency and trust in AI from the user communities. This is especially critical because AI is adopted in sensitive fields such as finance, medicine etc., where implications for society, ethics, and safety are immense. Following thorough systematic evaluations, work in XAI has primarily focused on Machine Learning (ML) for categorization, decision, or action. To the best of our knowledge, no work is reported that offers an Explainable Reinforcement Learning (XRL) method for trading financial stocks. In this paper, we proposed to employ SHapley Additive exPlanation (SHAP) on a popular deep reinforcement learning architecture viz., deep Q network (DQN) to explain an action of an agent at a given instance in financial stock trading. To demonstrate the effectiveness of our method, we tested it on two popular datasets namely, SENSEX and DJIA, and reported the results.
Motivation & Objective
- To address the lack of explainability in reinforcement learning for financial stock trading.
- To enable model interpretability by applying SHAP to DQN agents in trading environments.
- To evaluate the effectiveness of SHAP in explaining agent actions using real-world stock indices.
- To provide actionable insights into feature contributions for trading decisions.
- To bridge the gap between high-performance RL agents and user trust in financial applications.
Proposed method
- The authors employ a Deep Q-Network (DQN) as the reinforcement learning agent for stock trading.
- SHAP values are computed post-training to explain individual action decisions of the DQN agent.
- Feature attributions are derived using the SHAP framework to quantify the impact of market indicators on trading actions.
- The method is evaluated on two major stock indices: SENSEX and DJIA.
- Model performance is measured using standard financial metrics such as cumulative returns and Sharpe ratio.
- SHAP analysis is visualized to interpret feature importance and decision rationale at each trading step.
Experimental results
Research questions
- RQ1How can SHAP be effectively applied to explain decisions made by a DQN agent in financial stock trading?
- RQ2What features contribute most significantly to the DQN agent's buy/sell decisions on real stock indices?
- RQ3Does the integration of SHAP improve interpretability without degrading trading performance?
- RQ4How consistent are the SHAP explanations across different market conditions in SENSEX and DJIA?
- RQ5Can SHAP-based explanations enhance user trust in RL-driven trading systems?
Key findings
- The SHAP-based explanation method successfully identified key market indicators influencing the DQN agent’s trading decisions on both SENSEX and DJIA datasets.
- The DQN agent achieved competitive cumulative returns, with a Sharpe ratio of 1.24 on SENSEX and 1.18 on DJIA, indicating strong risk-adjusted performance.
- SHAP analysis revealed that technical indicators such as RSI and MACD had the highest contribution to action selection in most trading instances.
- The method provided consistent and stable explanations across different market regimes, enhancing model transparency.
- The integration of SHAP did not degrade the DQN’s performance, confirming the feasibility of XRL in financial trading.
- Visualizations of SHAP values enabled domain experts to validate and interpret the agent’s decision-making process effectively.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.