Abstract
Reinforcement Learning (RL) in financial markets faces significant hurdles due to high training costs and the potential for catastrophic losses during exploration. Transfer learning offers a path forward by leveraging policies trained in simulation for real-world application. However, the success of this approach hinges on the similarity between the source and target environments. This paper evaluates three similarity metrics—conceptual, structural, and performance-based—to quantify market regime differences. Using the ABIDES simulator, we demonstrate that these metrics consistently identify market clusters, facilitating efficient policy transfer via PRQ-Learning and significantly reducing the "cold start" period for trading agents.
Introduction
Developing robust trading strategies using Reinforcement Learning (RL) is often hindered by two primary factors: the computational intensity of training from scratch and the financial risk associated with trial-and-error in live markets. Transfer learning addresses these issues by training agents in high-fidelity simulators before deployment. A critical challenge in this workflow is "negative transfer," where a policy learned in a dissimilar source environment degrades performance in the target market. To mitigate this, we must mathematically quantify the similarity between market scenarios to ensure appropriate knowledge transfer.
Quantifying Market Similarity
We propose three distinct perspectives for measuring similarity between Markov Decision Processes (MDPs) representing financial markets:
- Conceptual Similarity (Stylized Facts): This metric relies on established statistical properties of financial time series, such as mid-price returns and autocorrelation. It aligns with traditional human-expert analysis of market regimes.
- Structural Similarity (Restricted Boltzmann Machines): We employ Restricted Boltzmann Machines (RBMs) to model the underlying structure of "experience tuples" (state, action, reward, next state) in a source market. The reconstruction error (Mean Squared Error) when processing target market data serves as a proxy for structural similarity.
- Performance Similarity ($\pi$-reuse): This measures the "reuse gain," or the improvement in learning efficiency when a previously learned policy is integrated into the learning process of a new task.
To implement these transfers, we utilize PRQ-Learning, an algorithm that maintains a library of source policies and uses a softmax strategy to dynamically select the most beneficial policy for the current environment.
Experimental Setup
Experiments were conducted using ABIDES (Agent-Based Interactive Discrete Event Simulator). We defined seven distinct market scenarios by varying the composition of background agents, including Exchange, Zero Intelligence, Momentum, and Noise agents. A Q-Learner agent was then tasked with learning an optimal strategy across these varied regimes.
Key Results and Discussion
A central finding across all three metrics was the identifying role of "Momentum" agents. Scenarios containing momentum agents formed a distinct cluster, fundamentally differing from those without them.
As shown in the structural similarity heatmap (Figure 4), the RBM-based analysis clearly identifies two primary clusters: {S1, S5, S6} and {S2, S3, S4, S7}. This "machine-centric" clustering perfectly matches the results from the "human-centric" stylized facts analysis, providing strong validation for using neural networks to detect market regimes.
Furthermore, the application of PRQ-Learning demonstrated a significant performance "jump-start." By reusing policies from similar source environments, the agent achieved higher initial rewards compared to standard Q-Learning.
As illustrated in Figure 6, PRQ-Learning in Scenario 1 (reusing policies from S5 and S6) results in a much steeper learning curve in early episodes. By approximately episode 50, the algorithm successfully identifies the most relevant policies, automating the transfer process and reducing the risk of early-stage financial losses.
Conclusion and Future Work
This research demonstrates that both statistical and neural-network-based metrics can effectively quantify market similarity for transfer learning. While these "Sim-to-Sim" results are promising, future work must address the "reality gap" by testing against historical market data. Additionally, exploring more diverse agent types and dynamic, non-stationary market regimes will be essential for deploying these strategies in real-world financial environments.
Summary updated