Abstract
The integration of Artificial Intelligence (AI) in the financial domain has opened new avenues for quantitative trading, particularly through the use of Large Language Models (LLMs). However, the challenge of effectively synthesizing insights from diverse data sources and integrating both structured and unstructured data persists. This paper presents TradExpert, a novel framework that employs a mix of experts (MoE) approach, using four specialized LLMs, each analyzing distinct sources of financial data, including news articles, market data, alpha factors, and fundamental data. The insights of these expert LLMs are further synthesized by a General Expert LLM to make a final prediction or decision. With specific prompts, TradExpert can be switched between the prediction mode and the ranking mode for stock movement prediction and quantitative stock trading, respectively. In addition to existing benchmarks, we also release a large-scale financial dataset to comprehensively evaluate TradExpert's effectiveness. Our experimental results demonstrate TradExpert's superior performance across all trading scenarios.
Introduction
Financial markets are among the most informationally dense environments, where numerical data (stock prices, trading volume) and unstructured text (news, earnings calls) are inextricably linked. Traditional quantitative models, such as LSTMs or XGBoost, excel at numerical processing but struggle to "read" the news without manual feature engineering. Conversely, general-purpose Financial LLMs are often used as "jacks-of-all-trades," attempting to process all data types at once. This often leads to information overload and a failure to capture the nuances of specific data modalities, such as the difference between a technical alpha factor and the tone of an earnings call.
Presented at the ICLR 2025 Advances in Financial AI Workshop, TradExpert addresses these gaps by applying the "Mixture of Experts" (MoE) concept to LLMs. By assigning specialized LLMs to different financial data streams, the system mimics a professional trading floor to outperform both traditional models and general-purpose AI.
The TradExpert Framework
TradExpert utilizes a hierarchical MoE architecture built on the LLaMA-2-7B backbone. The workflow is divided into two main layers: specialized analysts and a general expert.
Specialized Analysts
Four distinct LLMs are fine-tuned using Low-Rank Adaptation (LoRA) to become experts in specific domains:
- News Analyst: Processes news articles using Chain-of-Thought (CoT) reasoning to predict sentiment-driven movements.
- Market Analyst: Employs a novel reprogramming mechanism to convert continuous time-series data (OHLCV) into text-prototype embeddings. This allows the LLM to apply its pre-trained linguistic reasoning to numerical patterns.
- Alpha Expert: Analyzes 108 technical indicators and mathematical expressions, such as price-volume correlations.
- Fundamental Analyst: Evaluates quarterly earnings transcripts and macro-metrics like EPS and P/E ratios to assess long-term stability.
The General Expert and Decision Modes
Acting as the "Portfolio Manager," the General Expert model takes the summarized reports from the four analysts and operates in two modes:
- Prediction Mode: A binary classification (Rise/Fall) for a specific stock.
- Ranking Mode: To handle the "non-transitive" nature of LLM preferences (where a model might prefer Stock A over B, and B over C, but then C over A), the authors implemented a relaxed comparison-based sorting algorithm. It conducts pairwise comparisons and ranks stocks based on total "win counts" to select the Top-K stocks for a portfolio.
Experimental Evaluation
The researchers evaluated TradExpert on three public benchmarks (BigData22, ACL18, CIKM18) and a new, massive proprietary dataset covering the S&P 500 from 2020 to 2023. This dataset includes over 524,000 news articles, 481,000 market records, 108 technical alpha factors, and quarterly earnings transcripts for all included companies.
Results and Discussion
TradExpert demonstrated dominant performance across all scenarios:
- Stock Prediction: On the S&P 500 dataset, TradExpert achieved an Accuracy of 0.64 and a Matthews Correlation Coefficient (MCC) of 0.19, comfortably beating GPT-4 (0.58 / 0.10).
- Trading Simulation: In a "Buy-and-Hold" strategy based on Top-K rankings for the DOW 30, TradExpert achieved an Annualized Return (AR) of 49.79% (vs. 13.92% for the DJI Index).
- Risk-Adjusted Returns: The framework achieved a Sharpe Ratio of 5.01 and a Maximum Drawdown of 6.56%, the lowest among all models, suggesting superior risk management during market dips.
Key insights from the study show that the division of labor is essential; specialized models provide more nuanced reports than a single model trying to ingest everything. For example, the Fundamental Analyst provides long-term stability, while the News and Market Analysts drive short-term profitability.
Conclusion
While TradExpert sets a new standard for financial AI, some limitations remain. The primary bottleneck is latency, with processing taking approximately 4.7 seconds per stock on an Nvidia A5000 GPU—suitable for daily trading but too slow for high-frequency environments. Additionally, context window limits require the General Expert to work with summaries rather than raw data. Future work will focus on expanding the framework to global markets and optimizing processing speed.
Summary updated