К основному содержанию
скилл CX Codex

market-valuation — скилл для Claude Code: оценка рынка и установка

Скилл market-valuation для Claude Code оценивает дороговизну и перегрев индийского рынка по индексам NSE и другим рыночным данным. Включается на запросы о переоценённости NIFTY, IPO или пузыре в малых компаниях.

MIT ★ 69 обновлён 2026-11-13

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add Shubhamkumartrichy/claude-trading-skills-india
/plugin install india-trading-skills@india-trading-skills
Открыть на GitHub

Что делает market-valuation

Скилл рассчитывает исторические перцентили P/E, P/B и дивидендной доходности, сравнивает доходность прибыли с доходностью 10-летних гособлигаций и сопоставляет капитализацию рынка с ВВП Индии. Затем он сводит оценку, волатильность, ширину рынка, IPO, активность инвесторов и заёмное плечо в балл перегрева и фазу рынка.

Расчёты выполняет valuation.py: для него нужны Python 3 и подготовленные CSV или JSON с датированными значениями. Исторические файлы индексов NSE скачивают через браузер, поскольку сайты NSE и Nifty Indices блокируют скрипты. Перцентили P/E, охватывающие смену методики NSE 31 марта 2021 года, помечаются отдельно; период после смены охватывает примерно один рыночный цикл.

Какие задачи решает

  • оценить, дорог ли NIFTY относительно своей истории
  • сравнить доходность прибыли индекса с доходностью гособлигаций
  • сопоставить капитализацию рынка с ВВП Индии
  • измерить перегрев рынка по оценке, IPO и заёмному плечу

Примеры запросов агенту

  • Оцени, дорог ли сейчас NIFTY по P/E, P/B и дивидендной доходности.
  • Сравни доходность прибыли NIFTY с доходностью 10-летних гособлигаций.
  • Посчитай перегрев рынка Индии по froth_inputs.json.

Как установить market-valuation

1Через маркетплейс плагинов

/plugin marketplace add Shubhamkumartrichy/claude-trading-skills-india
/plugin install india-trading-skills@india-trading-skills

Команда ставит плагин india-trading-skills целиком, со всеми его скиллами

2Через Skills CLI (Vercel)

npx skills add Shubhamkumartrichy/claude-trading-skills-india --skill market-valuation -a claude-code

3Вручную: положить файлы

~/.claude/skills/market-valuation/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/market-valuation/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о market-valuation

Как установить market-valuation в Claude Code?

В Claude Code добавь маркетплейс командой /plugin marketplace add Shubhamkumartrichy/claude-trading-skills-india, затем установи скилл командой /plugin install india-trading-skills@india-trading-skills.

Что делает market-valuation?

Скилл анализирует оценку индийского фондового рынка по историческим показателям и рассчитывает балл перегрева. Он также сравнивает доходность прибыли с гособлигациями и капитализацию с ВВП.

Что нужно для работы market-valuation?

Нужен Python 3 и подготовленные CSV или JSON с рыночными данными. Исторические файлы NSE скачивают в браузере; для оценки текущих значений используются WebSearch или WebFetch.

Исходный текст

SKILL.md · MIT
---
name: market-valuation
description: |
  How expensive and how frothy the Indian market is, from files you download and numbers you look
  up: NIFTY (or any NSE index) P/E, P/B and dividend-yield percentiles over 5/10/all years with a
  cheap/fair/expensive/extreme band, handling NSE's 2021 switch to consolidated P/E; earnings yield
  vs the 10-year G-sec; market cap to GDP with India reference levels; and a 0–100 froth score from
  valuation, India VIX, breadth, IPO and SME-IPO heat, SIP and demat growth, F&O activity and MTF
  leverage, mapped to a phase and a risk posture. valuation.py works offline.

  Use when the user asks: "is the market expensive", "NIFTY PE percentile", "is NIFTY overvalued",
  "are we in a bubble", "is there froth in small caps", "market cap to GDP India", "Buffett
  indicator India", "bond yield vs earnings yield", "should I slow down my buying", "is the IPO
  market too hot", or wants valuation context before adding equity exposure.
---

# Market Valuation and Froth (India)

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

## Commands

```bash
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`.

## Where each number comes from

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

## The 2021 P/E basis break

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.

## What it computes

- **Percentiles:** share of observations at or below today. "Richness" flips dividend yield and yield
  gap so higher always means more expensive. Bands: cheap < 25 ≤ fair < 75 ≤ expensive < 90 ≤
  extreme. "Richer" is the share of history that was more expensive than today.
- **Yield gap:** 100 ÷ P/E − 10-year G-sec, the bond ÷ earnings-yield ratio, the P/E at which the gap
  would be zero and, with both files, its percentile. In India the gap is usually negative.
  Published "rich" thresholds conflict (about 1–3 points), so read it against its own history.
- **Market cap ÷ GDP:** bands cheap < 60, fair 60–100, elevated 100–120, expensive 120–140, extreme
  140+. References: long-period average about 75–87% (Motilal Oswal notes, rising as years are
  added); about 55% at the Mar-2020 low; 149% at the Dec-2007 peak; 130–150% in 2024–25.
- **Froth score:** sub-scores 0–100 from fixed anchors, weighted, re-normalised over what you supply,
  with coverage and confidence (high ≥ 75% of weight, low < 50%).

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

## Reading it in India

- **SIP money props up multiples.** Since 2020, monthly SIPs have grown into a steady domestic bid
  that absorbs FII selling (see `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.
- **Froth shows up in small caps, SME issues and leverage first.** 2007: market cap to GDP peaked
  near 149% in Dec-2007 amid an IPO rush, before the 2008 crash. 2018: the BSE Smallcap index peaked
  on 15-Jan-2018 and fell about 35% by mid-2019 while NIFTY held up. 2021: record demat openings,
  new-age tech IPOs and a retail F&O surge (SEBI studies later found about 9 in 10 individual F&O
  traders lost money). 2024: on 11-Mar-2024 the SEBI chairperson warned of froth in small and mid
  caps and their funds had to publish stress tests; SME IPOs drew hundreds of times subscription (a
  two-showroom dealer drew about 419×) and NSE capped SME listing-day prices at 90% over issue.
- **Low VIX is not safety.** India VIX at record-low levels (near 10 in 2023 and 2025) meant
  complacent option pricing, not low risk.

## How other skills use it

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

## Limits

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.

## Output

```
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]._

© Shubham Kumar · MIT · Shubhamkumartrichy/claude-trading-skills-india

Похожие скиллы

Каталог скиллов SKILL.md →
dcf-valuation claude-office-skills Скилл dcf-valuation для Claude Code строит DCF-модели и считает внутреннюю стоимость компании по допущениям. Работает с данными за 3–5 лет и выдаёт отчёт с анализом чувствительности. CX Codex +1 5 300установок company-valuation himself65 Скилл company-valuation оценивает справедливую стоимость публичных компаний методами DCF, мультипликаторов и SOTP. Скилл строит сетку чувствительности WACC и сценарии bull, base, bear. CX Codex +1 3 600установок saas-valuation-compression himself65 Скилл saas-valuation-compression исследует историю раундов SaaS-стартапов и считает мультипликатор оценки к ARR. Он объясняет сжатие мультипликатора влиянием ставок, замедлением роста или сменой нарратива. CX Codex +1 3 400установок quantitative-valuation JoelLewis Скилл quantitative-valuation для Claude Code. Считает внутреннюю стоимость компаний через DCF, дивидендные модели, мультипликаторы и остаточный доход. Обосновывает оценку формулами и примерами вместо интуиции. CX Codex +1 859установок qualitative-valuation JoelLewis Скилл qualitative-valuation оценивает конкурентные преимущества бизнеса, силу рва и качество менеджмента без опоры на голые мультипликаторы. Пригодится при фундаментальном анализе акций и поиске рисков в отчётности. CX Codex +1 740установок revenuecat-app-valuation RevenueCat Скилл revenuecat-app-valuation считает, сколько может стоить приложение с подписками, и объясняет, как проходит сделка по его продаже. Оценка строится на данных RevenueCat из вашего проекта. CX Codex +1 312установок

Из того же набора36

Весь набор →
market-breadth Скилл market-breadth для Claude Code оценивает, сколько акций NSE и BSE участвует в движении индекса. Запускается при запросах о ширине рынка, соотношении роста и падения или участии компаний малой капитализации. CX Codex +1 ★ 69звёзд репо pair-trading Скилл pair-trading для Claude Code проверяет пары акций NSE на коинтеграцию и оценивает спред. Запускается по запросам о хедж-коэффициенте, z-score или плане парной сделки. CX Codex +1 ★ 69звёзд репо exhaustion-reversal Скилл exhaustion-reversal для Claude Code оценивает, выдыхается ли движение акции на NSE/BSE, и составляет план выхода или входа. Включается при запросе проверить перегретый рост, сигнал на разворот или реакцию акции на новости. CX Codex +1 ★ 69звёзд репо macro-regime Скилл macro-regime для Claude Code определяет долгосрочный макрорежим индийского рынка акций по месячным данным. Запускается при запросах о ширине рынка, доходностях облигаций, рупии и нефти. CX Codex +1 ★ 69звёзд репо fii-dii-flows Скилл fii-dii-flows для Claude Code анализирует денежные потоки FII/FPI и DII на индийском рынке по скачанным CSV. Запускается на запросы о продажах FII, позициях в фьючерсах и сделках по акциям. CX Codex +1 ★ 69звёзд репо backtest-lab Скилл backtest-lab для Claude Code проверяет правила свинг-торговли на дневных данных NSE и BSE. Запускается по запросу протестировать стратегию, оценить просадку или проверить влияние комиссий. CX Codex +1 ★ 69звёзд репо indian-market-structure Скилл indian-market-structure для Claude Code объясняет устройство фондового рынка Индии. Отвечает на вопросы о расписании NSE и BSE, типах заявок, расчётах и торговых ограничениях. CX Codex +1 ★ 69звёзд репо india-market-analyst Скилл india-market-analyst для Claude Code разбирает индийские акции, индексы и деривативы. Подключает нужные этапы анализа к вопросу о сделке на NSE или BSE. CX Codex +1 ★ 69звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой