$npx -y skills add SKE-Labs/agent-trading-skills --skill sector-rotationRotate between sectors based on economic and market cycles. Use when optimizing sector allocation, understanding cyclical trends, or positioning for macro shifts.
| 1 | # Sector Rotation |
| 2 | |
| 3 | Rotate sector allocation based on economic cycle phase, relative strength, and macro catalysts. |
| 4 | |
| 5 | ## Economic Cycle Sectors |
| 6 | |
| 7 | | Phase hypothesis | Economy | Sectors often evaluated | |
| 8 | | --- | --- | --- | |
| 9 | | **Early Expansion** | Recovery begins | Financials, Consumer Discretionary, Information Technology | |
| 10 | | **Mid Expansion** | Growth accelerates | Industrials, Materials, Tech | |
| 11 | | **Late Expansion** | Growth peaks | Energy, Materials, Financials | |
| 12 | | **Contraction** | Slowdown/recession | Utilities, Healthcare, Consumer Staples | |
| 13 | |
| 14 | Treat this map as an economic hypothesis, not a deterministic allocation rule. Classifications, constituents, and sensitivities change. |
| 15 | |
| 16 | **Cyclical** (economy-sensitive): Consumer Discretionary, Financials, Industrials, Materials, Energy, Information Technology |
| 17 | **Defensive** (recession-resistant): Utilities, Healthcare, Consumer Staples, Real Estate |
| 18 | |
| 19 | ## Rotation Signals |
| 20 | |
| 21 | | Signal | Indicates | |
| 22 | | --- | --- | |
| 23 | | Yield curve steepening | Early cycle -- favor cyclicals | |
| 24 | | Yield curve flattening | Late cycle -- rotate to defensives | |
| 25 | | Fed cutting rates | Early cycle starting | |
| 26 | | Fed raising rates | Late cycle | |
| 27 | | Commodities rallying | Late cycle inflation | |
| 28 | |
| 29 | ## Sector ETFs |
| 30 | |
| 31 | | Sector | ETF | |
| 32 | | --- | --- | |
| 33 | | Technology | XLK | |
| 34 | | Healthcare | XLV | |
| 35 | | Financials | XLF | |
| 36 | | Consumer Discretionary | XLY | |
| 37 | | Consumer Staples | XLP | |
| 38 | | Energy | XLE | |
| 39 | | Industrials | XLI | |
| 40 | | Utilities | XLU | |
| 41 | | Materials | XLB | |
| 42 | | Communication Services | XLC | |
| 43 | | Real Estate | XLRE | |
| 44 | |
| 45 | ## Workflow |
| 46 | |
| 47 | ### 1. Build Relative Strength Rankings |
| 48 | |
| 49 | ``` |
| 50 | get_candles(symbol=<sector_etf>, exchange=<exchange>, interval="1D", count=260) |
| 51 | get_candles(symbol="SPY", exchange=<exchange>, interval="1D", count=260) |
| 52 | ``` |
| 53 | |
| 54 | Use the current 11-sector GICS universe. Rank predeclared total-return horizons relative to the benchmark, with volatility, drawdown, liquidity, and turnover. Prevent look-ahead by using classifications and constituents known on each date; compare with equal-weight and benchmark baselines. |
| 55 | |
| 56 | ### 2. Research Macro Context |
| 57 | |
| 58 | ``` |
| 59 | get_financial_news(topic="sector rotation economic cycle <current year>", max_results=15) |
| 60 | get_economics_calendar(from_date=<start>, to_date=<end>, impact="high") |
| 61 | ``` |
| 62 | |
| 63 | Identify cycle phase, Fed policy direction, and upcoming macro catalysts that could shift rotation. |
| 64 | |
| 65 | ### 3. Detect Correlation Regime Shifts |
| 66 | |
| 67 | When normally uncorrelated sectors start moving together, a macro factor is dominating individual sector dynamics: |
| 68 | - Tech and Utilities both rising strongly = macro factor (Fed policy, liquidity) overriding sector rotation |
| 69 | - All sectors falling together = risk-off regime, defensive positioning matters less |
| 70 | - Defensive and cyclical diverging sharply = normal rotation is active, standard cycle strategy applies |
| 71 | |
| 72 | When correlation regime shifts are detected, prioritize macro analysis over traditional rotation signals. |
| 73 | |
| 74 | ### 4. Report Recommendations |
| 75 | |
| 76 | Provide the as-of date, classification universe, relative-strength/volatility table, uncertain cycle assessment, turnover/tax assumptions, and proposed weights or `no change`. Derive weights from the portfolio mandate and concentration limits rather than always selecting three winners and losers. |
| 77 | |
| 78 | ## Evidence and Validation |
| 79 | |
| 80 | - Treat the setup as a testable hypothesis, not a prediction. Define thresholds, entry, invalidation, and exit before evaluating outcomes. |
| 81 | - Calibrate on the same instrument, venue, session, and timeframe. Use closed candles and a held-out or walk-forward sample; record every variant tried. |
| 82 | - Include spread, fees, slippage, borrow or funding, partial fills, and latency. Reject the setup when net expectancy is not positive or depends on one narrow parameter. |
| 83 | - Return observed inputs, missing data, cost assumptions, entry, invalidation, exit, and a valid, watch, or no-trade status. |
| 84 | - Research basis: [Moskowitz & Grinblatt](https://onlinelibrary.wiley.com/doi/pdf/10.1111/0022-1082.00146) documented industry momentum; use the current [GICS methodology](https://www.spglobal.com/spdji/en/documents/methodologies/methodology-gics.pdf) for classification rather than assuming a fixed business-cycle map. |
| 85 | |
| 86 | ## Key Rules |
| 87 | |
| 88 | - Enforce the portfolio mandate's sector and issuer concentration limits; do not invent a universal cap. |
| 89 | - Rebalance on a fixed schedule and include turnover, spread, taxes, and tracking error. |
| 90 | - NEVER rely solely on historical cycle patterns -- confirm with current relative strength data and macro context |
| 91 | - Choose and validate the review frequency before testing. |
| 92 | - When all sectors correlate (crisis mode), standard rotation logic breaks down -- prioritize capital preservation |
| 93 | |
| 94 | ## Related Skills |
| 95 | |
| 96 | - **market-correlation-trading** -- Cross-asset corr |