← ClaudeAtlas

sector-rotationlisted

Sector rotation across NSE sectoral and thematic indices (BANK, IT, AUTO, PHARMA, FMCG, METAL, REALTY, ENERGY, PSU BANK, FIN SERVICE, INFRA, PSE, CONSUMPTION and more) against NIFTY 50: 1W–12M returns, relative strength, an RRG-style RS-Ratio/RS-Momentum quadrant with recent quadrant changes, distance from 50/200 DMA, cyclical-vs-defensive tilt, the midcap/smallcap size factor, and member breadth. sectors.py works offline from niftyindices.com CSVs or via yfinance. Use when the user asks: "which sectors are leading", "sector rotation", "where is money moving", "is the market risk-on or defensive", "are midcaps and smallcaps outperforming", "RRG for NSE sectors", "which sector should I focus on", "is IT/PSU bank/metal turning", or wants sector context before picking stocks.
Shubhamkumartrichy/claude-trading-skills-india · ★ 62 · Data & Documents · score 84
Install: claude install-skill Shubhamkumartrichy/claude-trading-skills-india
# Sector Rotation (NSE) Find where relative strength is building and where it is fading, then fish for setups in the strongest groups. This is a context filter: it tells you which pond, not which fish or when. ## 1. Run it ```bash python3 scripts/sectors.py rotation # Yahoo (pip install yfinance), default universe python3 scripts/sectors.py rotation --csv-dir nse_idx/ # offline: one CSV per index + "NIFTY 50.csv" python3 scripts/sectors.py rrg --sectors IT,BANK,METAL,PSUBANK --tail 10 # weekly trail, for plotting python3 scripts/sectors.py breadth --members members.csv --csv-dir stocks/ python3 scripts/sectors.py universe # tickers and Yahoo coverage ``` `--json` gives raw output. Options: `--weeks 8` (quadrant-change look-back), `--smooth 3 --window 10 --momentum 4` (RRG settings, weeks), `--period 2y`, `--ticker NAME=TICKER` / `--map file.json` to override or add tickers (`--ticker NIFTY=^CRSLDX` benchmarks against NIFTY 500). **Offline CSVs:** download each index from niftyindices.com (Historical Data, price index). Name each file after the index ("NIFTY IT.csv", "NIFTY PSU BANK.csv"); names are matched to keys automatically. Only a date and a close column are needed. Open/High/Low, "Shares Traded" and "Turnover" are ignored, and no volume is required. Dates like `30 Oct 2026`, `30-Oct-2026` or ISO all parse. Daily data is best; weekly closes also work (DMAs become 10/40-week averages). **Yahoo coverage (probed 2026-10-