Claude Skill

india-market-breadth

Analyze Indian market breadth health using advance/decline data, stocks above moving averages, new highs/lows, and sector participation. Use when assessing rally quality, market participation width, or equity exposure levels for NSE/BSE.

LLM Mart · 0 points · 11 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download ajeeshworkspace-indian-trading-skills-skills_india-market-breadth-dc44698.zip · 19 KB
Part of ajeeshworkspace/indian-trading-skills — 10 skills

Install

skills CLI npx skills add https://github.com/ajeeshworkspace/indian-trading-skills/tree/master/skills/india-market-breadth
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install ajeeshworkspace-indian-trading-skills@llmmart
Git git clone https://github.com/ajeeshworkspace/indian-trading-skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole ajeeshworkspace/indian-trading-skills collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

India Market Breadth Analyzer

Purpose

Market breadth measures how broadly a rally or decline is distributed across the market. A healthy market has broad participation — many stocks and sectors moving in the same direction. A narrow market, where only a few large-cap stocks are driving the index, is fragile and prone to reversal.

This skill provides a systematic framework to assess NSE/BSE breadth health, score it on a 0-100 composite scale, and translate it into actionable equity exposure recommendations.


Data Sources

Primary Sources

Data Point Source Method
Advance/Decline counts NSE website / Web search WebSearch for "NSE advance decline data today"
Stocks above 200 DMA Market screeners / Web search WebSearch for "stocks above 200 DMA NSE"
Stocks above 50 DMA Market screeners / Web search WebSearch for "stocks above 50 DMA NSE"
New 52-week highs Groww MCP fetch_market_movers_and_trending_stocks_funds with YEARLY_HIGH filter
New 52-week lows Groww MCP fetch_market_movers_and_trending_stocks_funds with YEARLY_LOW filter
Sector performance Groww MCP get_ltp for sector indices (Nifty IT, Bank Nifty, Nifty Pharma, etc.)
Nifty 50 level Groww MCP get_ltp for NIFTY
Top gainers/losers Groww MCP fetch_market_movers_and_trending_stocks_funds with TOP_GAINERS / TOP_LOSERS

Broker MCP Tools Used

Use whichever broker MCP is connected (Groww or Zerodha Kite):

Groww MCP (if connected):

  1. fetch_market_movers_and_trending_stocks_funds — Core tool for yearly highs/lows counts, top gainers/losers, volume data
  2. get_ltp — Get live prices for Nifty, Bank Nifty, sector indices
  3. fetch_historical_candle_data — Historical data for trend analysis
  4. get_historical_technical_indicators — Calculate moving averages for breadth assessment
  5. fetch_technical_screener — Screen for stocks by technical criteria (RSI, MACD, etc.)
  6. fetch_fundamentals_screener — Natural language screening for market-cap based analysis

Zerodha Kite MCP (if connected):

  1. get_ltp — Live prices for Nifty, Bank Nifty, sector indices
  2. get_quotes — Real-time quotes with market depth
  3. get_ohlc — OHLC data for indices and stocks
  4. get_historical_data — Historical candle data for trend analysis
  5. search_instruments — Search for instruments by name

Workflow

Step 1: Fetch NSE Advance/Decline Data

Use web search to get NSE advance/decline data:

WebSearch: "NSE advance decline ratio today"
WebSearch: "NSE market breadth today advances declines"

Key data points needed:

  • Number of advances (stocks that closed higher)
  • Number of declines (stocks that closed lower)
  • Number of unchanged
  • Total traded stocks

Step 2: Calculate Breadth Indicators

A/D Ratio

A/D Ratio = Number of Advances / Number of Declines

Interpretation:
  > 2.0:  Strong breadth (broad rally)
  1.5-2.0: Healthy breadth
  1.0-1.5: Neutral
  0.7-1.0: Weak breadth
  < 0.7:  Very weak (broad selling)

A/D Line (Cumulative)

A/D Line = Previous A/D Line + (Advances - Declines)

Rising A/D Line + Rising Nifty = Confirmed uptrend
Falling A/D Line + Rising Nifty = DIVERGENCE (warning)
Rising A/D Line + Falling Nifty = Accumulation (bullish)
Falling A/D Line + Falling Nifty = Confirmed downtrend

McClellan Oscillator Concept

A/D Difference = Advances - Declines
19-day EMA of A/D Difference (fast)
39-day EMA of A/D Difference (slow)
McClellan Oscillator = 19-day EMA - 39-day EMA

> 0:  Bullish breadth momentum
< 0:  Bearish breadth momentum
> +50: Overbought breadth
< -50: Oversold breadth

Step 3: Assess % of Stocks Above 200 DMA and 50 DMA

Use web search or screener tools:

WebSearch: "percentage of NSE stocks above 200 day moving average"

Or use Groww MCP technical screener to estimate:

fetch_technical_screener with various SMA/EMA filters

Key Thresholds

Metric Bullish Neutral Bearish
% above 200 DMA > 60% 40-60% < 40%
% above 50 DMA > 55% 35-55% < 35%
% above 20 DMA > 50% 30-50% < 30%

Step 4: Count New 52-Week Highs vs Lows (via Groww MCP)

Use Groww MCP tools:

# Fetch stocks hitting yearly highs
fetch_market_movers_and_trending_stocks_funds(
    discovery_filter_types=["YEARLY_HIGH"],
    size=20
)

# Fetch stocks hitting yearly lows
fetch_market_movers_and_trending_stocks_funds(
    discovery_filter_types=["YEARLY_LOW"],
    size=20
)

Interpretation

Highs:Lows Ratio Signal
> 5:1 Strong bullish breadth
2:1 to 5:1 Healthy bullish breadth
1:1 to 2:1 Neutral / transitioning
0.5:1 to 1:1 Bearish breadth
< 0.5:1 Strong bearish breadth

Step 5: Score Breadth Health (0-100 Composite)

The composite score is calculated from 5 components:

# Component Weight Max Points Source
1 Advance/Decline Ratio 25% 25 NSE A/D data
2 Stocks Above 200 DMA 25% 25 Screener data
3 New Highs vs Lows 20% 20 Groww MCP YEARLY_HIGH/LOW
4 Sector Participation 15% 15 Sector index performance
5 Nifty Divergence 15% 15 Nifty vs breadth comparison

Component 1: Advance/Decline Ratio Score (0-25)

A/D Ratio Score
> 3.0 25
2.5 - 3.0 22-25
2.0 - 2.5 19-22
1.5 - 2.0 15-19
1.2 - 1.5 12-15
1.0 - 1.2 8-12
0.7 - 1.0 4-8
0.5 - 0.7 2-4
< 0.5 0-2

Also consider the 5-day and 20-day trend of A/D ratio:

  • Improving trend: +2 bonus points
  • Deteriorating trend: -2 penalty points

Component 2: Stocks Above 200 DMA Score (0-25)

% Above 200 DMA Score
> 75% 25
65-75% 21-25
55-65% 17-21
45-55% 13-17
35-45% 9-13
25-35% 5-9
< 25% 0-5

Component 3: New Highs vs Lows Score (0-20)

Highs:Lows Ratio Score
> 5:1 20
3:1 - 5:1 16-20
2:1 - 3:1 12-16
1:1 - 2:1 8-12
0.5:1 - 1:1 4-8
< 0.5:1 0-4

Component 4: Sector Participation Score (0-15)

Count how many of the 13 major Nifty sectors are in an uptrend (above their 50 DMA or showing positive 1-month return):

13 Key NSE Sectors:

  1. Nifty Bank
  2. Nifty IT
  3. Nifty Pharma
  4. Nifty FMCG
  5. Nifty Auto
  6. Nifty Metal
  7. Nifty Realty
  8. Nifty Energy
  9. Nifty Infrastructure
  10. Nifty PSU Bank
  11. Nifty Private Bank
  12. Nifty Media
  13. Nifty Financial Services
Sectors in Uptrend Score
11-13 15
9-10 12-14
7-8 9-11
5-6 6-8
3-4 3-5
0-2 0-2

Component 5: Nifty Divergence Score (0-15)

This measures whether index performance aligns with underlying breadth.

Scenario Score
Nifty rising + breadth improving 15 (confirmed uptrend)
Nifty flat + breadth improving 13 (stealth accumulation)
Nifty rising + breadth flat 10 (narrow rally, watch closely)
Nifty flat + breadth flat 8 (neutral, no signal)
Nifty flat + breadth declining 5 (stealth distribution)
Nifty rising + breadth declining 3 (BEARISH DIVERGENCE — high risk)
Nifty falling + breadth declining 2 (confirmed downtrend)
Nifty falling + breadth improving 7 (possible bottom formation)

Step 6: Map to Equity Exposure Recommendation

Health Zones

Score Range Zone Equity Exposure Action
80-100 Strong 90-100% Full equity allocation. Market has broad participation. Deploy fresh capital.
60-79 Healthy 75-90% Normal allocation. Monitor for deterioration. Favor broad-based positions.
40-59 Neutral 60-75% Cautious allocation. Focus on strong sectors only. Reduce mid/small-cap exposure.
20-39 Weakening 40-60% Defensive allocation. Shift to large-caps and quality. Raise cash on rallies.
0-19 Critical 25-40% Maximum defense. High cash/debt allocation. Only hold strongest positions. Potential capitulation zone.

Exposure Adjustment Rules

  1. Score improving for 5+ days: Can increase exposure by one zone level
  2. Score deteriorating for 5+ days: Decrease exposure by one zone level
  3. Score drops >15 points in a week: Emergency review — consider reducing exposure immediately
  4. Score rises >15 points in a week: Wait for confirmation (3+ days) before increasing

Step 7: Generate Report

Use the template from assets/breadth_report_template.md to produce a structured report. Include:

  1. Composite score and health zone
  2. All 5 component scores with supporting data
  3. Trend direction (improving/deteriorating)
  4. Equity exposure recommendation
  5. Divergence analysis
  6. Historical context
  7. Disclaimer

Quick Reference: NSE Sector Indices

Use these symbols with get_ltp for sector breadth assessment:

Sector Symbol Approx Constituents
Bank Nifty NIFTY BANK 12 banks
Nifty IT NIFTY IT 10 IT companies
Nifty Pharma NIFTY PHARMA 20 pharma companies
Nifty FMCG NIFTY FMCG 15 FMCG companies
Nifty Auto NIFTY AUTO 15 auto companies
Nifty Metal NIFTY METAL 15 metal companies
Nifty Realty NIFTY REALTY 10 realty companies
Nifty Energy NIFTY ENERGY 10 energy companies
Nifty Infra NIFTY INFRA 30 infra companies
Nifty PSU Bank NIFTY PSU BANK 12 PSU banks
Nifty Pvt Bank NIFTY PVT BANK 10 private banks
Nifty Media NIFTY MEDIA 14 media companies
Nifty Fin Service NIFTY FIN SERVICE 20 financial companies

Example Breadth Assessment

Date: 2025-03-10

COMPONENT SCORES:
  1. A/D Ratio: 1.8 (5-day avg: 1.5)          -> Score: 17/25
  2. Stocks above 200 DMA: ~55%                 -> Score: 17/25
  3. New Highs:Lows: 85:25 (3.4:1)             -> Score: 16/20
  4. Sectors in uptrend: 9/13                   -> Score: 12/15
  5. Nifty rising + breadth flat                -> Score: 10/15

  COMPOSITE SCORE: 72/100
  HEALTH ZONE: Healthy
  EQUITY EXPOSURE: 75-90%

RECOMMENDATION:
  Market breadth is healthy with broad participation. 9 of 13 sectors are
  in uptrend. A/D ratio has been above 1.0 for the past week. However,
  Nifty is making new highs while breadth is flat — watch for divergence.
  Maintain normal equity allocation but be ready to reduce if breadth
  starts deteriorating.

Divergence Detection — The Most Important Signal

What is Breadth Divergence?

When the Nifty 50 makes a new high but breadth indicators do not confirm, it signals that the rally is narrowing. This is the single most important breadth signal for risk management.

How to Detect

  1. Nifty at 52-week high BUT advance/decline ratio < 1.5
  2. Nifty at 52-week high BUT fewer new 52-week highs than at the previous Nifty high
  3. Nifty at 52-week high BUT % above 200 DMA is declining
  4. Nifty at 52-week high BUT fewer sectors participating than at previous high

Historical Examples (Indian Market)

Date Nifty Level Breadth Signal What Happened
Oct 2021 All-time high (18,600) Midcap/smallcap already correcting Nifty corrected 15% by Jun 2022
Jan 2018 All-time high (11,170) Only large-caps rallying, midcaps weak Midcap/smallcap correction of 30-40% through 2018
Jan 2008 All-time high (21,200, Sensex) Breadth divergence from Sep 2007 Market crashed 60% by Oct 2008

Action on Divergence

Divergence Duration Action
1-3 days Monitor — could be noise
1-2 weeks Start tightening stops, reduce weakest positions
3-4 weeks Reduce overall exposure by one zone level
1+ month Significant risk — move to defensive posture

India-Specific Nuances

  • F&O Expiry Effects: Weekly and monthly F&O expiry Thursdays can distort breadth readings due to derivatives-related hedging and unwinding. Flag expiry-day breadth readings and consider using the non-expiry-day average for comparison.
  • Budget and RBI Policy Weeks: Union Budget day and RBI monetary policy announcement days create abnormal breadth swings. Note these as event-driven rather than trend-driven.
  • FII/DII Flow Correlation: Sustained FII selling often narrows breadth from the large-cap end first, while DII buying may support mid/small caps, creating a cap-tier divergence.
  • SEBI Regulatory Impact: Regulations like small-cap mutual fund stress tests can cause episodic breadth disruptions in the small-cap tier — these are flow-driven, not fundamental.
  • IPO Market as Breadth Proxy: A hot IPO market (high subscription rates, listing gains) often correlates with broad market risk appetite. A freeze in IPO activity can signal breadth contraction ahead.

Files in This Skill

  • references/breadth_methodology.md — Comprehensive breadth analysis methodology for Indian markets
  • assets/breadth_report_template.md — Structured report template for breadth analysis output
Files (indian-trading-skills)
  • assets
    • breadth_report_template.md 10.1 KB
      # India Market Breadth Report
      
      **Date:** [DATE]
      **Time:** [TIMESTAMP] IST
      **Analysis Universe:** NSE (1,800+ listed stocks)
      
      ---
      
      ## 1. Breadth Score Summary
      
      ### Composite Score: [SCORE] / 100 — [HEALTH_ZONE]
      
      | Component | Score | Max | Source |
      |-----------|-------|-----|--------|
      | Advance/Decline Ratio | [AD_SCORE] | 25 | NSE A/D data |
      | Stocks Above 200 DMA | [DMA_SCORE] | 25 | Screener data |
      | New Highs vs Lows | [HL_SCORE] | 20 | Groww MCP YEARLY_HIGH/LOW |
      | Sector Participation | [SECTOR_SCORE] | 15 | Sector index performance |
      | Nifty Divergence | [DIVERGENCE_SCORE] | 15 | Nifty vs breadth comparison |
      | **Total** | **[TOTAL_SCORE]** | **100** | |
      
      **Health Zone:** [STRONG / HEALTHY / NEUTRAL / WEAKENING / CRITICAL]
      
      **Score Trend:** [IMPROVING / STABLE / DETERIORATING] ([DELTA] points vs 5 days ago)
      
      **Recommended Equity Exposure:** [MIN]% - [MAX]%
      
      **Quick Summary:** [2-3 sentence summary of the most important breadth observations and what they mean for equity allocation. State the score, the zone, the trend, and the single most actionable insight.]
      
      ---
      
      ## 2. Advance/Decline Data
      
      ### Today's A/D Reading
      
      | Metric | Value |
      |--------|-------|
      | Advances | [ADVANCES] |
      | Declines | [DECLINES] |
      | Unchanged | [UNCHANGED] |
      | A/D Ratio (today) | [AD_RATIO_TODAY] |
      | A/D Ratio (5-day SMA) | [AD_RATIO_5D] |
      | A/D Ratio (20-day SMA) | [AD_RATIO_20D] |
      
      ### A/D Trend
      
      | Period | A/D Ratio | Signal |
      |--------|-----------|--------|
      | Today | [VALUE] | [BULLISH / BEARISH / NEUTRAL] |
      | 5-day average | [VALUE] | [BULLISH / BEARISH / NEUTRAL] |
      | 20-day average | [VALUE] | [BULLISH / BEARISH / NEUTRAL] |
      | Trend direction | [RISING / FALLING / FLAT] | [IMPROVING / DETERIORATING / STABLE] |
      
      ### A/D Line Direction
      
      The cumulative A/D Line is [RISING / FALLING / FLAT] over the past [N] trading days.
      
      [If diverging from Nifty, note here: "DIVERGENCE: A/D Line is [falling/rising] while Nifty is [rising/falling]."]
      
      ---
      
      ## 3. Stocks Above Moving Averages
      
      | Moving Average | % of Stocks Above | Previous Reading | Change | Signal |
      |---------------|-------------------|-----------------|--------|--------|
      | 200 DMA | [VALUE]% | [PREV]% | [DELTA]pp | [HEALTHY / CAUTION / WEAK] |
      | 50 DMA | [VALUE]% | [PREV]% | [DELTA]pp | [HEALTHY / CAUTION / WEAK] |
      | 20 DMA | [VALUE]% | [PREV]% | [DELTA]pp | [MOMENTUM UP / DOWN] |
      
      ### Interpretation
      
      - **200 DMA breadth ([VALUE]%):** [Interpretation — e.g., "Above 60% indicates broad long-term participation. The market has healthy structural support."]
      - **50 DMA breadth ([VALUE]%):** [Interpretation — e.g., "Below 45% suggests medium-term momentum is weakening even though long-term structure is intact. Watch for further deterioration."]
      - **Cross-reading:** [Note any divergence between 200 DMA and 50 DMA breadth — e.g., "200 DMA breadth remains high at 62% but 50 DMA breadth has dropped to 38%, suggesting medium-term weakness developing within a longer-term uptrend."]
      
      ---
      
      ## 4. New 52-Week Highs vs Lows
      
      | Metric | Daily | Weekly Avg |
      |--------|-------|-----------|
      | New 52-Week Highs | [HIGHS_TODAY] | [HIGHS_WEEKLY_AVG] |
      | New 52-Week Lows | [LOWS_TODAY] | [LOWS_WEEKLY_AVG] |
      | Highs:Lows Ratio | [RATIO_TODAY] | [RATIO_WEEKLY] |
      | NH-NL Differential | [DIFF_TODAY] | [DIFF_WEEKLY] |
      
      ### Interpretation
      
      - **Current ratio:** [VALUE]:1 — [Signal — e.g., "Highs outnumber lows by more than 3:1, indicating healthy momentum breadth."]
      - **Trend:** The number of new highs is [INCREASING / DECREASING / STABLE] compared to last week.
      - **Divergence check:** At the previous Nifty swing high ([DATE], Nifty [LEVEL]), there were [N] new highs. Currently, there are [N] new highs. [CONFIRMING / DIVERGING]
      
      ### Notable Stocks at Extremes
      
      **Stocks hitting new 52-week highs (sample):**
      - [STOCK1] — [SECTOR]
      - [STOCK2] — [SECTOR]
      - [STOCK3] — [SECTOR]
      
      **Stocks hitting new 52-week lows (sample):**
      - [STOCK1] — [SECTOR]
      - [STOCK2] — [SECTOR]
      - [STOCK3] — [SECTOR]
      
      ---
      
      ## 5. Sector Participation Matrix
      
      | # | Sector | Above 50 DMA? | 1M Return | 3M Return | Participating? | Relative Strength |
      |---|--------|---------------|-----------|-----------|----------------|-------------------|
      | 1 | Nifty Bank | [YES/NO] | [VALUE]% | [VALUE]% | [YES/NO] | [STRONG/WEAK/INLINE] |
      | 2 | Nifty IT | [YES/NO] | [VALUE]% | [VALUE]% | [YES/NO] | [STRONG/WEAK/INLINE] |
      | 3 | Nifty Pharma | [YES/NO] | [VALUE]% | [VALUE]% | [YES/NO] | [STRONG/WEAK/INLINE] |
      | 4 | Nifty FMCG | [YES/NO] | [VALUE]% | [VALUE]% | [YES/NO] | [STRONG/WEAK/INLINE] |
      | 5 | Nifty Auto | [YES/NO] | [VALUE]% | [VALUE]% | [YES/NO] | [STRONG/WEAK/INLINE] |
      | 6 | Nifty Metal | [YES/NO] | [VALUE]% | [VALUE]% | [YES/NO] | [STRONG/WEAK/INLINE] |
      | 7 | Nifty Realty | [YES/NO] | [VALUE]% | [VALUE]% | [YES/NO] | [STRONG/WEAK/INLINE] |
      | 8 | Nifty Energy | [YES/NO] | [VALUE]% | [VALUE]% | [YES/NO] | [STRONG/WEAK/INLINE] |
      | 9 | Nifty Infra | [YES/NO] | [VALUE]% | [VALUE]% | [YES/NO] | [STRONG/WEAK/INLINE] |
      | 10 | Nifty PSU Bank | [YES/NO] | [VALUE]% | [VALUE]% | [YES/NO] | [STRONG/WEAK/INLINE] |
      | 11 | Nifty Pvt Bank | [YES/NO] | [VALUE]% | [VALUE]% | [YES/NO] | [STRONG/WEAK/INLINE] |
      | 12 | Nifty Media | [YES/NO] | [VALUE]% | [VALUE]% | [YES/NO] | [STRONG/WEAK/INLINE] |
      | 13 | Nifty Fin Service | [YES/NO] | [VALUE]% | [VALUE]% | [YES/NO] | [STRONG/WEAK/INLINE] |
      
      **Sectors participating:** [COUNT] out of 13 — [BROAD / SELECTIVE / NARROW]
      
      **Leading sectors:** [List the 2-3 strongest sectors with brief reasoning]
      
      **Lagging sectors:** [List the 2-3 weakest sectors with brief reasoning]
      
      **Rotation signal:** [Note any sector rotation patterns — e.g., "Defensive sectors (FMCG, Pharma) are outperforming cyclicals (Metals, Realty), which typically indicates risk-off rotation."]
      
      ---
      
      ## 6. Divergence Analysis
      
      ### Bearish Divergences
      
      **Detected:** [YES / NO]
      
      [If YES, fill in the details below. If NO, write "No bearish divergences detected at this time."]
      
      | Divergence Type | Observation | Duration | Severity |
      |----------------|-------------|----------|----------|
      | [TYPE — e.g., A/D Line] | [DESCRIPTION — e.g., "Nifty at 22,500 (new high) but A/D Line peaked at 22,100 two weeks ago"] | [DURATION — e.g., "2 weeks"] | [MINOR / MODERATE / SEVERE] |
      | [TYPE] | [DESCRIPTION] | [DURATION] | [SEVERITY] |
      
      **Historical precedent:** [If applicable, cite a similar divergence from the past and what followed]
      
      **Action recommendation:** [Based on severity — e.g., "Level 2 (Moderate) divergence detected. Tighten stops on momentum positions. Do not add new leveraged positions."]
      
      ### Bullish Divergences
      
      **Detected:** [YES / NO]
      
      [If YES, fill in similarly to bearish divergences above.]
      
      ---
      
      ## 7. Equity Exposure Recommendation
      
      ### Current Zone: [HEALTH_ZONE]
      
      | Parameter | Current | Recommended |
      |-----------|---------|-------------|
      | Overall equity exposure | [CURRENT]% | [RECOMMENDED_MIN]% - [RECOMMENDED_MAX]% |
      | Large-cap allocation | [VALUE]% | [VALUE]% |
      | Mid-cap allocation | [VALUE]% | [VALUE]% |
      | Small-cap allocation | [VALUE]% | [VALUE]% |
      | Cash / debt allocation | [VALUE]% | [VALUE]% |
      
      ### Allocation Rationale
      
      [2-3 sentences explaining why the recommended exposure level is appropriate given the current breadth reading. Reference specific components that are driving the recommendation.]
      
      ### Position Sizing Guidance
      
      - **New positions:** [FULL / HALF / QUARTER / NONE] size based on [ZONE] zone
      - **Existing positions:** [HOLD / TIGHTEN STOPS / REDUCE / EXIT WEAKEST]
      - **Strategy bias:** [MOMENTUM / VALUE / DEFENSIVE / MIXED]
      
      ### What Would Change This Recommendation
      
      - **To increase exposure:** [What needs to happen — e.g., "Composite score needs to sustain above 60 for 3+ days, with A/D ratio above 1.5."]
      - **To decrease exposure:** [What would trigger a reduction — e.g., "Score dropping below 40 or a Level 3 bearish divergence developing."]
      
      ---
      
      ## 8. Historical Context
      
      ### Score History (Last 6 Readings)
      
      | Date | Score | Zone | Trend | Notable Event |
      |------|-------|------|-------|---------------|
      | [DATE] | [SCORE] | [ZONE] | [TREND] | [EVENT or "—"] |
      | [DATE] | [SCORE] | [ZONE] | [TREND] | [EVENT or "—"] |
      | [DATE] | [SCORE] | [ZONE] | [TREND] | [EVENT or "—"] |
      | [DATE] | [SCORE] | [ZONE] | [TREND] | [EVENT or "—"] |
      | [DATE] | [SCORE] | [ZONE] | [TREND] | [EVENT or "—"] |
      | [DATE] | [SCORE] | [ZONE] | [TREND] | [EVENT or "—"] |
      
      ### Score Range (Last 30 Days)
      
      - **High:** [SCORE] on [DATE]
      - **Low:** [SCORE] on [DATE]
      - **Average:** [SCORE]
      - **Current vs Average:** [ABOVE / BELOW / AT average]
      
      ### Regime History
      
      | Period | Zone | Duration | Key Driver |
      |--------|------|----------|-----------|
      | [START] - [END] | [ZONE] | [DAYS] | [Brief description of what drove the regime] |
      | [START] - [END] | [ZONE] | [DAYS] | [Brief description] |
      
      ---
      
      ## 9. India-Specific Context
      
      ### Event Calendar Impact
      
      - **F&O Expiry:** [Is today near weekly/monthly expiry? If yes: "Today's breadth reading may be distorted by F&O expiry dynamics. Use the 5-day average for comparison."]
      - **Budget/Policy:** [Is there an upcoming Budget, RBI policy, or major event? Note the expected impact on breadth.]
      - **FII/DII Flows:** [Recent FII/DII flow direction — e.g., "FIIs have been net sellers for the past 5 sessions (Rs [VALUE] Cr net). DII buying is partially absorbing the selling pressure."]
      - **Monsoon:** [If June-September: note monsoon progress and impact on agri/FMCG sector breadth]
      
      ---
      
      ## Disclaimer
      
      This report is generated using a systematic breadth analysis framework and is intended for informational and educational purposes only. It is not investment advice, nor a recommendation to buy, sell, or hold any securities.
      
      Market breadth is one analytical input among many for investment decisions. Past breadth patterns do not guarantee future market behavior. Always consider multiple factors including fundamental analysis, risk tolerance, and investment horizon before making investment decisions.
      
      Data sources include NSE advance/decline statistics, stock price data, and Groww MCP tools. Data may have delays or inaccuracies. Verify critical data points independently before acting.
      
      ---
      
      *Generated by India Market Breadth Skill*
      *Methodology: references/breadth_methodology.md*
      *Universe: NSE listed stocks*
      
  • references
    • breadth_methodology.md 26 KB
      # Breadth Analysis Methodology — Indian Markets (NSE/BSE)
      
      ## Table of Contents
      
      1. [What Market Breadth Means for NSE](#what-market-breadth-means-for-nse)
      2. [Core Breadth Indicators](#core-breadth-indicators)
      3. [Composite Score Calculation](#composite-score-calculation)
      4. [Divergence Detection](#divergence-detection)
      5. [Using Breadth to Time Equity Allocation](#using-breadth-to-time-equity-allocation)
      6. [Historical Case Studies](#historical-case-studies)
      7. [India-Specific Considerations](#india-specific-considerations)
      
      ---
      
      ## What Market Breadth Means for NSE
      
      ### The NSE Universe
      
      The National Stock Exchange of India has approximately 1,800-2,000 actively traded stocks on any given day. The key indices, however, represent only a small fraction:
      
      | Index | Stocks | Market Cap Coverage |
      |-------|--------|-------------------|
      | Nifty 50 | 50 | ~62% of NSE market cap |
      | Nifty 100 | 100 | ~76% of NSE market cap |
      | Nifty 200 | 200 | ~85% of NSE market cap |
      | Nifty 500 | 500 | ~93% of NSE market cap |
      | Nifty Total Market | 750+ | ~96% of NSE market cap |
      | All listed stocks | 1,800+ | 100% |
      
      ### Why Breadth Matters
      
      The Nifty 50 is market-cap weighted. The top 10 stocks (Reliance, TCS, HDFC Bank, Infosys, ICICI Bank, etc.) account for approximately 45-50% of the index weight. This means:
      
      - Nifty can rise 1% even if 40 of the 50 stocks are flat or down, as long as the top 10 are up
      - A Nifty rally driven by just 5-10 heavyweight stocks is fragile
      - When these heavyweights stall, the index reverses sharply
      
      **Breadth answers the question: "Is the MARKET going up, or just a few big stocks?"**
      
      ### Healthy vs Narrow Markets
      
      | Characteristic | Healthy (Broad) Market | Narrow (Fragile) Market |
      |---------------|----------------------|----------------------|
      | A/D ratio | > 1.5:1 | < 1.0:1 |
      | % above 200 DMA | > 60% | < 40% |
      | New highs vs lows | > 2:1 | < 1:1 |
      | Sectors participating | 8+ of 13 | < 5 of 13 |
      | Cap-tier alignment | Large, mid, small all up | Only large-cap up |
      | Typical duration | Months to years | Weeks to months |
      | Risk of reversal | Low | High |
      
      ---
      
      ## Core Breadth Indicators
      
      ### 1. Advance/Decline (A/D) Ratio
      
      The most fundamental breadth indicator. Simply count how many stocks went up versus down on a given day.
      
      #### Calculation
      ```
      A/D Ratio = Number of Advancing Stocks / Number of Declining Stocks
      
      Example: 1,100 advances / 650 declines = 1.69
      ```
      
      #### Interpretation for NSE
      
      | A/D Ratio | Market Condition | Signal |
      |-----------|-----------------|--------|
      | > 3.0 | Extreme broad rally | Very bullish, but may be overbought short-term |
      | 2.0 - 3.0 | Strong broad rally | Bullish, healthy participation |
      | 1.5 - 2.0 | Healthy rally | Normal bullish condition |
      | 1.2 - 1.5 | Mild bullish | Slightly positive, nothing conclusive |
      | 1.0 - 1.2 | Neutral | Mixed market, no clear direction |
      | 0.7 - 1.0 | Mild bearish | More stocks declining than advancing |
      | 0.5 - 0.7 | Broad selling | Bearish, widespread decline |
      | < 0.5 | Panic/capitulation | Very bearish, but may signal bottom |
      
      #### Smoothing
      
      Use the 5-day simple moving average of the A/D ratio to filter daily noise. The 20-day SMA shows the medium-term trend.
      
      - **5-day SMA rising:** Short-term breadth improving
      - **5-day SMA falling:** Short-term breadth deteriorating
      - **20-day SMA above 1.3:** Medium-term breadth is healthy
      - **20-day SMA below 0.8:** Medium-term breadth is weak
      
      #### A/D Line (Cumulative)
      
      The cumulative A/D Line tracks the running total of (advances - declines) over time:
      ```
      A/D Line(today) = A/D Line(yesterday) + (Advances - Declines)
      ```
      
      The absolute value does not matter — the direction does:
      - **Rising A/D Line:** Breadth expanding — bullish
      - **Falling A/D Line:** Breadth contracting — bearish
      - **A/D Line diverging from Nifty:** Warning signal (see Divergence section)
      
      #### McClellan Oscillator (NSE Adaptation)
      
      The McClellan Oscillator applies exponential smoothing to the daily advance-decline difference:
      ```
      A/D Difference = Advances - Declines
      19-day EMA of A/D Difference (fast)
      39-day EMA of A/D Difference (slow)
      McClellan Oscillator = 19-day EMA - 39-day EMA
      
      Interpretation:
        > 0:  Bullish breadth momentum
        < 0:  Bearish breadth momentum
        > +50: Overbought breadth (potential pullback)
        < -50: Oversold breadth (potential bounce)
        Zero-line crossover: Significant momentum shift
      ```
      
      ### 2. Percentage of Stocks Above Moving Averages
      
      This indicator shows what fraction of the universe is in an uptrend at various timeframes.
      
      #### % Above 200 DMA (Long-Term Breadth)
      
      The 200-day moving average is the standard long-term trend filter. A stock above its 200 DMA is in a long-term uptrend.
      
      | % Above 200 DMA | Interpretation | NSE Context |
      |------------------|---------------|-------------|
      | > 75% | Extreme broad participation | Very rare, typically early-to-mid bull market |
      | 60-75% | Broad participation | Healthy bull market, most stocks in uptrend |
      | 50-60% | Moderate participation | Market is positive but not uniformly |
      | 40-50% | Selective market | Only certain sectors/themes working |
      | 30-40% | Narrow market | Most stocks in downtrend, index propped by few |
      | < 30% | Bear market breadth | Broad-based decline, most stocks below long-term average |
      | < 15% | Capitulation zone | Extreme pessimism, historically near bottoms |
      
      **Key thresholds for action:**
      - **Above 60%:** Maintain full equity exposure, broad-based strategies work
      - **Below 40%:** Reduce exposure, focus on relative strength leaders only
      - **Below 25%:** Maximum defense OR contrarian accumulation zone
      
      #### % Above 50 DMA (Medium-Term Breadth)
      
      The 50-day moving average captures medium-term trends. This indicator is more sensitive and turns earlier than the 200 DMA breadth.
      
      | % Above 50 DMA | Interpretation |
      |-----------------|---------------|
      | > 65% | Strong medium-term breadth |
      | 45-65% | Normal/healthy |
      | 30-45% | Weakening |
      | < 30% | Oversold, potential mean reversion |
      
      **Cross-reading with 200 DMA:**
      - % above 200 DMA high BUT % above 50 DMA falling = Medium-term weakness developing within a longer-term uptrend (early warning)
      - % above 200 DMA low BUT % above 50 DMA rising = Potential trend reversal forming (early bullish signal)
      
      ### 3. New 52-Week Highs vs New 52-Week Lows
      
      This is one of the most powerful breadth indicators. It measures momentum by counting how many stocks are at their strongest (or weakest) levels in a year.
      
      #### Calculation
      ```
      New 52W Highs = Count of stocks where today's high >= highest high in prior 252 trading days
      New 52W Lows = Count of stocks where today's low <= lowest low in prior 252 trading days
      NH-NL Differential = New Highs - New Lows
      New Highs Ratio = New Highs / (New Highs + New Lows)
      ```
      
      #### Interpretation
      
      | Ratio (Highs / (Highs+Lows)) | Signal |
      |-------------------------------|--------|
      | > 0.80 (>4:1 ratio) | Strong bullish breadth, broad momentum |
      | 0.60 - 0.80 | Healthy breadth, more strength than weakness |
      | 0.40 - 0.60 | Neutral / transitioning |
      | 0.20 - 0.40 | Bearish breadth, weakness spreading |
      | < 0.20 (>4:1 lows ratio) | Strong bearish breadth, broad weakness |
      
      #### NSE-Specific Observations
      
      On a typical day in the Indian market:
      - **Healthy bull market:** 80-150+ new highs, 10-30 new lows
      - **Neutral market:** 30-60 new highs, 20-40 new lows
      - **Bear market:** 5-20 new highs, 60-200+ new lows
      - **Capitulation:** 0-5 new highs, 200-400+ new lows
      
      **Important:** Compare the number of new highs at each Nifty peak. If Nifty makes a higher high but new highs are fewer than at the previous peak, breadth is diverging negatively.
      
      ### 4. Sector Participation
      
      Market rallies that are driven by multiple sectors are more sustainable than those concentrated in one or two sectors.
      
      #### The 13 Key NSE Sectors
      
      | # | Sector Index | Key Stocks | Macro Sensitivity |
      |---|-------------|------------|-------------------|
      | 1 | Nifty Bank | HDFC Bank, ICICI Bank, SBI, Kotak | Interest rates, credit growth |
      | 2 | Nifty IT | TCS, Infosys, Wipro, HCL Tech | USD/INR, US demand, tech spending |
      | 3 | Nifty Pharma | Sun Pharma, Dr Reddy's, Cipla | USFDA approvals, US generics |
      | 4 | Nifty FMCG | HUL, ITC, Nestle, Britannia | Rural demand, monsoon, inflation |
      | 5 | Nifty Auto | M&M, Maruti, Tata Motors, Bajaj Auto | Consumer spending, EV transition |
      | 6 | Nifty Metal | Tata Steel, JSW Steel, Hindalco | Global commodity cycle, China |
      | 7 | Nifty Realty | DLF, Godrej Properties, Oberoi | Interest rates, housing demand |
      | 8 | Nifty Energy | Reliance, NTPC, Power Grid, ONGC | Crude oil, government policy |
      | 9 | Nifty Infra | L&T, Adani Ports, UltraTech | Government capex, budget allocation |
      | 10 | Nifty PSU Bank | SBI, Bank of Baroda, PNB, Canara | NPA cycle, government recapitalization |
      | 11 | Nifty Pvt Bank | HDFC Bank, ICICI Bank, Kotak, Axis | Credit growth, asset quality |
      | 12 | Nifty Media | Zee, PVR Inox, Sun TV, TV18 | Ad spending, digital transition |
      | 13 | Nifty Fin Service | Bajaj Finance, SBI Life, HDFC AMC | Credit cycle, insurance penetration |
      
      #### Measuring Sector Participation
      
      For each sector, determine if it is in an "uptrend" by checking:
      1. **Sector index above its 50 DMA** — Primary criterion
      2. **Positive 1-month return** — Secondary criterion
      3. **Positive 3-month return** — Confirmation
      
      A sector is "participating" if at least 2 of the 3 criteria are met.
      
      #### Interpretation
      
      | Sectors Participating | Market Health |
      |----------------------|---------------|
      | 11-13 out of 13 | Broad rally — extremely healthy |
      | 8-10 out of 13 | Healthy rally — normal bull market |
      | 6-7 out of 13 | Selective rally — some caution warranted |
      | 4-5 out of 13 | Narrow rally — high risk |
      | 0-3 out of 13 | Bear market or extreme selectivity |
      
      #### Sector Rotation Patterns in India
      
      Understanding which sectors lead and lag helps assess where we are in the market cycle:
      
      ```
      Early Recovery:  Banks, Financials, Real Estate -> rate-sensitive recovery
      Mid Expansion:   IT, Pharma, FMCG -> broad participation, earnings growth
      Late Expansion:  Metals, Infrastructure, PSU -> cyclical and speculative themes
      Early Downturn:  IT and FMCG outperform (defensive), cyclicals crack
      Deep Downturn:   Everything falls, correlation goes to 1
      Bottoming:       Banks lead again, followed by auto and consumer discretionary
      ```
      
      ---
      
      ## Composite Score Calculation
      
      ### 5-Component Scoring Model (Total: 100 Points)
      
      The composite score combines all five breadth dimensions into a single number.
      
      | # | Component | Weight | Max Points | Primary Data Source |
      |---|-----------|--------|------------|-------------------|
      | 1 | Advance/Decline Ratio | 25% | 25 | NSE A/D data (via web search) |
      | 2 | Stocks Above 200 DMA | 25% | 25 | Screener data (via web search) |
      | 3 | New Highs vs Lows | 20% | 20 | Groww MCP YEARLY_HIGH/LOW |
      | 4 | Sector Participation | 15% | 15 | Sector index LTP via Groww MCP |
      | 5 | Nifty Divergence | 15% | 15 | Nifty vs breadth comparison |
      
      ### Component 1: A/D Ratio Score (0-25 points)
      
      ```
      If AD_ratio >= 3.0:     score = 25
      If 2.5 <= AD < 3.0:     score = 22 + (AD - 2.5) / 0.5 * 3
      If 2.0 <= AD < 2.5:     score = 19 + (AD - 2.0) / 0.5 * 3
      If 1.5 <= AD < 2.0:     score = 15 + (AD - 1.5) / 0.5 * 4
      If 1.2 <= AD < 1.5:     score = 12 + (AD - 1.2) / 0.3 * 3
      If 1.0 <= AD < 1.2:     score = 8 + (AD - 1.0) / 0.2 * 4
      If 0.7 <= AD < 1.0:     score = 4 + (AD - 0.7) / 0.3 * 4
      If 0.5 <= AD < 0.7:     score = 2 + (AD - 0.5) / 0.2 * 2
      If AD < 0.5:            score = AD / 0.5 * 2
      
      Trend adjustment:
        If 5-day SMA of AD is rising: +2 bonus (capped at 25)
        If 5-day SMA of AD is falling: -2 penalty (floored at 0)
      ```
      
      ### Component 2: % Above 200 DMA Score (0-25 points)
      
      ```
      If pct >= 75:          score = 25
      If 65 <= pct < 75:     score = 21 + (pct - 65) / 10 * 4
      If 55 <= pct < 65:     score = 17 + (pct - 55) / 10 * 4
      If 45 <= pct < 55:     score = 13 + (pct - 45) / 10 * 4
      If 35 <= pct < 45:     score = 9 + (pct - 35) / 10 * 4
      If 25 <= pct < 35:     score = 5 + (pct - 25) / 10 * 4
      If pct < 25:           score = pct / 25 * 5
      ```
      
      ### Component 3: New Highs vs Lows Score (0-20 points)
      
      ```
      ratio = new_highs / (new_highs + new_lows)  [0 to 1]
      
      If ratio >= 0.83 (5:1):    score = 20
      If 0.75 <= ratio < 0.83:   score = 16 + (ratio - 0.75) / 0.08 * 4
      If 0.67 <= ratio < 0.75:   score = 12 + (ratio - 0.67) / 0.08 * 4
      If 0.50 <= ratio < 0.67:   score = 8 + (ratio - 0.50) / 0.17 * 4
      If 0.33 <= ratio < 0.50:   score = 4 + (ratio - 0.33) / 0.17 * 4
      If ratio < 0.33:           score = ratio / 0.33 * 4
      ```
      
      ### Component 4: Sector Participation Score (0-15 points)
      
      ```
      sectors_up = number of sectors in uptrend (out of 13)
      
      If sectors_up >= 11:      score = 15
      If sectors_up >= 9:       score = 12 + (sectors_up - 9) / 2 * 3
      If sectors_up >= 7:       score = 9 + (sectors_up - 7) / 2 * 3
      If sectors_up >= 5:       score = 6 + (sectors_up - 5) / 2 * 3
      If sectors_up >= 3:       score = 3 + (sectors_up - 3) / 2 * 3
      If sectors_up < 3:        score = sectors_up
      ```
      
      ### Component 5: Nifty Divergence Score (0-15 points)
      
      This is a qualitative component assigned based on the alignment (or divergence) of Nifty trend direction with overall breadth trend:
      
      | Nifty Trend | Breadth Trend | Score | Label |
      |-------------|---------------|-------|-------|
      | Rising | Improving | 15 | Confirmed uptrend |
      | Flat | Improving | 13 | Stealth accumulation |
      | Rising | Flat | 10 | Narrow rally — watch closely |
      | Flat | Flat | 8 | Neutral — no signal |
      | Falling | Improving | 7 | Possible bottom formation |
      | Flat | Declining | 5 | Stealth distribution |
      | Rising | Declining | 3 | BEARISH DIVERGENCE — high risk |
      | Falling | Declining | 2 | Confirmed downtrend |
      
      ### Final Score
      
      ```
      Composite Score = Component1 + Component2 + Component3 + Component4 + Component5
      
      Range: 0-100
      Round to nearest integer
      ```
      
      ### Score Trend
      
      Compare the current composite score to the score from 5 trading days ago:
      
      ```
      Score Delta = Current Score - Score 5 days ago
      ```
      
      | Delta | Trend Label |
      |-------|-------------|
      | > +5 | Improving |
      | -5 to +5 | Stable |
      | < -5 | Deteriorating |
      
      ---
      
      ## Divergence Detection
      
      ### The Most Important Breadth Signal
      
      Divergences between headline index price and underlying breadth are among the most reliable early-warning signals for trend reversals. A bearish divergence does not guarantee a reversal, but it significantly increases the probability that the rally is running on fumes.
      
      ### Bearish Divergence Detection
      
      **Definition:** Nifty 50 is making new highs or holding near highs, but one or more breadth indicators are deteriorating.
      
      **Detection criteria (any one is sufficient to flag, two or more is a strong signal):**
      
      1. **Price-Breadth Divergence:** Nifty 50 within 2% of its 20-day high, but % of stocks above 200 DMA has declined by more than 5 percentage points over the same 20 days.
      
      2. **A/D Line Divergence:** Nifty 50 making a higher high vs. 20 days ago, but the cumulative A/D Line is making a lower high.
      
      3. **New Highs Divergence:** Nifty 50 at or near all-time/recent highs, but the count of new 52-week highs is lower than the count at the previous Nifty high.
      
      4. **Sector Dropout:** Nifty 50 trending up, but 3 or more sectors have dropped below their 50 DMA in the last 10 trading days.
      
      5. **Cap-Tier Split:** Nifty 50 (large cap) making new highs, but Nifty Smallcap 100 is below its 50 DMA.
      
      ### Bullish Divergence Detection
      
      **Definition:** Nifty 50 is making new lows or holding near lows, but breadth indicators are stabilizing or improving.
      
      **Detection criteria:**
      
      1. **Price-Breadth Divergence:** Nifty 50 within 2% of its 20-day low, but % of stocks above 200 DMA has increased by more than 3 percentage points.
      
      2. **A/D Line Divergence:** Nifty 50 making a lower low, but the A/D Line is making a higher low.
      
      3. **New Lows Exhaustion:** Nifty 50 at new lows, but the count of new 52-week lows is lower than at the previous Nifty low (selling exhaustion).
      
      4. **Sector Recovery:** Nifty 50 near lows, but 2 or more sectors have crossed above their 50 DMA in the last 10 days.
      
      ### Divergence Severity Scale
      
      | Level | Condition | Duration | Action |
      |-------|-----------|----------|--------|
      | **Level 1 (Minor)** | 1 indicator diverging | < 1 week | Monitor, no action needed |
      | **Level 2 (Moderate)** | 2 indicators diverging | 1-2 weeks | Tighten stops, stop adding new positions |
      | **Level 3 (Severe)** | 3+ indicators diverging | 2-3 weeks | Reduce exposure by 20-30% |
      | **Level 4 (Extreme)** | All indicators diverging | 3+ weeks | Move to defensive posture (40-60% exposure) |
      
      ---
      
      ## Using Breadth to Time Equity Allocation
      
      ### The Breadth-Based Allocation Framework
      
      Instead of trying to time the market (which is extremely difficult), use breadth to size exposure. Be aggressive when breadth is strong and defensive when it is weak.
      
      ### Health Zones and Recommended Exposure
      
      | Score Range | Zone | Target Equity Allocation | Position Sizing | Strategy Bias |
      |-------------|------|--------------------------|-----------------|---------------|
      | 80-100 | Strong | 90-100% | Full-size positions, add on dips | Momentum, breakout, trend-following |
      | 60-79 | Healthy | 75-90% | Normal-size positions | Mix of momentum and value, selective buying |
      | 40-59 | Neutral | 60-75% | Reduced positions, quality focus | Defensive quality, sector rotation |
      | 20-39 | Weakening | 40-60% | Small positions, large-cap only | Capital preservation, hedging |
      | 0-19 | Critical | 25-40% | Minimal positions, cash-heavy | Contrarian for long-term, defensive for short-term |
      
      ### Transition Rules
      
      **Increasing exposure (cautious approach):**
      - Score must be in the higher zone for 3+ consecutive days before increasing
      - Increase gradually: 10% per week, not all at once
      - Prioritize stocks and sectors with the strongest individual breadth
      - Do not chase — buy on pullbacks within the uptrend
      
      **Decreasing exposure (aggressive approach):**
      - Decrease immediately when score drops to a lower zone (do not wait)
      - Sell weakest positions first (lowest relative strength)
      - Move proceeds to cash, liquid funds, or short-term debt funds
      - Consider hedging remaining positions with index puts
      
      **Emergency protocol:**
      - If score drops more than 15 points in a single week: reduce exposure by one full zone level immediately
      - If A/D ratio goes below 0.5 for 3+ consecutive days: move to Critical zone regardless of composite score
      - If Nifty drops more than 5% in a single session: emergency review, consider halving exposure
      
      ### The "No-Man's Land" Problem
      
      Scores between 45-55 (mid-Neutral zone) are the hardest to act on. The market could go either way. In this zone:
      - Do not make large new commitments
      - Maintain existing positions with tight stops
      - Wait for the score to decisively move above 60 or below 40 before making significant allocation changes
      
      ---
      
      ## Historical Case Studies
      
      ### Case Study 1: 2020 COVID Crash and Recovery — Breadth as Bottoming Signal
      
      **The Crash (February - March 2020):**
      - Feb 20: Nifty at 12,250. Estimated breadth score: ~65 (Healthy). No warnings.
      - Mar 12: Nifty at 9,590. Breadth score collapses to ~15 (Critical). Over 85% of stocks below 200 DMA. A/D ratio < 0.3 for multiple sessions.
      - Mar 23: Nifty at 7,511 (trough). Breadth score: ~5 (Critical). Virtually every stock below every moving average. New 52-week lows: 400+. New highs: 0.
      
      **The Recovery (April - December 2020):**
      - Apr-May: Nifty recovers to 9,500. Breadth score: ~25-30 (Weakening). A/D ratio turns positive (>1.5). New highs reappearing.
      - Jun-Jul: Nifty at 10,500-11,000. Breadth score: ~45-50 (Neutral). 40% of stocks above 200 DMA. 7/13 sectors improving.
      - Aug-Oct: Nifty at 11,500-12,000. Breadth score: ~60-65 (Healthy). Broad participation returning.
      - Nov-Dec: Nifty at 13,000-14,000. Breadth score: ~75 (Healthy/Strong). 65%+ above 200 DMA. All sectors participating.
      
      **Key lesson:** The extreme Critical reading in March 2020 was itself a contrarian signal. When breadth is at absolute extremes (score < 10), the probability of a reversal is high. Traders who began gradually increasing exposure when the breadth score moved from Critical to Weakening (April 2020) captured the strongest part of the recovery.
      
      ### Case Study 2: 2021 Broad Bull Market — Breadth Confirmation
      
      **The Rally (January - October 2021):**
      - Jan-Mar 2021: Nifty 14,000-15,000. Breadth score: ~70-80 (Healthy to Strong). Midcaps and smallcaps outperforming. 10-11/13 sectors in uptrend.
      - Apr-Jun 2021: Brief correction to 14,400 then recovery. Breadth briefly dipped to 55-60 but recovered quickly.
      - Jul-Sep 2021: Nifty 15,500-17,500. Breadth score: 80+ (Strong). This was one of the broadest participation markets in NSE history. Over 70% of stocks above 200 DMA.
      - Oct 2021: Nifty peaks at 18,600.
      
      **But the divergence:**
      - At the Nifty peak of 18,600, midcap and smallcap indices had already peaked in September
      - New 52-week highs were declining even as Nifty made new highs
      - Only 7/13 sectors participating (down from 11/13 in August)
      - Breadth score had dropped from 85+ to ~70 even as Nifty made new highs
      - **This was a classic bearish divergence**
      
      **What followed:** Nifty corrected 15% from Oct 2021 to Jun 2022. Midcaps and smallcaps corrected 20-25%.
      
      **Key lesson:** The breadth score correctly confirmed the 2021 bull rally (high scores throughout) and then warned of the top via divergence (falling scores while Nifty made new highs). Traders who reduced exposure when the divergence appeared would have avoided significant losses.
      
      ### Case Study 3: 2022 Selective Market — Narrow Breadth Warning
      
      **The Setup (June - December 2022):**
      - Nifty recovered from 15,200 (June low) to 18,800 (December)
      - This looked like a strong recovery on the index level
      - But breadth told a different story:
        - Only 40-50% of stocks above 200 DMA throughout the rally
        - A/D ratio averaging only 1.1-1.3 (marginally positive)
        - Rally concentrated in specific themes: Adani Group stocks, select PSUs, defense sector
        - IT, pharma, and FMCG lagging significantly
        - Estimated breadth score: 40-55 (Neutral) throughout — never reaching Healthy
      
      **Key lesson:** A narrow rally can still take the index higher (Nifty gained 24% from June to December), but the breadth framework correctly identified it as fragile. Traders maintaining 60-75% exposure (per Neutral zone guidance) participated in the upside while limiting risk.
      
      ---
      
      ## India-Specific Considerations
      
      ### F&O Expiry Effects on Breadth
      
      Weekly expiry (Thursday) and monthly expiry (last Thursday of the month) can distort breadth readings:
      
      - **Expiry-day impact:** Delta-hedging by market makers and unwinding of positions can cause artificial price moves in F&O stocks, distorting the A/D ratio.
      - **Monthly expiry:** More significant distortion as all stock F&O contracts expire. High open interest stocks can see sharp moves.
      - **Recommendation:** Use the 5-day average A/D ratio instead of single-day readings. When analyzing expiry-day breadth, compare to the same day in the previous non-expiry week.
      
      ### Budget Day (February 1)
      
      - Extreme single-day breadth swings based on sector-specific announcements
      - Infra, defense, agriculture, and housing sectors are most affected
      - Budget-day breadth is event-driven, not trend-driven
      - **Recommendation:** Do not change regime classification based on budget-day reading alone. Use pre-budget and post-budget (3+ days later) readings for regime assessment.
      
      ### RBI Monetary Policy Days
      
      - Typically 6 announcements per year (bi-monthly)
      - Rate decisions and stance changes affect banking and NBFC breadth disproportionately
      - **Recommendation:** Note the event context. Evaluate banking sector breadth separately on policy days. Wait 2-3 days for the impact to settle before updating the composite score.
      
      ### FII/DII Flow Dynamics
      
      - **FII selling pressure:** FIIs are the largest holders of Nifty 50 stocks. Heavy FII selling (Rs 2,000+ Cr/day) initially hits large-cap breadth while mid/small-caps may hold up (supported by DII buying).
      - **DII floor:** Monthly SIP flows into mutual funds (Rs 20,000+ Cr/month as of 2024-2025) provide structural support for mid and small caps. This has created a "DII put" that limits breadth deterioration in the broader market.
      - **Signal interpretation:** When FII selling is heavy but overall breadth remains resilient, it often precedes a snapback rally once FII selling exhausts. When both FII and DII are selling, expect a broad breadth collapse.
      
      ### Monsoon Season (June-September)
      
      - Monsoon performance affects agriculture, rural consumption, FMCG rural sales, and agri-input sectors
      - **Good monsoon:** FMCG, fertilizer, tractor/farm equipment, and rural banking stocks participate — adds to breadth
      - **Weak/delayed monsoon:** These sectors lag — breadth narrows, especially in the broader Nifty 500
      - **Recommendation:** Track monsoon progress (IMD data) and adjust expectations for FMCG/agri sector participation accordingly.
      
      ### IPO Market as Leading Indicator
      
      - A vibrant IPO market (many listings, high subscription rates, listing-day gains of 20%+) correlates with broad market risk appetite and healthy breadth
      - IPO drought or discount listings correlate with weak breadth and risk-off sentiment
      - Surge in SME IPOs with extreme oversubscription (100x+) can signal speculative excess — often a late-stage breadth indicator
      
      ### SEBI Regulatory Actions
      
      - SEBI's stress testing directive for small-cap mutual funds (2024) caused episodic breadth disruption in small-cap tier
      - Mutual fund categorization rules create structural flows between market cap tiers
      - ASM (Additional Surveillance Measure) and GSM (Graded Surveillance Measure) actions on specific stocks can affect new highs/lows counts
      - **Recommendation:** Flag regulatory-driven breadth changes separately from organic market-driven changes. These are typically short-lived (1-2 weeks).
      
      ### Seasonal and Calendar Patterns
      
      | Period | Effect on Breadth | Notes |
      |--------|------------------|-------|
      | April (FY start) | Fresh fund allocation, often positive breadth | Mutual funds deploy year-start capital |
      | June-Sept (Monsoon) | Mixed, agri-dependent sectors affected | Track IMD monsoon data |
      | October (Diwali) | Positive sentiment, Muhurat trading session | Token buying, often positive day |
      | January (Budget anticipation) | Sector rotation based on budget expectations | Pre-budget positioning |
      | March (FY end) | Tax-loss harvesting, forced selling in small-caps | Distorted breadth readings |
      
  • SKILL.md 13.4 KB
    ---
    name: india-market-breadth
    description: >
      Analyze Indian market breadth health using advance/decline data, stocks above moving averages,
      new highs/lows, and sector participation. Use when assessing rally quality, market participation
      width, or equity exposure levels for NSE/BSE.
    ---
    
    # India Market Breadth Analyzer
    
    ## Purpose
    
    Market breadth measures how broadly a rally or decline is distributed across the market. A healthy market has broad participation — many stocks and sectors moving in the same direction. A narrow market, where only a few large-cap stocks are driving the index, is fragile and prone to reversal.
    
    This skill provides a systematic framework to assess NSE/BSE breadth health, score it on a 0-100 composite scale, and translate it into actionable equity exposure recommendations.
    
    ---
    
    ## Data Sources
    
    ### Primary Sources
    
    | Data Point | Source | Method |
    |------------|--------|--------|
    | Advance/Decline counts | NSE website / Web search | `WebSearch` for "NSE advance decline data today" |
    | Stocks above 200 DMA | Market screeners / Web search | `WebSearch` for "stocks above 200 DMA NSE" |
    | Stocks above 50 DMA | Market screeners / Web search | `WebSearch` for "stocks above 50 DMA NSE" |
    | New 52-week highs | Groww MCP | `fetch_market_movers_and_trending_stocks_funds` with `YEARLY_HIGH` filter |
    | New 52-week lows | Groww MCP | `fetch_market_movers_and_trending_stocks_funds` with `YEARLY_LOW` filter |
    | Sector performance | Groww MCP | `get_ltp` for sector indices (Nifty IT, Bank Nifty, Nifty Pharma, etc.) |
    | Nifty 50 level | Groww MCP | `get_ltp` for NIFTY |
    | Top gainers/losers | Groww MCP | `fetch_market_movers_and_trending_stocks_funds` with `TOP_GAINERS` / `TOP_LOSERS` |
    
    ### Broker MCP Tools Used
    
    Use whichever broker MCP is connected (Groww or Zerodha Kite):
    
    **Groww MCP (if connected):**
    1. **`fetch_market_movers_and_trending_stocks_funds`** — Core tool for yearly highs/lows counts, top gainers/losers, volume data
    2. **`get_ltp`** — Get live prices for Nifty, Bank Nifty, sector indices
    3. **`fetch_historical_candle_data`** — Historical data for trend analysis
    4. **`get_historical_technical_indicators`** — Calculate moving averages for breadth assessment
    5. **`fetch_technical_screener`** — Screen for stocks by technical criteria (RSI, MACD, etc.)
    6. **`fetch_fundamentals_screener`** — Natural language screening for market-cap based analysis
    
    **Zerodha Kite MCP (if connected):**
    1. **`get_ltp`** — Live prices for Nifty, Bank Nifty, sector indices
    2. **`get_quotes`** — Real-time quotes with market depth
    3. **`get_ohlc`** — OHLC data for indices and stocks
    4. **`get_historical_data`** — Historical candle data for trend analysis
    5. **`search_instruments`** — Search for instruments by name
    
    ---
    
    ## Workflow
    
    ### Step 1: Fetch NSE Advance/Decline Data
    
    Use web search to get NSE advance/decline data:
    ```
    WebSearch: "NSE advance decline ratio today"
    WebSearch: "NSE market breadth today advances declines"
    ```
    
    Key data points needed:
    - Number of advances (stocks that closed higher)
    - Number of declines (stocks that closed lower)
    - Number of unchanged
    - Total traded stocks
    
    ### Step 2: Calculate Breadth Indicators
    
    #### A/D Ratio
    ```
    A/D Ratio = Number of Advances / Number of Declines
    
    Interpretation:
      > 2.0:  Strong breadth (broad rally)
      1.5-2.0: Healthy breadth
      1.0-1.5: Neutral
      0.7-1.0: Weak breadth
      < 0.7:  Very weak (broad selling)
    ```
    
    #### A/D Line (Cumulative)
    ```
    A/D Line = Previous A/D Line + (Advances - Declines)
    
    Rising A/D Line + Rising Nifty = Confirmed uptrend
    Falling A/D Line + Rising Nifty = DIVERGENCE (warning)
    Rising A/D Line + Falling Nifty = Accumulation (bullish)
    Falling A/D Line + Falling Nifty = Confirmed downtrend
    ```
    
    #### McClellan Oscillator Concept
    ```
    A/D Difference = Advances - Declines
    19-day EMA of A/D Difference (fast)
    39-day EMA of A/D Difference (slow)
    McClellan Oscillator = 19-day EMA - 39-day EMA
    
    > 0:  Bullish breadth momentum
    < 0:  Bearish breadth momentum
    > +50: Overbought breadth
    < -50: Oversold breadth
    ```
    
    ### Step 3: Assess % of Stocks Above 200 DMA and 50 DMA
    
    Use web search or screener tools:
    ```
    WebSearch: "percentage of NSE stocks above 200 day moving average"
    ```
    
    Or use Groww MCP technical screener to estimate:
    ```
    fetch_technical_screener with various SMA/EMA filters
    ```
    
    #### Key Thresholds
    
    | Metric | Bullish | Neutral | Bearish |
    |--------|---------|---------|---------|
    | % above 200 DMA | > 60% | 40-60% | < 40% |
    | % above 50 DMA | > 55% | 35-55% | < 35% |
    | % above 20 DMA | > 50% | 30-50% | < 30% |
    
    ### Step 4: Count New 52-Week Highs vs Lows (via Groww MCP)
    
    Use Groww MCP tools:
    ```python
    # Fetch stocks hitting yearly highs
    fetch_market_movers_and_trending_stocks_funds(
        discovery_filter_types=["YEARLY_HIGH"],
        size=20
    )
    
    # Fetch stocks hitting yearly lows
    fetch_market_movers_and_trending_stocks_funds(
        discovery_filter_types=["YEARLY_LOW"],
        size=20
    )
    ```
    
    #### Interpretation
    
    | Highs:Lows Ratio | Signal |
    |-------------------|--------|
    | > 5:1 | Strong bullish breadth |
    | 2:1 to 5:1 | Healthy bullish breadth |
    | 1:1 to 2:1 | Neutral / transitioning |
    | 0.5:1 to 1:1 | Bearish breadth |
    | < 0.5:1 | Strong bearish breadth |
    
    ### Step 5: Score Breadth Health (0-100 Composite)
    
    The composite score is calculated from 5 components:
    
    | # | Component | Weight | Max Points | Source |
    |---|-----------|--------|------------|--------|
    | 1 | Advance/Decline Ratio | 25% | 25 | NSE A/D data |
    | 2 | Stocks Above 200 DMA | 25% | 25 | Screener data |
    | 3 | New Highs vs Lows | 20% | 20 | Groww MCP YEARLY_HIGH/LOW |
    | 4 | Sector Participation | 15% | 15 | Sector index performance |
    | 5 | Nifty Divergence | 15% | 15 | Nifty vs breadth comparison |
    
    #### Component 1: Advance/Decline Ratio Score (0-25)
    
    | A/D Ratio | Score |
    |-----------|-------|
    | > 3.0 | 25 |
    | 2.5 - 3.0 | 22-25 |
    | 2.0 - 2.5 | 19-22 |
    | 1.5 - 2.0 | 15-19 |
    | 1.2 - 1.5 | 12-15 |
    | 1.0 - 1.2 | 8-12 |
    | 0.7 - 1.0 | 4-8 |
    | 0.5 - 0.7 | 2-4 |
    | < 0.5 | 0-2 |
    
    Also consider the 5-day and 20-day trend of A/D ratio:
    - Improving trend: +2 bonus points
    - Deteriorating trend: -2 penalty points
    
    #### Component 2: Stocks Above 200 DMA Score (0-25)
    
    | % Above 200 DMA | Score |
    |------------------|-------|
    | > 75% | 25 |
    | 65-75% | 21-25 |
    | 55-65% | 17-21 |
    | 45-55% | 13-17 |
    | 35-45% | 9-13 |
    | 25-35% | 5-9 |
    | < 25% | 0-5 |
    
    #### Component 3: New Highs vs Lows Score (0-20)
    
    | Highs:Lows Ratio | Score |
    |-------------------|-------|
    | > 5:1 | 20 |
    | 3:1 - 5:1 | 16-20 |
    | 2:1 - 3:1 | 12-16 |
    | 1:1 - 2:1 | 8-12 |
    | 0.5:1 - 1:1 | 4-8 |
    | < 0.5:1 | 0-4 |
    
    #### Component 4: Sector Participation Score (0-15)
    
    Count how many of the 13 major Nifty sectors are in an uptrend (above their 50 DMA or showing positive 1-month return):
    
    **13 Key NSE Sectors:**
    1. Nifty Bank
    2. Nifty IT
    3. Nifty Pharma
    4. Nifty FMCG
    5. Nifty Auto
    6. Nifty Metal
    7. Nifty Realty
    8. Nifty Energy
    9. Nifty Infrastructure
    10. Nifty PSU Bank
    11. Nifty Private Bank
    12. Nifty Media
    13. Nifty Financial Services
    
    | Sectors in Uptrend | Score |
    |--------------------|-------|
    | 11-13 | 15 |
    | 9-10 | 12-14 |
    | 7-8 | 9-11 |
    | 5-6 | 6-8 |
    | 3-4 | 3-5 |
    | 0-2 | 0-2 |
    
    #### Component 5: Nifty Divergence Score (0-15)
    
    This measures whether index performance aligns with underlying breadth.
    
    | Scenario | Score |
    |----------|-------|
    | Nifty rising + breadth improving | 15 (confirmed uptrend) |
    | Nifty flat + breadth improving | 13 (stealth accumulation) |
    | Nifty rising + breadth flat | 10 (narrow rally, watch closely) |
    | Nifty flat + breadth flat | 8 (neutral, no signal) |
    | Nifty flat + breadth declining | 5 (stealth distribution) |
    | Nifty rising + breadth declining | 3 (BEARISH DIVERGENCE — high risk) |
    | Nifty falling + breadth declining | 2 (confirmed downtrend) |
    | Nifty falling + breadth improving | 7 (possible bottom formation) |
    
    ### Step 6: Map to Equity Exposure Recommendation
    
    #### Health Zones
    
    | Score Range | Zone | Equity Exposure | Action |
    |-------------|------|----------------|--------|
    | **80-100** | Strong | 90-100% | Full equity allocation. Market has broad participation. Deploy fresh capital. |
    | **60-79** | Healthy | 75-90% | Normal allocation. Monitor for deterioration. Favor broad-based positions. |
    | **40-59** | Neutral | 60-75% | Cautious allocation. Focus on strong sectors only. Reduce mid/small-cap exposure. |
    | **20-39** | Weakening | 40-60% | Defensive allocation. Shift to large-caps and quality. Raise cash on rallies. |
    | **0-19** | Critical | 25-40% | Maximum defense. High cash/debt allocation. Only hold strongest positions. Potential capitulation zone. |
    
    #### Exposure Adjustment Rules
    
    1. **Score improving for 5+ days:** Can increase exposure by one zone level
    2. **Score deteriorating for 5+ days:** Decrease exposure by one zone level
    3. **Score drops >15 points in a week:** Emergency review — consider reducing exposure immediately
    4. **Score rises >15 points in a week:** Wait for confirmation (3+ days) before increasing
    
    ### Step 7: Generate Report
    
    Use the template from `assets/breadth_report_template.md` to produce a structured report. Include:
    
    1. Composite score and health zone
    2. All 5 component scores with supporting data
    3. Trend direction (improving/deteriorating)
    4. Equity exposure recommendation
    5. Divergence analysis
    6. Historical context
    7. Disclaimer
    
    ---
    
    ## Quick Reference: NSE Sector Indices
    
    Use these symbols with `get_ltp` for sector breadth assessment:
    
    | Sector | Symbol | Approx Constituents |
    |--------|--------|-------------------|
    | Bank Nifty | NIFTY BANK | 12 banks |
    | Nifty IT | NIFTY IT | 10 IT companies |
    | Nifty Pharma | NIFTY PHARMA | 20 pharma companies |
    | Nifty FMCG | NIFTY FMCG | 15 FMCG companies |
    | Nifty Auto | NIFTY AUTO | 15 auto companies |
    | Nifty Metal | NIFTY METAL | 15 metal companies |
    | Nifty Realty | NIFTY REALTY | 10 realty companies |
    | Nifty Energy | NIFTY ENERGY | 10 energy companies |
    | Nifty Infra | NIFTY INFRA | 30 infra companies |
    | Nifty PSU Bank | NIFTY PSU BANK | 12 PSU banks |
    | Nifty Pvt Bank | NIFTY PVT BANK | 10 private banks |
    | Nifty Media | NIFTY MEDIA | 14 media companies |
    | Nifty Fin Service | NIFTY FIN SERVICE | 20 financial companies |
    
    ---
    
    ## Example Breadth Assessment
    
    ```
    Date: 2025-03-10
    
    COMPONENT SCORES:
      1. A/D Ratio: 1.8 (5-day avg: 1.5)          -> Score: 17/25
      2. Stocks above 200 DMA: ~55%                 -> Score: 17/25
      3. New Highs:Lows: 85:25 (3.4:1)             -> Score: 16/20
      4. Sectors in uptrend: 9/13                   -> Score: 12/15
      5. Nifty rising + breadth flat                -> Score: 10/15
    
      COMPOSITE SCORE: 72/100
      HEALTH ZONE: Healthy
      EQUITY EXPOSURE: 75-90%
    
    RECOMMENDATION:
      Market breadth is healthy with broad participation. 9 of 13 sectors are
      in uptrend. A/D ratio has been above 1.0 for the past week. However,
      Nifty is making new highs while breadth is flat — watch for divergence.
      Maintain normal equity allocation but be ready to reduce if breadth
      starts deteriorating.
    ```
    
    ---
    
    ## Divergence Detection — The Most Important Signal
    
    ### What is Breadth Divergence?
    
    When the Nifty 50 makes a new high but breadth indicators do not confirm, it signals that the rally is narrowing. This is the single most important breadth signal for risk management.
    
    ### How to Detect
    
    1. **Nifty at 52-week high BUT** advance/decline ratio < 1.5
    2. **Nifty at 52-week high BUT** fewer new 52-week highs than at the previous Nifty high
    3. **Nifty at 52-week high BUT** % above 200 DMA is declining
    4. **Nifty at 52-week high BUT** fewer sectors participating than at previous high
    
    ### Historical Examples (Indian Market)
    
    | Date | Nifty Level | Breadth Signal | What Happened |
    |------|-------------|---------------|---------------|
    | Oct 2021 | All-time high (18,600) | Midcap/smallcap already correcting | Nifty corrected 15% by Jun 2022 |
    | Jan 2018 | All-time high (11,170) | Only large-caps rallying, midcaps weak | Midcap/smallcap correction of 30-40% through 2018 |
    | Jan 2008 | All-time high (21,200, Sensex) | Breadth divergence from Sep 2007 | Market crashed 60% by Oct 2008 |
    
    ### Action on Divergence
    
    | Divergence Duration | Action |
    |--------------------|--------|
    | 1-3 days | Monitor — could be noise |
    | 1-2 weeks | Start tightening stops, reduce weakest positions |
    | 3-4 weeks | Reduce overall exposure by one zone level |
    | 1+ month | Significant risk — move to defensive posture |
    
    ---
    
    ## India-Specific Nuances
    
    - **F&O Expiry Effects:** Weekly and monthly F&O expiry Thursdays can distort breadth readings due to derivatives-related hedging and unwinding. Flag expiry-day breadth readings and consider using the non-expiry-day average for comparison.
    - **Budget and RBI Policy Weeks:** Union Budget day and RBI monetary policy announcement days create abnormal breadth swings. Note these as event-driven rather than trend-driven.
    - **FII/DII Flow Correlation:** Sustained FII selling often narrows breadth from the large-cap end first, while DII buying may support mid/small caps, creating a cap-tier divergence.
    - **SEBI Regulatory Impact:** Regulations like small-cap mutual fund stress tests can cause episodic breadth disruptions in the small-cap tier — these are flow-driven, not fundamental.
    - **IPO Market as Breadth Proxy:** A hot IPO market (high subscription rates, listing gains) often correlates with broad market risk appetite. A freeze in IPO activity can signal breadth contraction ahead.
    
    ---
    
    ## Files in This Skill
    
    - `references/breadth_methodology.md` — Comprehensive breadth analysis methodology for Indian markets
    - `assets/breadth_report_template.md` — Structured report template for breadth analysis output
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related