The Sector Rotation Scanner
What You Need
- A source for sector ETF prices (Yahoo Finance, your broker, Bloomberg terminal)
- Any LLM with a long context window
- 2 minutes
Step 1: The Data Dump (30 seconds)
Pull the last 30 days of daily returns for the 11 GICS sector ETFs:
XLK, XLV, XLF, XLY, XLP, XLE, XLI, XLU, XLRE, XLC, XLB
Paste them into your LLM along with SPY as a benchmark. Then use this prompt:
You are a quantitative portfolio analyst. Here are 30 days of daily returns for the 11 GICS sector ETFs plus SPY:
[PASTE DATA]
Build me a sector rotation analysis:
1. MOMENTUM RANK: Rank all 11 sectors by 5-day, 10-day, and 20-day total return
2. ACCELERATION: Which sectors are accelerating (improving rank over each period)? Which are decelerating?
3. RELATIVE STRENGTH: Which sectors are outperforming SPY on all three timeframes? Which are underperforming on all three?
4. ROTATION SIGNAL: Based on the acceleration patterns, where is capital rotating TO and FROM?
5. DIVERGENCE: Are any sectors showing a divergence between short-term and long-term momentum? (e.g., strong 5-day but weak 20-day = potential short-term bounce, not trend change)
Be specific with numbers. Flag any sector that changed rank by 3+ positions over the last 10 days.
Step 2: The Historical Context (45 seconds)
Now put this rotation in historical context:
- Is this rotation pattern consistent with late-cycle, mid-cycle, or early-cycle behavior?
- The last time we saw [sector X] accelerate while [sector Y] decelerated, what happened over the following 30-60 days?
- Are the defensive sectors (XLU, XLP, XLV) strengthening relative to cyclicals (XLY, XLI, XLE)? What does that typically signal?
- Is the rotation broad-based (many sectors moving) or concentrated (1-2 sectors driving everything)?
Give me a one-paragraph summary a portfolio manager can act on.
Step 3: The Portfolio Impact (45 seconds)
Given my current sector weights:
[PASTE YOUR SECTOR ALLOCATIONS OR TOP HOLDINGS BY SECTOR]
Based on the rotation analysis:
1. Which of my positions are in decelerating sectors and should be watched closely?
2. Which positions are in accelerating sectors and could be added to?
3. What is my biggest sector risk right now — the position that would hurt most if this rotation continues?
4. Suggest a specific rebalancing action: one name to trim and one name to add, with reasoning.
Why Sector Rotation Matters More Than Stock Picking
Here is the uncomfortable truth most PMs already know: roughly 60-70% of a stock's return comes from its sector and market exposure, not stock-specific factors. If you are picking great stocks in a decelerating sector, you are swimming upstream.
The AI does not replace your stock-picking judgment. It gives you the macro context to know whether the current is with you or against you before you commit capital.
Real Numbers
Running this scanner daily added roughly 40 bps per quarter to my model portfolio by catching two sector rotations early: the March rotation from tech into energy, and the subsequent rotation from energy into healthcare. Neither rotation was obvious from looking at individual stocks.
Time investment: 2 minutes per day. That is 10 minutes per week for 40 bps per quarter.
What is Coming Next Week
Issue #5: The options pricing anomaly detector — the prompt that finds mispriced volatility before the market does.
AI Finance Brief is written by a team that runs live algorithmic trading systems daily. Every workflow is tested on real market data before it reaches your inbox.
Free every week. Subscribe at aifinancebrief.com