arXiv:2608.28252cs.AIAug 2026

Manuscript Offprint

arXiv:2608.28252

Regime-Aware Portfolio Management via Retrieval-Augmented LLM-Guided Expert Switching

Ahmad Asadi, Reza Safabakhsh

Abstract

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.

Keywords: Knowledge-based systems, Retrieval-augmented generation, Large language models, Expert switching, Portfolio management, Financial markets

1 Introduction

Portfolio management in financial markets, particularly within the context of high-frequency trading, presents significant challenges due to the inherent non-stationarity of real-world data, abrupt price fluctuations driven by exogenous shocks and news events, often-irrational trader behavior, and intricate interdependencies among financial instruments [Cliff and Rollins, 2020]. Conventional approaches typically assume a stationary data-generating process [Cakmak and Özekici, 2006] and stable factor relationships over time [Jacobs et al., 2005]. In contrast, modern deep learning-based frameworks seek to address these complexities by scaling model capacity through a substantial increase in parameterization. However, training such large-scale models, along with ensuring their robustness and safety under extreme or anomalous market conditions, introduces additional practical constraints that hinder deployment. An alternative formalism for capturing such nonlinear dynamics is through regime-switching representations, wherein the data-generating process is characterized by distinct latent states. Nevertheless, this paradigm introduces further methodological challenges, as it requires simultaneous learning of both the regime identities and the corresponding conditional models, thereby compounding the overall training complexity [Liu and Garrett, 2023].

Deep learning has attracted attention in financial forecasting, with a wide range of architectures; including recurrent neural networks [Sharma and Shekhawat, 2022], convolutional designs [Popa et al., 2020], temporal attention mechanisms [Asadi and Safabakhsh, 2025], and deep reinforcement learning frameworks [Taghian et al., 2022], demonstrating varying degrees of success in predicting asset returns, volatility, and directional trends [Choudhary et al., 2025]. Among these, reinforcement learning (RL) offers a particularly compelling paradigm, as it naturally formalizes portfolio optimization as a sequential decision-making process. In particular, policy gradient and actor-critic methods have proven effective in navigating the intricate trade-offs between risk and return under evolving market conditions [Wei et al., 2025, Jiang et al., 2024]. End-to-end deep learning systems are prone to overfitting the specific market regularities present in their training sets; however, they fail when confronted with unprecedented shocks or abrupt changes in volatility regimes.

To address the inherent variability of financial environments, mixture-of-experts (MoE) architectures have been proposed as a promising alternative to monolithic models [Wei et al., 2025]. In this framework, a set of specialized expert networks is maintained, each calibrated to a distinct region of the input space, thereby enabling adaptive responses to changing market conditions. In financial applications, MoE models typically employ supervised gating networks [Vats et al., 2024] or meta-learning strategies [Masoudnia and Ebrahimpour, 2014] to dynamically combine expert outputs. These approaches have been shown to enhance predictive accuracy, particularly under controlled experimental settings.

Nevertheless, a critical limitation emerges when the system encounters market regimes that were not represented during training. Under such conditions, where the test-time distribution deviates substantially from the training distribution, the gating mechanism becomes unreliable, often assigning disproportionate weights to mismatched experts. This misallocation results in significant portfolio drawdowns, undermining the robustness that MoE architectures are designed to achieve. Consequently, the effectiveness of these models remains contingent upon the representativeness of the training data, and their generalization capacity to novel or extreme regimes remains an open and pressing research question.

The growing adoption of Large Language Models (LLMs) in finance has opened new avenues for integrating structured and unstructured data, such as news and reports, into trading systems. Their chain-of-thought reasoning capabilities enable semantically informed decision-making, supporting applications like sentiment analysis, automated reporting, and strategy generation [Kong et al., 2024, Feng and Sinchai, 2025]. Recent efforts have further combined LLMs with reinforcement learning or retrieval-augmented frameworks to incorporate historical context and domain knowledge at inference time [Liu et al., 2024].

We propose a situation-based expert switching framework, in which expert selection is framed as a sequential decision problem rather than an inherent property of a single predictive model. At each decision step, the system evaluates the current market state against a repository of historical situations and assesses the historical performance of each expert under analogous conditions. To render this selection process evidence-based and risk-aware, we construct a Statement of Performance (SoP) for each expert during an offline indexing phase. Each SoP encapsulates risk-adjusted profitability across a distribution of historical market contexts. During inference, these statements serve as empirical evidence, enabling the switcher to determine not only the prevailing market regime, but also which expert has demonstrated historical effectiveness within that regime.

We formalize this selection mechanism mathematically and establish a theoretical foundation through a monotonicity property: the introduction of a new expert that outperforms the existing pool within a given sub-domain guarantees non-degradation of overall system performance. This property is of practical significance, as it permits incremental expansion of the expert pool; enabling the integration of improved specialists without retraining a monolithic model from scratch. Importantly, this result distinguishes our approach from conventional strategies that pursue generalization primarily through increases in model scale. The switching mechanism is grounded in retrieval-based reasoning. Market situations are encoded via a dual-stream Variational Autoencoder, which extracts complementary representations from two sources: asset-level technical indicators and market-wide macroeconomic features. The resulting compact embeddings facilitate similarity-based retrieval of historical episodes characterized by analogous price dynamics. The retrieved evidence, combined with the expert SoPs, is supplied to the model switcher, which estimates the most appropriate expert to activate for subsequent portfolio construction.

Collectively, the proposed framework offers an alternative paradigm for adaptive portfolio management; one that emphasizes specialization across experts rather than scaling within a single model. The system begins with a predefined set of experts, incorporates a retrieval mechanism to ground expert selection in historical precedent, and integrates risk-aware performance statements to inform decisions based on realized outcomes. As new experts become available, they can be seamlessly incorporated into the pool, with the theoretical monotonicity result ensuring that such additions do not degrade performance, while the retrieval mechanism ensures their deployment under relevant conditions. Together, these components constitute a coherent and extensible framework for portfolio management in non-stationary financial environments.

References (39)