The List / Trading, Investment, and Portfolio Management / paper
Leveraging Large Language Models for Top-Down Sector Allocation
Abstract
This paper introduces a methodology leveraging Large Language Models (LLMs) for sector-level portfolio allocation through systematic analysis of macroeconomic conditions and market sentiment. Our framework emphasizes top-down sector allocation by processing multiple data streams simultaneously, including policy documents, economic indicators, and sentiment patterns. Empirical results demonstrate superior risk-adjusted returns compared to traditional cross momentum strategies, achieving a Sharpe ratio of 2.51 and portfolio return of 8.79% versus -0.61 and -1.39% respectively. These results suggest that LLM-based systematic macro analysis presents a viable approach for enhancing automated portfolio allocation decisions at the sector level.
In one sentence
Summary
This paper addresses the gap in LLM applications for top-down investment strategies, specifically sector allocation, by proposing a multi-agent architecture that synthesizes macroeconomic data and market sentiment. While existing research focuses on bottom-up security selection, this work leverages LLMs to interpret complex macro-financial relationships and adjust sector weights dynamically based on economic cycles and sentiment shifts. The framework aims to automate the extraction of systematic macro signals and their integration into portfolio construction, offering a more responsive approach to sector-level risk and opportunity identification than traditional static models. The methodology employs a dual-stream agentic pipeline using DeepSeek-7B for sentiment analysis and Llama-3.3-70B for ranking. The Sentiment Agent performs Named Entity Recognition and Aspect-Based Sentiment Analysis (ABSA) on news articles, storing results in a memory module. The Macro Agent processes economic indicators (CPI, PPI, PCE, NFP, PMI) and FOMC minutes, calculating trends and summarizing policy stances. A Ranking Agent integrates these memories with current portfolio positions to generate stock rankings across 11 GICS sectors. The system was backtested on S&P 500 constituents from January to June 2019, using Alpha Vantage data and NewsAPI, with a $100M initial capital and realistic transaction costs. Empirical results show the proposed sector-allocation strategy significantly outperformed a cross-momentum baseline, yielding an 8.79% return and a Sharpe ratio of 2.51 versus -1.39% and -0.61, respectively. The study highlights the viability of LLMs for systematic macro analysis but notes limitations including a short backtesting period constrained by computational costs and the potential for improved performance with larger models or additional fundamental data. The authors suggest future work could incorporate reinforcement learning for ranking or counterfactual explanations for regulatory compliance.
Research problem
The paper addresses the lack of LLM-based methodologies for top-down sector allocation, contrasting with the prevalent focus on bottom-up stock selection. It seeks to determine how LLMs can integrate macroeconomic analysis with market sentiment to enhance automated portfolio construction. The core challenge is processing heterogeneous data streams (policy documents, economic indicators, news) to dynamically adjust sector weights in response to changing economic conditions.
Core contributions
- A novel agentic framework for top-down sector allocation using LLMs to synthesize macro and sentiment data.
- Implementation of a dual-stream pipeline with specialized agents for sentiment (DeepSeek-7B) and macro analysis.
- Application of Aspect-Based Sentiment Analysis (ABSA) to extract granular stock-level sentiment from news.
- Empirical validation showing superior risk-adjusted returns compared to traditional cross-momentum strategies.
- Demonstration of temporal filtering mechanisms to prevent look-ahead bias in backtesting.
Method
- Sentiment Agent: DeepSeek-7B-Chat for NER and ABSA on news articles.
- Macro Agent: Calculates MoM changes for CPI, PPI, PCE, NFP, PMI; summarizes FOMC minutes.
- Memory Modules: Persistent storage for historical sentiment and macro trends.
- Ranking Agent: Llama-3.3-70B-Instruct for hierarchical sector allocation and stock ranking.
- Decision Agent: Llama-3.2-3B converts rankings to JSON trading signals.
- Portfolio Agent: Manages execution with 90% capital utilization cap.
- Temporal Filtering: Ensures only information available at trading time is used.
- Prompt Engineering: Structured prompts for JSON output and aspect-specific sentiment.
Results & findings
- Sector-Allocation Strategy Return: 8.79%.
- Sector-Allocation Strategy Sharpe Ratio: 2.51.
- Cross-Momentum Baseline Return: -1.39%.
- Cross-Momentum Baseline Sharpe Ratio: -0.61.
- The LLM framework effectively captured sector-level opportunities driven by macro trends.
- Risk-adjusted performance was significantly superior to the momentum baseline.
- The approach demonstrated viability for automated sector-level portfolio construction.
- Sentiment-aspect pairs allowed for nuanced stock selection within preferred sectors.
Data & experiments
- Backtesting period: January 2019 to June 2019 due to computational constraints.
- Universe: S&P 500 constituents, dynamically updated to reflect index changes.
- Data sources: Alpha Vantage (market data), BLS/BEA (macro indicators), NewsAPI (300,000 articles).
- Baseline: Cross-sectional momentum strategy using similar sentiment/macro inputs but without sector allocation.
- Metrics: Portfolio percentage change and Sharpe ratio.
- Costs: 10 bps commission and 10 bps market impact per trade.
Limitations & caveats
- Backtesting period is short (6 months) due to computational costs.
- Limited to S&P 500 large-cap stocks, potentially lacking generalizability to small caps.
- Performance may vary with different LLM sizes; larger models might improve ABSA accuracy.
- Does not incorporate company fundamental data (e.g., earnings reports) in the current version.
- Sentiment analysis relies on news articles, which may have varying quality and bias.
- No out-of-sample testing beyond the 2019 window is reported.
Curator notes
Complements bottom-up stock selection papers.