/india-trading-skills:macro-regimefrom india-trading-skills
Determines the structural macro regime for Indian equities (6-24 month horizon) from cross-asset lines including NIFTY breadth, smallcap leadership, yield curve, USD/INR, Brent, and India VIX. Outputs regime labels like Broadening, Narrow, Inflationary squeeze, Easing, Risk-off, or Transitional with evidence and allocation tilts.
Ships in india-trading-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Not the same as market-regime. That skill reads NIFTY's daily tape (distribution days,
follow-through) over a horizon of weeks and sets the exposure ceiling. This one works on month-end
data over 6–24 months. It asks which kind of market India is in (who leads, and whether crude, the
rupee and rates are helping or hurting) and changes only a few times per cycle. Use it for the
quarterly allocation tilt, then let the faster skills time entries inside it.
python3 scripts/macro.py series # file names, tickers, sources
python3 scripts/macro.py status --csv-dir macro_data/ # label, evidence, table, tilts
python3 scripts/macro.py status --csv-dir yields/ --fetch --json # CSVs for yields, Yahoo for the rest
python3 scripts/macro.py history --csv-dir macro_data/ --months 36
python3 scripts/macro.py component curve --csv-dir macro_data/ # one gauge month by month
Flags: --as-of YYYY-MM[-DD] (replay), --closed-months (drop the month in progress), --fast 6,
--slow 12, --recent 3 (turn window), --band-pct 0.25 / --band-bp 5 (dead band),
--ticker KEY=TICKER, --period 10y, --json (strict JSON). Loader helpers are shared with
../technical-analysis/scripts/ta.py. Errors print one error: line and exit 2.
A date column plus a close/price/yield column is enough. Daily, weekly or monthly rows all work
(the last value of each month is used). Null rows are skipped. Investing.com exports (MM/DD/YYYY,
"Price" column) are detected from the whole file. Name each file after the series key or label
(series lists the aliases).
| Key | Series | Yahoo | Status | Where else |
|---|---|---|---|---|
| NIFTY, BANK | NIFTY 50, NIFTY Bank | ^NSEI, ^NSEBANK | confirmed | niftyindices.com historical data |
| SMALLCAP, MIDCAP | Smallcap 250, Midcap 150 | NIFTYSMLCAP250.NS, NIFTYMIDCAP150.NS | confirmed | niftyindices.com |
| EQUALWEIGHT | NIFTY50 Equal Weight | — | csv-only | niftyindices.com strategy indices |
| FMCG, PHARMA / METAL, REALTY, PSUBANK | defensive / cyclical baskets | ^CNXFMCG ... ^CNXPSUBANK | confirmed | niftyindices.com |
| GOLD | GOLDBEES (gold in ₹) | GOLDBEES.NS | unconfirmed | broker history, MCX or IBJA prices |
| IN10Y | India 10-year G-sec yield | — | csv-only | RBI DBIE, CCIL/FBIL, Investing.com export |
| SHORT | 91-day T-bill or repo rate | — | csv-only | RBI DBIE, FBIL; a repo file needs only change dates |
| USDINR | USD/INR | INR=X (or USDINR=X) | unconfirmed | RBI/FBIL reference rate |
| BRENT | Brent crude | BZ=F | unconfirmed | EIA, Investing.com |
| US10Y | US 10-year | ^TNX | unconfirmed | FRED DGS10 |
| VIX | India VIX | ^INDIAVIX | unconfirmed | nseindia.com historical VIX |
"Confirmed" means daily history was served in this pack's 2026-10-31 Yahoo probe (shared with
sector-rotation). "Unconfirmed" tickers are the usual symbols, but Yahoo rate-limited (HTTP 429)
the 2026-11-12 check, so they were not verified. Use --ticker or a CSV if one fails. G-sec yields
are not on Yahoo. --fetch (or no --csv-dir) needs pip install yfinance.
| Label | Rule | Tends to favour / hurt (tendencies, not predictions) |
|---|---|---|
| Inflationary squeeze | ≥2 of Brent, USD/INR, 10y rising, none falling | IT and pharma exporters, upstream oil, gold, short debt / OMCs, paints, aviation, NBFCs, realty |
| Risk-off / contraction | ≥3 equity ratios falling incl. NIFTY/gold (cyc/def if no gold); 2 if VIX ≥22 | FMCG, pharma, gold, cash / smallcaps, PSU banks, metals, leverage |
| Broadening risk-on | concentration/size rising, none falling, ≥60% of equity ratios rising | mid/small caps, capex, PSU banks, metals / defensives, gold weight |
| Narrow / concentrated | breadth pair falling, none rising | heavyweights, large-cap quality / small-cap breakouts |
| Easing tailwind | 10y falling + a backer (steepening curve, crude down, US yields down, firmer rupee); not crude and rupee both up | banks, NBFCs, realty, autos, gilt duration |
| Transitional / mixed | none of the above | balance; use the faster skills |
The squeeze ranks first because crude feeds India's current account, the rupee and CPI together, and that combination has repeatedly kept RBI tight. "What would change the label" flips one gauge at a time and lists the flips that alter the headline, nearest crossover first.
fii-dii-flows). It helps IT and
pharma earnings but raises imported inflation.market-regime (13/17/22/30). The trend matters more here.macro-regime (quarters) → market-regime (weeks, exposure ceiling) → market-breadth and
sector-rotation (which stocks and sectors) → fii-dii-flows (who is buying). Use the label to set
the tilt and the faster skills to time it. When the two regimes disagree (squeeze here, confirmed
uptrend there), size down rather than pick one. Feed the tilts into portfolio-review.
Regime: [label] | coverage m/10 ([grade]) | month [YYYY-MM] (data to [date])
For/against: [legs] | Transition: N of M turned in the last 3 months | table | tilts | would change
Educational analysis, not investment advice. Data: [files/tickers + month-end dates].
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
macro-regime, indian-equities, cross-asset, allocation-tilt, nifty, yield-curve
npx claudepluginhub xdhruv/claude-trading-skills-india-mv --plugin india-trading-skills2 plugins ship this exact skill · first indexed Nov 14, 2026
36 skills in this plugin
/backtest-labBacktests rule-based swing ideas on NSE/BSE daily bars with Indian frictions built in: decide on
the close and fill at the next open, gap-through stops, slippage, exact per-trade charges by
segment and broker (STT, stamp duty, GST, DP), whole shares or lots, circuit-band no-fills,
futures-only shorts and an optional STCG/LTCG estimate. Six built-in strategies; CAGR vs
buy-and-hold, drawdown, Sharpe/Sortino, profit factor, expectancy in ₹ and R; parameter sweeps
with a plateau-or-spike read, walk-forward and Monte Carlo. backtest.py, stdlib only, offline.
Use when the user asks: "backtest this strategy", "would a 20/50 crossover have worked on X",
"is this edge real or curve-fit", "optimise my parameters", "walk-forward test", "Monte Carlo my
trades", "what drawdown should I expect", "do charges kill this idea", "does a NIFTY 200-DMA
filter help", or before putting real money behind any mechanical rule.
/breakout-plannerStage-2 breakout setups on NSE/BSE stocks: a trend-template check (rising 200 DMA, 50>150>200
stack, distance from 52-week high/low, relative strength vs NIFTY), base detection (volatility
contraction with successively tighter pullbacks, or a flat base) with pivot, depth, duration,
volume dry-up and a grade, then an order-ready plan: trigger, chase limit, capped stop, size,
Indian charges, R targets, GTT/SL templates, circuit-band and NSE tick-size checks. breakout.py
scans a folder of CSVs or yfinance symbols and ranks them, offline-capable.
Use when the user asks: "is X in a Stage 2 uptrend", "find VCP setups", "where is the pivot on X",
"plan a breakout trade in X", "breakout buy point and stop", "scan these stocks for breakouts",
"Minervini trend template for NSE stocks", "how do I place a GTT for a breakout", or any question
about buying stocks as they clear a base.
Other plugins' skills for the same job