Generate a sector rotation heatmap and analysis. Triggers when the user says "sector heatmap", "sector rotation", "where's the money flowing", "sector analysis", "which sectors are leading", or "sector breakdown". Produces a text-based heatmap of all 11 S&P sectors with rotation interpretation and implied macro signal.
Search for today's performance of all 11 SPDR sector ETFs: XLK, XLF, XLV, XLE, XLI, XLY, XLP, XLU, XLRE, XLB, XLC
Also collect:
For each sector, classify:
Using the sector performance matrix, identify the rotation pattern:
Risk-On signals (cyclicals leading, defensives lagging):
Risk-Off signals (defensives leading, cyclicals lagging):
Rates-Driven signals:
Stagflation signal:
## 🌡️ Sector Heatmap — [DATE]
SPY: $XXX (±X%) | VIX: XX
| Sector | ETF | Today | 1-Week | 1-Month | Signal |
|--------|-----|-------|--------|---------|--------|
| Technology | XLK | 🟢/🟡/🔴 +X% | ↑/→/↓ | ↑/→/↓ | [1-word] |
| Financials | XLF | | | | |
| Healthcare | XLV | | | | |
| Energy | XLE | | | | |
| Industrials | XLI | | | | |
| Cons. Disc. | XLY | | | | |
| Cons. Stap. | XLP | | | | |
| Utilities | XLU | | | | |
| Real Estate | XLRE | | | | |
| Materials | XLB | | | | |
| Comm. Svcs | XLC | | | | |
**Rotation Pattern**: [Risk-On / Risk-Off / Rates-Driven / Stagflation / Mixed]
**Money is flowing INTO**: [Top 2-3 sectors]
**Money is flowing OUT OF**: [Bottom 2-3 sectors]
**Macro Implication**: [2-3 sentences on what this rotation tells us about the market's macro read]
**Most Interesting Divergence**: [Any sector behaving unexpectedly vs. the overall tone — and why]
**For your watchlist**: [How this rotation affects specific names or ETFs the user holds]
| Economic Phase | Leading Sectors | Lagging Sectors |
|---|---|---|
| Early cycle (recovery) | XLF, XLY, XLI | XLU, XLP |
| Mid cycle (expansion) | XLK, XLI, XLE | XLRE, XLU |
| Late cycle (slowing) | XLE, XLV, XLP | XLK, XLY |
| Recession | XLU, XLP, XLV | XLF, XLY, XLK |
| Rates rising | XLF, XLE | XLRE, XLU, XLK |
| Rates falling | XLRE, XLU, XLK | XLF, XLE |