/india-trading-skills:market-valuationfrom india-trading-skills
Analyzes Indian market valuation and froth using NIFTY P/E, P/B, dividend-yield percentiles, earnings yield vs G-sec, market cap to GDP, and a 0-100 froth score from VIX, breadth, IPO heat, SIP/demat growth, F&O activity, and MTF leverage.
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.
market-regime says what the trend allows today. This skill says how much is already priced in and
how crowded the trade is. Rich valuations and hot behaviour lower future returns and raise the
damage when the trend breaks, but they rarely say when.
python3 scripts/valuation.py pe --csv nifty50_pe.csv # percentiles, bands, basis break
python3 scripts/valuation.py pe --csv nifty50_pe.csv --since 2021-03-31 --windows 3,5 --json
python3 scripts/valuation.py yieldgap --pe 22.4 --gsec 6.55 # one-off reading
python3 scripts/valuation.py yieldgap --csv nifty50_pe.csv --yields gsec10y.csv # + gap percentile
python3 scripts/valuation.py mcap-gdp --mcap 470 --gdp 357 --gdp-basis "FY26 provisional"
python3 scripts/valuation.py froth --inputs froth_inputs.json --as-of 2026-11-12
python3 scripts/valuation.py froth --csv nifty50_pe.csv --vix 11.5 --mtf-yoy 54 --inputs-as-of 2026-11-10
Common flags: --json (strict JSON), --as-of DATE, --date-format dmy|mdy; pe/yieldgap also take
--since, --windows 5,10, --bands 25,75,90, --index "NIFTY 50". froth takes every input as a
flag (--help lists them with units), --breadth-json (output of
../market-breadth/scripts/breadth.py status --json), --max-age-days 45 and --drop-stale. Errors
exit 2 with one error: line. Dates are never guessed: slash dates need a day above 12 somewhere in
the column, or --date-format.
Fetch current values with WebSearch/WebFetch, cite each source and date, and never invent a missing one. nseindia.com and niftyindices.com block scripts, so the user downloads those CSVs in a browser.
| Input | Source | Notes |
|---|---|---|
| P/E, P/B, div yield history | niftyindices.com → Reports → Historical Data → "P/E, P/B & Div Yield" (choose index and range) | Header Index Name, Date, P/E, P/B, Div Yield % (seen on the report page); the old NSE archive file used Date, P/E, P/B, Div Yield. Columns are matched by keyword, several files merge, and note rows are kept |
| 10-year G-sec yield | RBI DBIE, FBIL/CCIL benchmark, or an Investing.com "India 10Y" export (Date, Price, …; Price is the yield) | Percent, e.g. 6.55 |
| Market cap, GDP | BSE all-listed market cap (₹ lakh crore); MoSPI nominal GDP | Say which GDP: trailing four quarters, last fiscal year, or estimate |
| Mid/small-cap P/E | Same niftyindices report for NIFTY Midcap 150 and Smallcap 250 | Same date as the NIFTY 50 P/E |
| India VIX | NSE close | |
| IPOs | Exchange listing pages, IPO trackers | Mainboard listings in the last 3 months and their listing-day gain; SME subscription multiples |
| SIP inflow | AMFI monthly note (around the 10th) | Same month a year earlier for growth. Sep-2026 was a record ₹32,490 cr |
| New demat accounts | CDSL and NSDL monthly figures, SEBI Bulletin | Total was about 23.8 crore in Aug-2026 (press reports) |
| F&O activity | NSE Market Pulse, SEBI studies | Individual traders' premium turnover or unique-trader count, year on year |
| MTF book | NSE/BSE daily margin-trading reports; monthly CareEdge notes | NSE+BSE book was ₹1.48 lakh cr in Aug-2026 vs ₹96,000 cr a year earlier (CareEdge) |
Inputs file: JSON {"as_of": "2026-11-10", "inputs": {"vix": 11.5, "mtf_book": {"value": 148000, "as_of": "2026-10-31", "source": "NSE"}}} or CSV input,value,as_of,source. Each input gets an
as_of. Components older than --max-age-days are flagged stale (year-ago bases, 12-month averages
and annual GDP are exempt).
NSE Indices' press release of 23-Feb-2021 moved index P/E from trailing-four-quarter standalone to
consolidated earnings (standalone only where no consolidated figures exist), from 31-Mar-2021.
Consolidated profits include subsidiaries, so NIFTY's P/E dropped overnight (reported as roughly 40 to
33) with no price move; P/B and dividend yield were not part of the change. pe marks windows that
span the switch (†), takes its headline from consolidated-only history, and prints the P/E step
beside the P/B change. --since 2021-03-31 drops the old basis everywhere. Post-switch history is
about five years (one cycle): treat percentiles as provisional and lean on P/B for long comparisons.
| Group | Components (weight) | Why |
|---|---|---|
| Valuation 40 | P/E percentile 16, yield gap 8, mcap/GDP 8, mid/small-cap P/E premium over large 8 | Most objective, but slow and it can stay high for years |
| Leverage 12 | MTF book growth year on year | Borrowed money forces selling in a fall |
| Issuance 17 | Mainboard IPO rate and listing gain 10; SME subscription 7 | Supply rises to meet demand near tops |
| Retail 18 | SIP growth 6, new demat accounts 6, F&O activity 6 | New money and speculation |
| Complacency 13 | India VIX (low scores high) 8, breadth score 5 | Calm, broad rallies get crowded |
Phases: < 20 Depressed, 20–39 Normal, 40–59 Warm, 60–79 Frothy, 80+ Euphoric. Each phase maps to a
size multiplier on the market-regime allowance (1.0, 1.0, 0.8, 0.5, 0.25) and to stop, IPO and
leverage guidance. This is risk management, not a market call.
fii-dii-flows). That has kept P/E above its old averages for longer,
so "expensive" alone has been a poor reason to sell. Watch for SIP growth stalling while valuations
stay high.market-regime sets the exposure ceiling; the froth phase scales new position size within it.
Frothy plus "Uptrend under pressure" is the combination to respect most.market-breadth: feed its status --json to --breadth-json. A frothy score with narrowing
breadth means the crowd is concentrated in fewer names.fii-dii-flows: DII absorption explains how valuations stay high despite FII selling. Absorption
failing while the score is Frothy is a warning.macro-regime: rates and the G-sec yield move the yield gap. Check it before calling equities
cheap or dear relative to bonds.ipo-analysis: Frothy or Euphoric means skipping listing-gain applications and SME issues.position-sizing and trailing-stops apply the posture: smaller risk per trade, tighter trails.Valuation is a poor short-term timing tool: markets stay expensive or cheap for years. Percentiles depend on the history loaded. The froth anchors are judgement calls, not fitted values. Monthly inputs lag by four to six weeks. Comparisons across the 2021 P/E switch are unreliable.
Valuation ([index], [date], source): P/E x (pctile p over [window], band), P/B y, div yield z%
Yield gap: EY e% − G-sec g% = d pp (pctile q) | Mcap/GDP r% ([band], GDP basis)
Froth: s/100 [phase] (coverage c%, confidence) | hot: [..] | cool: [..] | posture: [size ×m, stops, IPOs]
Educational analysis, not investment advice. Data: [sources + dates].
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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.
/broker-integrationConnect Claude to Indian brokers and use them safely: official MCP servers for Groww, Zerodha
Kite, Dhan, Upstox, Fyers and Kotak Neo (endpoints, auth, read vs order capabilities as of Oct 2026),
tool discovery and capability mapping, saving candles for the analysis scripts, a mandatory
order-confirmation protocol, SEBI retail-algo/static-IP rules, and data fallbacks (yfinance, CSV).
Use when the user asks to connect or set up Groww/Zerodha/Kite/Dhan/Upstox/Fyers/Angel One, "fetch my
holdings/positions", "get live price", "place/modify/cancel an order", "set a GTT", "why was my order
rejected", or when another skill needs live data.
/event-calendarOffline calendar of the dates that move Indian markets: NSE/BSE F&O expiries (holiday-shifted),
exchange holidays, long weekends and special sessions, results-season windows (SEBI LODR),
trader tax dates, India macro releases (CPI, WPI, IIP, GDP, PMI, auto sales, GST, AMFI), RBI MPC,
Union Budget, US FOMC/CPI/jobs, NIFTY and MSCI rebalances, plus your own results, board-meeting,
ex-date and lock-in events. Every date is labelled computed, expected-by-rule, verified (with
source) or unverified. events.py exports .ics and answers "is there event risk in my holding
window?".
Use when the user asks: "what's on this week", "economic calendar India", "when is the next RBI
policy", "when is expiry", "is Monday a holiday", "events before my exit date", "any event risk
in this trade", "Fed meeting date", "when is CPI", "Budget date", "results season dates",
"advance tax due date", "export market calendar to Google Calendar", or before any multi-day trade.
/exhaustion-reversalWhen a move on NSE/BSE has run out of buyers or sellers. exhaustion.py scores a vertical run-up
0-100 (stretch above the 20/50/200 DMA, acceleration, run length, range/volume blow-off, late
gaps, upper-circuit streaks, price-band cuts), labels it extended, climax or reversal confirmed,
and plans the exit: scale out and trail with a GTT if you hold, or short only via stock futures or
puts on F&O names after a trigger, sized in lots. Also finds selling-exhaustion hammers for long
entries, judges whether a stock failed to react to news, and scans a universe with F&O tags.
Use when the user asks: "is this stock parabolic", "has the rally topped", "my stock hit upper
circuit five days running, should I sell", "how do I book profit on a multibagger", "can I short
this", "short a stock that ran up 80%", "capitulation or hammer setup", "selling exhaustion",
"results were good but the stock fell, what does it mean", or wants a blow-off top scan.
/fibonacci-tradingFibonacci retracement entry zones and extension targets for NSE/BSE stocks and indices, with
automatic swing detection (ta.py fib), trend-based extensions from the pullback point, and
confluence with moving averages, support/resistance, round numbers and option OI strikes.
Use when the user asks: "fib levels for X", "Fibonacci retracement", "where to buy the pullback",
"golden ratio / 61.8%", "Fib extension targets", "how far can NIFTY fall/rise from here", or gives
a swing high and low to compute levels.
npx claudepluginhub xdhruv/claude-trading-skills-india-mv --plugin india-trading-skills2 plugins ship this exact skill · first indexed Nov 14, 2026
Other plugins' skills for the same job