# Sector Analyst

Should be used when analyzing sector rotation patterns and market cycle positioning.

- Repository: https://github.com/tradermonty/claude-trading-skills (3536 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add tradermonty/claude-trading-skills --skill sector-analyst -g -a claude-code -y`
Codex: `npx skills add tradermonty/claude-trading-skills --skill sector-analyst -g -a codex -y`
Cursor: `npx skills add tradermonty/claude-trading-skills --skill sector-analyst -g -a cursor -y`
Gemini CLI: `npx skills add tradermonty/claude-trading-skills --skill sector-analyst -g -a gemini-cli -y`

## Description

This skill should be used when analyzing sector rotation patterns and market cycle positioning. It fetches sector uptrend data from CSV (no API key required) and optionally accepts chart images for supplementary analysis. Use this skill when the user requests sector rotation analysis, cyclical vs defensive assessment, overbought/oversold identification, or market cycle phase estimation. All analysis and output are conducted in English.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Sector Analyst

## Overview

This skill enables comprehensive analysis of sector rotation and market cycle positioning by fetching uptrend ratio data from TraderMonty's public CSV dataset. It ranks sectors, calculates cyclical vs defensive risk regime scores, identifies overbought/oversold conditions, and estimates the current market cycle phase. Chart images can optionally supplement the data-driven analysis with industry-level detail.

## When to Use This Skill

Use this skill when:
- User requests sector rotation analysis (no chart images required)
- User asks about cyclical vs defensive positioning
- User wants to know which sectors are overbought or oversold
- User requests market cycle phase estimation
- User provides sector performance charts for supplementary analysis
- User asks for sector-based scenario analysis or predictions

Example user requests:
- "Run a sector rotation analysis"
- "Which sectors are leading, cyclical or defensive?"
- "Are any sectors overbought right now?"
- "What phase of the market cycle are we in?"
- "Analyze these sector performance charts and tell me where we are in the market cycle"

## Prerequisites

- **Python 3.9+**; no third-party libraries required (CSV fetched via stdlib `urllib`)
- **No API keys required**, data is fetched from a public GitHub repository
- **Optional**: Sector performance chart images for supplementary analysis

## Data Source

Sector uptrend ratios are fetched from TraderMonty's public GitHub repository (no API key required):
- **Sector Summary**: `sector_summary.csv`, uptrend ratio, trend, slope, and status per sector
- **Freshness Check**: `uptrend_ratio_timeseries.csv`, max(date) used to verify data recency

## Running the Script

```bash
# Default: fetch CSV, print human-readable analysis
python3 scripts/analyze_sector_rotation.py

# JSON output
python3 scripts/analyze_sector_rotation.py --json

# Save to file
python3 scripts/analyze_sector_rotation.py --save --output-dir reports/
```

The rest: https://github.com/tradermonty/claude-trading-skills/blob/HEAD/skills/sector-analyst/SKILL.md
