Логотип Sector Rotation

Sector Rotation

Спільнота
Shubhamkumartrichy
sector-rotation

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
Назва навичкиsector-rotation
Зірки
57
Форки
11
Файли в пакеті
1
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 1

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: Shubhamkumartrichy. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Sector Rotation у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/Shubhamkumartrichy/claude-trading-skills-india/tree/main/skills/sector-rotation
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Shubhamkumartrichy/claude-trading-skills-india.git /tmp/claude-trading-skills-india
mkdir -p .claude/skills
cp -r /tmp/claude-trading-skills-india/skills/sector-rotation .claude/skills/sector-rotation
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Sector Rotation в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Sector Rotation, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Sector Rotation не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

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-31). History available: ^NSEI, ^NSEBANK, ^CNXIT, ^CNXAUTO, ^CNXPHARMA, ^CNXFMCG, ^CNXMETAL, ^CNXREALTY, ^CNXENERGY, ^CNXPSUBANK, ^CNXINFRA, ^CNXPSE, ^CNXCONSUM, ^CNXMNC, NIFTY_FIN_SERVICE.NS, NIFTYMIDCAP150.NS, NIFTYSMLCAP250.NS. Quote only, no history: NIFTY MEDIA, PRIVATE BANK, HEALTHCARE, OIL & GAS, CPSE, INDIA DEFENCE, CAPITAL MARKETS, MIDCAP 100 and SMALLCAP 100. Supply these as CSVs. Run universe for the full map.

2. What it measures

MetricDefinition
Returns1W/1M/3M/6M/12M = 5/21/63/126/252 sessions; rel = (1+sector)/(1+NIFTY) − 1
RS line100 × sector ÷ NIFTY, sampled at each week's last close
RS-Ratio100 × EMA3(RS) ÷ SMA10 of that EMA. Above 100 = relative trend above its 10-week norm
RS-Momentum100 × RS-Ratio now ÷ RS-Ratio 4 weeks ago. Above 100 = relative trend improving
QuadrantLeading (≥100/≥100) → Weakening (≥100/<100) → Lagging (<100/<100) → Improving (<100/≥100)
TrendUptrend, Downtrend, Recovering (above a falling 50 DMA), Pullback (below a rising one), Mixed
Rank(RS-Ratio − 100) + (RS-Momentum − 100)

Both axes are percentages and are not volatility-scaled, so REALTY and PSU BANK swing wider than FMCG. Compare quadrant, direction and weeks in quadrant, not raw distance. Rotation usually runs clockwise. A diagonal jump (Leading straight to Lagging) is a whipsaw near the centre. That was about 9% of quadrant changes on 10 years of NSE data; wait a second week before trusting it.

Reading it: Improving with a rising RS-Ratio is the early long watch-list. Leading plus an Uptrend is where breakouts follow through. Weakening means tighten trails and stop adding. Lagging plus a Downtrend is a short or avoid list. A sector that is only Improving but still below its 200 DMA is a bounce until its price trend confirms.

3. Rotation read (India)

  • Cyclical / domestic beta: METAL, REALTY, PSU BANK, AUTO, INFRA. Their earnings ride credit growth, government capex, commodity prices and rate cuts.
  • Defensive: IT, PHARMA, HEALTHCARE, FMCG. IT and pharma are dollar earners that gain when the rupee weakens, and they often hold up when FIIs sell India. FMCG has steady staples demand. IT is defensive only versus the Indian cycle: it still tracks US tech spending.
  • Kept out of the tilt: BANK, FIN SERVICE and PVT BANK. These heavyweights are about a third of NIFTY and largely are the benchmark. ENERGY and OIL & GAS track crude. PSE, CPSE, DEFENCE, CAPITAL MARKETS, CONSUMPTION, MNC and MEDIA are reported as themes.
  • Tilt: cyclicals' average RS-Ratio minus the defensives'. Above +0.5, with the 3M relative return agreeing, the read is risk-on. Below −0.5 it is defensive. Anything else is mixed.
  • Size factor: MIDCAP 150/SMALLCAP 250 vs NIFTY. Both outperforming means broadening, which is healthy retail and DII risk appetite. Both lagging means narrowing into large caps, which often precedes or accompanies corrections. Smallcaps rolling over first is an early warning.
DriverSectors to checkTypical read
FII flows (NSDL fortnightly data)BANK, FIN SERVICE, ITFII buying lifts private banks first; persistent selling drags them while DII-held mid/small caps hold up
Rupee (USD/INR)IT, PHARMA vs importersWeak rupee helps exporters' margins and hurts OMCs and capital-goods importers
Crude (Brent)OIL & GAS, ENERGY, paints, tyres, aviationFalling crude helps OMCs (BPCL, HPCL, IOC), paints and tyres; rising crude helps upstream (ONGC, Oil India)
Monsoon and rural demand (IMD, Jun–Sep)FMCG, AUTO (tractors, 2-wheelers)A good monsoon helps rural volumes; watch the Sep–Nov festive season
Union Budget (1 Feb) and capexPSE, CPSE, INFRA, DEFENCE, PSU BANKCapex or divestment themes run into the Budget and can fade after it
RBI rate cycle (MPC)BANK, REALTY, AUTO, NBFCs (FIN SERVICE)Cuts help realty, auto and NBFCs; banks' margins can compress early in a cutting cycle
Global metals and ChinaMETALLME prices, China stimulus and steel safeguard duties

4. Breadth inside a sector

breadth reports the percentage of members above their 50 and 200 DMA. --members takes a CSV of sector,symbol, and --csv-dir holds one CSV per stock. Create the stock CSVs with ../technical-analysis/scripts/ta.py fetch --symbol TCS --out stocks/TCS.csv. Membership comes from the index factsheet on niftyindices.com. An index Leading on fewer than 50% of members above their 50 DMA is being carried by one or two heavyweights, so its leadership is narrow.

5. How other skills use this

  • market-pulse: fill the "Sectors" line with Leading/Improving vs Lagging, the tilt and the size read from rotation, instead of ranking 1-week returns by hand. Suggested wording there: "Sectors: run sector-rotation; quote quadrant leaders, tilt and size factor".
  • india-market-analyst: at the Context stage, look up the stock's sector quadrant. Prefer longs in Leading or Improving sectors that are in an Uptrend. Flag a long in a Lagging, Downtrend sector as swimming against the tide. Then hand off to technical-analysis for the stock (and multi-timeframe-analysis on the sector index itself).

Caveats

  • NSE reconstitutes sector indices semi-annually and changes weights through capping. Very long RS histories mix different baskets. Concentrated indices (NIFTY IT, BANK, METAL) can turn on one stock.
  • Yahoo has gaps and late bars for some indices. The script warns when an index ends more than 3 days before NIFTY, or when the data is stale. Prefer niftyindices.com CSVs for anything you act on.
  • A mid-week run treats the partial week as the latest weekly point. Re-check after Friday's close.
  • Price indices exclude dividends, so high-yield PSE and energy look slightly weaker than their total return. Relative strength is not absolute: a Leading sector in a falling market can still lose money.

Output

Sector rotation vs NIFTY 50: data to [date] ([source])
Leading: .. | Improving: .. | Weakening: .. | Lagging: ..
Tilt: [Risk-on/Defensive/Mixed]: [spread] | Size: [Broadening/Narrowing/Mixed]
Key changes ([N] weeks): [sector from→to (week)]
Watch-list: [Improving + rising RS-Ratio] | Avoid: [Lagging + Downtrend]
Drivers to verify: [FII flows / USD-INR / crude / RBI / Budget, with sources]

Educational analysis, not investment advice. Data: [sources + timestamps].

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Sector Rotation?

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 defe...

Навіщо використовувати Sector Rotation у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Sector Rotation — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Sector Rotation у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/Shubhamkumartrichy/claude-trading-skills-india/tree/main/skills/sector-rotation. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Sector Rotation?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Sector Rotation?

Зі скількома забажаєте. У TypingMind ви можете використовувати Sector Rotation із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Sector Rotation?

Так. На GitHub цю навичку публікує Shubhamkumartrichy за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі
Логотип openclaw

Openclaw Test Performance

openclaw
ОрганізаціяПопулярне

Вимірюйте продуктивність, діагностуйте й оптимізуйте час виконання тестів і наборів плагінів OpenClaw, вузькі місця імпорту, CPU/RSS, зростання heap і повільні шляхи покриття тестами.

82.2K
391K
Файлів: 1
Відкрити
Логотип openclaw

Openclaw Testing

openclaw
ОрганізаціяПопулярне

Добирайте пропорційні за обсягом тести й перевірки OpenClaw, діагностуйте помилки та передавайте завдання, чутливі до середовища, або підтвердження для релізу відповідальним особам.

82.2K
391K
Файлів: 2
Відкрити
Логотип openclaw

Release Openclaw Ci

openclaw
ОрганізаціяПопулярне

Запускайте, відстежуйте, налагоджуйте та підсумовуйте повний CI для релізів OpenClaw, перевірки релізів, контрольні перевірки робочих провайдерів, підтвердження встановлення й оновлення та попередні перевірки секретів для релізу.

82.2K
391K
Файлів: 3
Відкрити
Логотип openclaw

Release Openclaw Mac

openclaw
ОрганізаціяПопулярне

Виконуйте підписування релізів OpenClaw для macOS, нотаризацію, оновлення appcast і просування ресурсів або відновлюйте ці процеси.

82.2K
391K
Інструкції
Відкрити

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇