Financial markets are inherently non-stationary, making the effectiveness of individual portfolio-management strategies highly dependent on changing market conditions. This work proposes a retrieval-augmented expert-switching framework that dynamically selects portfolio management experts based on their historical performance under similar market situations. A dual-stream variational autoencoder represents asset-level and market-wide information, while a retrieval-based knowledge base stores historical situations and expert performance. During inference, an instruction-tuned LLM reasons over the retrieved evidence to identify the most appropriate expert rather than directly generating portfolio actions. We further establish a monotonicity property showing that adding a locally superior expert cannot degrade the switching mechanism's performance. Experiments across cryptocurrency, stock, and foreign-exchange markets show that the proposed selector achieves the highest cumulative return and Sharpe ratio among the evaluated selection strategies in all three markets. In the stock market, for example, cumulative return increases from 26% for the best fixed expert to 34%, while the Sharpe ratio improves from 0.74 to 0.96. Ablation results confirm the importance of both retrieval and LLM reasoning, while experiments with different expert-pool sizes demonstrate the value of complementary expertise. Overall, the findings support retrieval-grounded expert switching as an effective approach to adaptive portfolio management in non-stationary financial environments.
Figures & tables
Figure 1: Overall architecture of the proposed retrieval-augmented adaptive portfolio management framework. The lower pipeline constructs the historical index by encoding market states and evaluating expert performance. The upper pipeline retrieves comparable historical states, combines their performance records with contextual information, and selects the expert used for portfolio allocation.
Condition
Mathematical requirement
Operational constraint
Axiom 1
sups∣ρi−Ui∣≤ϵ
Restrict quantitative assessments to the empirical range of retrieved return and drawdown observations. Missing regimes are handled using historical baseline statistics.
Axiom 2
τ≥2ϵ
Require a candidate expert to exceed the incumbent by a margin larger than the estimated uncertainty before recommending a switch.
Axiom 3
δ>τ+2ϵ
Evaluate specialist performance in extreme conditions.
Table 1: Mapping of the switching assumptions to LLM evaluation constraints.
Market
Symbol
Range
Samples
Crypto
VET_USD
2018-08-03-2026-05-31
2859
Crypto
BCH_USD
2017-11-09-2026-05-31
3126
Crypto
ETC_USD
2017-11-09-2026-05-31
3126
Crypto
UNI_USD
2019-10-21-2025-04-17
2006
Crypto
SHIB_USD
2020-08-01-2026-05-31
2089
Crypto
LTC_USD
2014-09-17-2026-05-31
4275
Table 2: Crypto market data summary.
Market
Symbol
Range
Samples
Stock
TMO
2000-01-03-2026-05-29
6641
Stock
MCD
2000-01-03-2026-05-29
6641
Stock
NVDA
2000-01-03-2026-05-29
6641
Stock
DIS
2000-01-03-2026-05-29
6641
Stock
TSLA
2010-06-29-2026-05-29
4004
Stock
CVX
2000-01-03-2026-05-29
6641
Table 3: Stock market data summary.
Market
Symbol
Range
Samples
Forex
USDCAD
2003-09-17-2026-05-29
5904
Forex
EURAUD
2003-12-01-2026-05-29
5853
Forex
EURCHF
2003-01-23-2026-05-29
6059
Forex
GBPCHF
2003-10-01-2026-05-29
5894
Forex
CHFJPY
2003-12-01-2026-05-29
5854
Forex
NZDCHF
2003-12-01-2026-05-29
5825
Table 4: Foreign-exchange market data summary.
Figure 2: Daily OHLC price histories for the 30 cryptocurrency symbols used in the experiments.
Figure 3: Daily OHLC price histories for the 30 stock symbols used in the experiments.
Figure 4: Daily OHLC price histories for the 30 foreign-exchange symbols used in the experiments.
Figure 5: Market-level cryptocurrency indices.
Figure 6: Market-level United States equity reference indices for the stock-market experiments.
Market
Expert
Cum. Return
Sharpe
Sortino
MDD
Weeks Dominant
Crypto
A2C
63.00 %
1.61
2.44
-25 %
19 (34.5%)
Crypto
DDPG
71.26 %
1.74
2.73
-26 %
06 (10.9%)
Crypto
PPO
60.49 %
1.57
2.38
-27 %
03 (05.5%)
Crypto
CrossQ
53.66 %
1.44
2.24
-28 %
09 (16.4%)
Crypto
TQC
76.16 %
1.71
2.63
-29 %
18 (32.7%)
Stock
A2C
32.16 %
0.90
1.35
-23 %
17 (19.3%)
Table 5: Standalone performance of the five expert models in each market.
Figure 7: Illustrative expert-selection frequencies for the proposed switcher in the three markets.
Market
Method
Cum. Return
Ann. Return
Ann. Vol.
Sharpe
Sortino
MDD
Crypto
Best Fixed
68 %
62 %
0.32
1.64
2.54
-27 %
Crypto
Recent Gating
69 %
62 %
0.32
1.66
2.57
-27 %
Crypto
Proposed RAG
71 %
64 %
0.31
1.73
2.72
-26 %
Stock
Best Fixed
26 %
14 %
0.21
0.74
1.11
-26 %
Stock
Recent Gating
33 %
17 %
0.20
0.91
1.37
-24 %
Stock
Proposed RAG
34 %
18 %
0.19
0.96
1.45
-26 %
Table 6: Effect of expert-selection strategy in each market.
Market
# Experts
Fixed Sharpe
RAG Sharpe
Δ Sharpe (%)
Fixed Sortino
Crypto
1
0.81
0.81
0.0
1.11
Crypto
2
0.84
0.85
1.2
1.16
Crypto
3
0.89
0.98
10.1
1.22
Crypto
4
0.96
1.15
19.8
1.34
Stock
1
0.43
0.43
0.0
0.58
Stock
2
0.51
0.52
2.0
0.68
Table 7: Effect of expert-pool size on the proposed switcher. Fixed Sharpe values are consistent with the reported RAG Sharpe values and percentage improvements.
Market
Configuration
Cum. Return
Sharpe
MDD
Crypto
NR (No Retrieval)
+64.8%
1.622
-26.7%
Crypto
R − LLM (No LLM)
+69.1%
1.661
-27.1%
Crypto
Full (R+L+U)
71 %
1.73
-26 %
Stock
NR (No Retrieval)
+33.1%
0.911
-24.4 %
Stock
R − LLM (No LLM)
+25.5%
0.735
-26.5%
Stock
Full (R+L+U)
34 %
0.96
-26 %
Table 8: Component ablation across the three markets.
Model
Success
Failure
Google/Gemma4-E4B
28%
72%
Google/Gemma4-31B-it
96%
4%
AliBaba/Qwen3.6-27B-it
100%
0%
Table 9: Success and failure rates for each indexing LLM.
Market
Inference LLM
Cum. Return
Ann. Return
Ann. Vol.
Sharpe
Sortino
MDD
Crypto
Google/Gemma4-31B-it
68.3 %
61.7 %
0.32
1.65
2.55
-27 %
Crypto
Google/Gemma4-E4B
63.5 %
57.4 %
0.32
1.57
2.42
- 28 %
Crypto
AliBaba/Qwen3.6-27B-it
71 %
64 %
0.31
1.73
2.72
-26 %
Stock
Google/Gemma4-31B-it
25.1 %
13.7 %
0.21
0.73
1.09
-26.5 %
Stock
Google/Gemma4-E4B
24.5 %
13.5 %
0.21
0.71
1.06
-27 %
Stock
AliBaba/Qwen3.6-27B-it
34 %
18 %
0.19
0.96
1.45
-26 %
Table 10: Sensitivity to the LLM used for inference.
Market
Method
Cum. Return
Ann. Return
Ann. Vol.
Sharpe
MDD
Crypto
TAC [ Asadi and Safabakhsh, 2025 ]
24 %
21.6 %
0.94
1.29
-31 %
Crypto
AlphaMixRL [ Sun, 2024 ]
22 %
19.8 %
1.00
1.38
-29 %
Crypto
LLM-MAS [ Luo et al., 2025 ]
33 %
30 %
0.96
1.50
-28 %
Crypto
Proposed
71 %
64 %
0.31
1.73
-26 %
Stock
TAC [ Asadi and Safabakhsh, 2025 ]
10.4 %
5.6 %
0.25
0.74
-28 %
Stock
AlphaMixRL [ Sun, 2024 ]
11.8 %
6.3 %
0.31
0.82
-27 %
Table 11: Comparison with representative state-of-the-art methods in each market.
Adaptive model routing selects models or specialized experts per input to balance prediction quality, computational cost, latency, and resource constraints.
Large language models (LLMs) have shown strong potential for financial analysis and trading, but direct trading remains challenging because the predictive capabilities required can vary across assets, decision fields, and market conditions. Existing LLM-based trading systems either coordinate human-defined external experts or adopt conventional internal Mixture-of-Experts (MoE) routers that do not directly evaluate how individual experts contribute to trading decisions. Moreover, these routers receive no direct signal indicating when an inactive expert has become more suitable as market conditions change. We find that native router scores poorly reflect how much individual experts improve trading decisions, frequently leaving better alternatives unselected. We further reveal that token-specific expert usefulness exhibits a compact low-dimensional structure. Based on these findings, we propose TradingMoE, a trading-oriented sparse MoE that augments a frozen dense LLM with lightweight residual experts. We introduce a Query-Key router that represents the expertise required by each token under the current market context as a low-dimensional query and matches it with learnable expert keys. We further propose a sparse expert selection update mechanism that samples a few inactive experts during training and estimates whether they should replace the weakest expert in the current Top-k route. This mechanism enables the router to update expert selection as market conditions change while preserving sparse computation. Experiments against 22 baselines on stock and cryptocurrency markets show that TradingMoE improves cumulative return over the best-performing baselines by 30.89% and 30.7%, respectively. Rolling paper-trading experiments further demonstrate that its advantage persists under forward-only deployment.
Chang Zhou, Xingtong Yu, Minbin Huang +4
University of Science and Technology of China · The Chinese University of Hong Kong · The University of Tokyo +1
Financial markets are inherently non-stationary, exhibiting frequent regime shifts and structural changes that render traditional Portfolio Management (PM) approaches ineffective. Existing remedies, such as rolling-window retraining and naive online fine-tuning, are hindered by high computational costs and insufficient knowledge utilization, respectively, resulting in low returns and limited adaptability. Continual learning (CL) offers a promising paradigm by enabling trading agents to accumulate and transfer knowledge across sequential tasks. In this paper, we propose Regime-aware Continual Adaptive Portfolio management (ReCAP), a novel framework that integrates CL into PM to address the challenges of dynamic financial environments. ReCAP employs an adaptive regime detection module to segment historical market data into variable-length regimes, enabling regime-specific learning of policy vectors and the construction of a policy library. During continual trading, a regime-gate module adaptively combines policy vectors from the library based on the current market state, facilitating rapid adaptation to newly detected regimes. Only the regime-gate and the current regime's policy vector are continually updated to preserve useful knowledge effectively. Extensive experiments on five real-world datasets demonstrate that ReCAP consistently outperforms popular baselines, achieving superior returns in long-term investment horizons and rapid adaptation to regime shifts.
Chaofan Pan, Lingfei Ren, Linbo Xiong +3
Southwestern University of Finance and Economics · Shanxi University
Large language models (LLMs) have shown strong performance across diverse financial tasks, yet portfolio management (PM) remains poorly evaluated. Existing benchmarks exhibit two gaps: they are often equity-only and ignore cross-asset correlations; they provide limited insight into where errors arise and how they affect subsequent decisions. We introduce PortBench, a benchmark with market data spanning six asset classes from 2015 to 2025. PortBench comprises a static QA dataset of 6,269 questions across seven task templates and a dynamic five-stage portfolio evaluation. Dynamic evaluation uses a class-level correlation score for allocation and CEPS to summarize reference-based stage scores. We further evaluate under three stress windows and three risk profiles, and support real-time evaluation on newly arriving market data. Evaluating ten LLMs reveals a disconnect: high financial QA scores do not ensure consistent portfolio outperformance. LLMs concentrate exposure in correlated assets, and their portfolios achieve higher Sharpe than equal weighting in 54.2% of 120 evaluations across four market periods. Our source code is available at this https URL.
Yuxuan Zhao, Sijia Chen, Ningxin Su
Yantai Research Institute of Harbin Engineering University · The Hong Kong University of Science and Technology (Guangzhou)