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.