Abstract
Portfolio management (PM) is a fundamental financial trading task, which explores the optimal periodical reallocation of capitals into different stocks to pursue long-term profits. Reinforcement learning (RL) has recently shown its potential to train profitable agents for PM through interacting with financial markets. However, existing work mostly focuses on fixed stock pools, which is inconsistent with investors' practical demand. Specifically, the target stock pool of different investors varies dramatically due to their discrepancy on market states and individual investors may temporally adjust stocks they desire to trade (e.g., adding one popular stocks), which lead to customizable stock pools (CSPs). Existing RL methods require to retrain RL agents even with a tiny change of the stock pool, which leads to high computational cost and unstable performance. To tackle this challenge, we propose EarnMore, a rEinforcement leARNing framework with Maskable stOck REpresentation to handle PM with CSPs through one-shot training in a global stock pool (GSP). Specifically, we first introduce a mechanism to mask out the representation of the stocks outside the target pool. Second, we learn meaningful stock representations through a self-supervised masking and reconstruction process. Third, a re-weighting mechanism is designed to make the portfolio concentrate on favorable stocks and neglect the stocks outside the target pool. Through extensive experiments on 8 subset stock pools of the US stock market, we demonstrate that EarnMore significantly outperforms 14 state-of-the-art baselines in terms of 6 popular financial metrics with over 40% improvement on profit.
Introduction
Portfolio Management (PM) involves the dynamic reallocation of capital across various assets to maximize long-term returns. While Reinforcement Learning (RL) has demonstrated significant potential in this domain, existing models are typically constrained by a "fixed pool" limitation. They are trained on static sets of stocks, which fails to accommodate the diverse and evolving preferences of real-world investors.
In practice, investors require Customizable Stock Pools (CSPs) based on specific sectors (e.g., technology or finance) or personal risk profiles. Traditional RL agents require expensive retraining whenever the target stock pool changes. Given the astronomical number of possible stock combinations, individual training for every CSP is computationally infeasible. To address this, we propose EarnMore, a framework that enables one-shot training on a Global Stock Pool (GSP) that generalizes to any sub-pool.
Methodology
The EarnMore framework utilizes three novel components to enable flexible portfolio management without retraining.
Maskable Stock Representation
Instead of discarding stocks that are not in the user's chosen pool, the model replaces them with a learnable masked token. This keeps the input dimensions constant for the neural network, allowing a single model to process any subset of the global pool.
Self-Supervised Learning
Inspired by Masked Autoencoders (MAEs), the model is trained to reconstruct the prices of "masked" stocks based on the "unmasked" ones. This reconstruction process forces the agent to learn the hidden correlations and dependencies between all stocks in the market, ensuring that the relationships between assets are captured even if some are currently excluded from the tradeable pool.
Reinforcement Learning and Re-weighting
The framework uses the Soft Actor-Critic (SAC) algorithm to optimize trading policies. A Boltzmann-distribution-inspired re-weighting mechanism is implemented to sparsify the portfolio. This ensures the agent concentrates capital on the most favorable assets while effectively zeroing out masked stocks, thereby reducing transaction costs.
Experimental Results
The model was evaluated using daily data from the US stock market (2007–2022), specifically the S&P 500 and DJ30 indices. To simulate diverse investor preferences, eight CSPs were created based on industry sectors.
EarnMore was tested against 14 state-of-the-art baselines across six financial metrics. Key results include:
- Profitability: EarnMore achieved an Annual Rate of Return (ARR) of 97% on the S&P 500, significantly outperforming the next best baseline (DeepTrader at ~60%).
- Consistency: Across all customizable stock pools, EarnMore consistently delivered the highest returns and Sharpe Ratios.
- Market Resilience: During the 2020 market crash, EarnMore was significantly less affected than baseline models and rebounded faster, suggesting that the maskable representation helps the agent identify resilient stocks in high-volatility environments.
Conclusion
EarnMore addresses the challenge of customizable stock pools in portfolio management by leveraging maskable representations and self-supervised learning. By eliminating the need for model retraining, it provides a scalable and efficient solution for personalized investment strategies. Future work will explore enhanced risk control mechanisms and dynamic flexibility for adding new stocks to the global pool.
Summary updated