FinRL-DeepSeek: LLM-Infused Risk-Sensitive Reinforcement Learning for Trading Agents
FinRL-DeepSeek: LLM-Infused Risk-Sensitive Reinforcement Learning for Trading Agents
This paper introduces FinRL-DeepSeek, a novel hybrid reinforcement learning (RL) and large language model (LLM) trading agent that integrates financial news insights for both action selection and risk management. The authors extend the Conditional Value-at-Risk Proximal Policy Optimization (CVaR-PPO) algorithm by incorporating LLM-generated stock recommendation scores and risk assessment scores from the FNSPID financial news dataset. The LLM scores are used to perturb RL actions (via recommendation scores) and adjust trajectory returns (via risk scores) in a risk-sensitive manner. The approach is backtested on the Nasdaq-100 index using three LLMs: DeepSeek V3, Qwen 2.5, and Llama 3.3.
Key results show that LLM infusion can improve performance in specific market conditions. In bull markets, standard PPO tends to outperform, while in bear markets, the LLM-infused CVaR-PPO (CPPO-DeepSeek) achieves better cumulative returns and risk metrics. The impact of LLM infusion strength is non-monotonic: for PPO, stronger infusion degrades performance, whereas for CPPO, stronger infusion improves performance. The paper also highlights the importance of training duration and memory optimization for scalability. Overall, the work demonstrates the potential of combining LLM-based feature extraction from news with risk-sensitive RL for algorithmic trading, though results are mixed and sensitive to market regimes and infusion parameters.
Highlights
- 1First application of CVaR-PPO to stock trading with LLM-based risk assessment.
- 2Novel hybrid RL-LLM agent integrating both LLM stock recommendations and risk scores from financial news.
- 3Demonstrates that LLM infusion improves CPPO performance in bear markets while PPO excels in bull markets.
- 4Comprehensive backtesting on Nasdaq-100 using FNSPID dataset with multiple LLMs (DeepSeek V3, Qwen 2.5, Llama 3.3).
Methods
- MConditional Value-at-Risk Proximal Policy Optimization (CVaR-PPO) for risk-sensitive trading.
- MLLM-based stock recommendation and risk assessment prompts to generate scores from financial news.
- MLLM infusion mechanism: perturbing PPO actions via recommendation scores and adjusting CVaR-PPO trajectory returns via risk scores.
- MBacktesting framework with early stopping and varying LLM infusion strengths (0.1% to 10%).
Results
- RLLM-infused CPPO outperforms PPO and Nasdaq-100 benchmark in bear markets (post-2021), while PPO performs better in bull markets.
- RStronger LLM infusion (10%) degrades PPO performance but improves CPPO performance.
- RDeepSeek V3 slightly outperforms Llama 3.3 in cumulative returns when used with PPO.
- RLonger training periods (6 years vs 3 years) significantly improve PPO and CPPO performance.
- RLLM infusion consistently worsens PPO performance in some test settings, but improves CPPO in others.
Analyze Paper
Generate insights from "FinRL-DeepSeek: LLM-Infused Risk-Sensitive Reinforcement Lea...".