Abstract
This paper explores the integration of traditional technical analysis with modern Model-Based Reinforcement Learning (MBRL) to optimize stock trading strategies. By incorporating the Resistance Support Relative Strength (RSRS) indicator as a regularization term, the proposed framework (RSAC and RSPO) addresses the sample inefficiency and instability common in model-free RL. Testing on S&P 500 data from 2009 to 2021 demonstrates that this hybrid approach significantly outperforms market benchmarks and standard MBRL models, particularly during high-volatility periods like the COVID-19 pandemic.
Introduction
Algorithmic trading via Reinforcement Learning (RL) faces significant hurdles due to the low signal-to-noise ratio of financial markets. Model-free methods often struggle with sample inefficiency and instability, requiring vast amounts of data to learn effective policies. Model-based RL (MBRL) offers a potential solution by learning a "world model" to simulate environment dynamics, yet it remains susceptible to the chaotic nature of price movements. Huang et al. propose a novel framework that stabilizes MBRL by leveraging the Resistance Support Relative Strength (RSRS) indicator, bridging the gap between data-driven AI and established technical analysis.
Methodology
The framework utilizes MBRL architectures such as Model-Based Policy Optimization (MBPO) and Masked Model-based Actor-Critic (M2AC). These models employ ensembles of Gaussian Processes to predict state transitions—forecasting how market states (prices, indicators, and balances) evolve based on agent actions.
The key innovation is the use of the RSRS indicator as a regularization term for the Soft Actor-Critic (SAC) policy. RSRS measures the relationship between daily high and low prices via linear regression; the resulting slope ($\beta$) indicates the relative strength of buyers versus sellers. This "expert guidance" constrains the agent's actions based on market-timing signals, preventing irrational trades during clear trends. The state space includes various technical indicators to capture market momentum and trends.
Data and Experimental Setup
The study evaluates the models using daily price data for 30 liquid stocks from the S&P 500, sourced from the Yahoo Finance database. The dataset spans from January 2009 to July 2021, divided into three phases:
- Training: 2009–2016 (1,888 days)
- Validation: 2016–2018 (504 days)
- Testing: 2018–2021 (755 days)
The testing period is particularly rigorous as it encompasses the high-volatility regime of the 2020 COVID-19 market crash.
Results and Discussion
The RSRS-enhanced models, RSAC and RSPO, demonstrated superior performance across multiple metrics compared to standard MBRL and the GSPC market index. RSAC achieved an annualized return of 30.02%, nearly doubling the market benchmark's 16.75%. Risk-adjusted performance was also notably higher, with RSAC reaching a Sharpe Ratio of 1.27, compared to 0.79 for the market.
Furthermore, the models exhibited enhanced stability and lower maximum drawdowns. During the COVID-19 crisis, while the benchmark index yielded only 4.66%, the RSRS-enhanced models maintained returns between 20% and 28%. RSPO limited its maximum drawdown to -26.41%, significantly better than the -35.28% seen in standard MBPO. The inclusion of RSRS also led to faster convergence during training, as evidenced by a more rapid decline in critic loss.
Conclusion
The synergy between MBRL and technical indicators like RSRS provides a robust framework for financial decision-making. By grounding AI exploration in domain-specific wisdom, the model achieves faster convergence, higher returns, and greater resilience to market shocks. Future research will focus on establishing tighter generalization bounds and exploring the integration of multi-indicator ensembles to further refine trading performance.
Summary updated