agentleFS
SKE-LabsSKE-Labs/agent-trading-skills/skills/fundamental-analysis/sector-rotation/SKILL.md

sector-rotation

Skill17 starsChanged 4 months agoApache-2.0View on GitHub

Rotate between sectors based on economic and market cycles. Use when optimizing sector allocation, understanding cyclical trends, or positioning for macro shifts.

6 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 8

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Treat this map as an economic hypothesis, not a deterministic allocation rule.

    line 23
  2. Distinctive:

    Use the current 11-sector GICS universe.

    line 63
  3. Distinctive:

    When normally uncorrelated sectors start moving together, a macro factor is dominating individual sector dynamics:

    line 76
  4. Distinctive:

    All sectors falling together = risk-off regime, defensive positioning matters less

    line 78
  5. Distinctive:

    When correlation regime shifts are detected, prioritize macro analysis over traditional rotation signals.

    line 81
  6. Distinctive:

    Treat the setup as a testable hypothesis, not a prediction.

    line 89
  7. Distinctive:

    NEVER rely solely on historical cycle patterns -- confirm with current relative strength data and macro context

    line 99
  8. Distinctive:

    When all sectors correlate (crisis mode), standard rotation logic breaks down -- prioritize capital preservation

    line 101

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Sector Rotation

Rotate sector allocation based on economic cycle phase, relative strength, and macro catalysts.

Economic Cycle Sectors

Phase hypothesisEconomySectors often evaluated
Early ExpansionRecovery beginsFinancials, Consumer Discretionary, Information Technology
Mid ExpansionGrowth acceleratesIndustrials, Materials, Tech
Late ExpansionGrowth peaksEnergy, Materials, Financials
ContractionSlowdown/recessionUtilities, Healthcare, Consumer Staples

Treat this map as an economic hypothesis, not a deterministic allocation rule. Classifications, constituents, and sensitivities change.

Cyclical (economy-sensitive): Consumer Discretionary, Financials, Industrials, Materials, Energy, Information Technology Defensive (recession-resistant): Utilities, Healthcare, Consumer Staples, Real Estate

Rotation Signals

SignalIndicates
Yield curve steepeningEarly cycle -- favor cyclicals
Yield curve flatteningLate cycle -- rotate to defensives
Fed cutting ratesEarly cycle starting
Fed raising ratesLate cycle
Commodities rallyingLate cycle inflation

Sector ETFs

SectorETF
TechnologyXLK
HealthcareXLV
FinancialsXLF
Consumer DiscretionaryXLY
Consumer StaplesXLP
EnergyXLE
IndustrialsXLI
UtilitiesXLU
MaterialsXLB
Communication ServicesXLC
Real EstateXLRE

Workflow

1. Build Relative Strength Rankings

get_candles(symbol=<sector_etf>, exchange=<exchange>, interval="1D", count=260)
get_candles(symbol="SPY", exchange=<exchange>, interval="1D", count=260)

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.

2. Research Macro Context

get_financial_news(topic="sector rotation economic cycle <current year>", max_results=15)
get_economics_calendar(from_date=<start>, to_date=<end>, impact="high")

Identify cycle phase, Fed policy direction, and upcoming macro catalysts that could shift rotation.

3. Detect Correlation Regime Shifts

When normally uncorrelated sectors start moving together, a macro factor is dominating individual sector dynamics:

  • Tech and Utilities both rising strongly = macro factor (Fed policy, liquidity) overriding sector rotation
  • All sectors falling together = risk-off regime, defensive positioning matters less
  • Defensive and cyclical diverging sharply = normal rotation is active, standard cycle strategy applies

When correlation regime shifts are detected, prioritize macro analysis over traditional rotation signals.

4. Report Recommendations

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.

Evidence and Validation

  • Treat the setup as a testable hypothesis, not a prediction. Define thresholds, entry, invalidation, and exit before evaluating outcomes.
  • Calibrate on the same instrument, venue, session, and timeframe. Use closed candles and a held-out or walk-forward sample; record every variant tried.
  • 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.
  • Return observed inputs, missing data, cost assumptions, entry, invalidation, exit, and a valid, watch, or no-trade status.
  • Research basis: Moskowitz & Grinblatt documented industry momentum; use the current GICS methodology for classification rather than assuming a fixed business-cycle map.

Key Rules

  • Enforce the portfolio mandate's sector and issuer concentration limits; do not invent a universal cap.
  • Rebalance on a fixed schedule and include turnover, spread, taxes, and tracking error.
  • NEVER rely solely on historical cycle patterns -- confirm with current relative strength data and macro context
  • Choose and validate the review frequency before testing.
  • When all sectors correlate (crisis mode), standard rotation logic breaks down -- prioritize capital preservation

Related Skills

  • market-correlation-trading -- Cross-asset correlations reveal regime shifts
  • economic-calendar-trading -- Fed and macro data are primary rotation catalysts

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.