Claude Skill

india-news-tracker

Track and analyze Indian stock market news, corporate announcements, SEBI circulars, bulk/block deals, and earnings calendars. Auto-fetches headlines from MoneyControl, Economic Times, LiveMint, BSE/NSE filings. Use when the user asks about recent news, corporate actions, upcomin

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

Full trust report

Download ajeeshworkspace-indian-trading-skills-skills_india-news-tracker-dc44698.zip · 24 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-news-tracker
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 News Tracker

Overview

This skill fetches, categorizes, scores, and summarizes Indian market news from multiple sources. It tracks corporate announcements, SEBI circulars, bulk/block deals, insider trades, earnings calendars, and breaking market news — then feeds actionable insights to the user or other skills (like Scenario Analyzer).

Architecture

Skill (Orchestrator)
├── Phase 1: News Collection
│   ├── Web search across Indian financial media
│   ├── BSE/NSE corporate filings
│   ├── Regulatory circulars (SEBI, RBI)
│   └── Bulk/block deal data
├── Phase 2: Processing
│   ├── Categorize by event type
│   ├── Score market impact (1-10)
│   ├── Tag affected sectors and stocks
│   └── Detect sentiment (bullish/bearish/neutral)
├── Phase 3: Analysis
│   ├── Identify top movers from news
│   ├── Cross-reference with price action (via broker MCP)
│   ├── Flag earnings surprises and guidance changes
│   └── Detect theme clusters
└── Phase 4: Report
    ├── Daily briefing format
    ├── Stock-specific news digest
    ├── Sector news roundup
    └── Actionable alerts

News Source Priority

Use web search to fetch news from these sources, in order of reliability:

Tier 1 — Official / Regulatory (Highest Priority)

Source What to Fetch Search Query Pattern
BSE India (bseindia.com) Corporate announcements, board meeting outcomes, results site:bseindia.com [company] announcement
NSE India (nseindia.com) Bulk deals, block deals, insider trades, F&O ban list site:nseindia.com [topic]
SEBI (sebi.gov.in) Circulars, new regulations, enforcement orders site:sebi.gov.in circular 2026
RBI (rbi.org.in) Monetary policy, banking regulations, forex data site:rbi.org.in [topic]

Tier 2 — Financial Media (Primary News)

Source Strength Search Query Pattern
MoneyControl Fastest Indian market news, earnings analysis site:moneycontrol.com [topic]
Economic Times Markets Corporate news, policy analysis site:economictimes.indiatimes.com markets [topic]
LiveMint Policy, macro, premium analysis site:livemint.com [topic]
Business Standard In-depth corporate and policy coverage site:business-standard.com [topic]

Tier 3 — Supplementary

Source Strength Search Query Pattern
NDTV Profit Quick market updates site:ndtvprofit.com [topic]
Trendlyne Technicals, bulk deals, DII/FII data site:trendlyne.com [topic]
Screener.in Financials, results calendar site:screener.in [topic]
Tijori Finance Earnings summaries, sector data site:tijorifinance.com [topic]

Tier 4 — Social / Real-time Sentiment

Source Strength Search Query Pattern
X/Twitter Breaking news, market sentiment site:x.com [topic] NSE OR BSE
Reddit (ISB) Retail sentiment, trading ideas site:reddit.com/r/IndianStreetBets [topic]

Broker MCP Integration

Use broker MCP tools to cross-reference news with live market data:

Groww MCP (if connected)

  • fetch_market_movers_and_trending_stocks_funds with STOCKS_IN_NEWS — stocks currently in news
  • get_ltp — check price reaction to news
  • fetch_historical_candle_data — verify price movement post-announcement
  • fetch_stocks_fundamental_data — earnings data to compare with announced results
  • fetch_market_movers_and_trending_stocks_funds with VOLUME_SHOCKERS — abnormal volume (often news-driven)
  • resolve_market_time_and_calendar — trading day context

Zerodha Kite MCP (if connected)

  • get_ltp — last traded price for news impact verification
  • get_quotes — real-time quotes with depth
  • get_historical_data — price history for post-news analysis
  • search_instruments — resolve company names to trading symbols

No Broker Available

  • Use web search for all data (MoneyControl, Google Finance for prices)
  • yfinance as fallback for historical price data

Workflow

Mode 1: Daily Market Briefing

Trigger: "What's the market news today?", "Daily briefing", "Morning update", "What happened in markets today?"

Steps:

  1. Determine market context

    • Call resolve_market_time_and_calendar to get current date and market status
    • If market is closed, note it and provide previous day's wrap + upcoming catalysts
  2. Fetch top market news (run searches in parallel)

    WebSearch: "Indian stock market news today [date]"
    WebSearch: "NSE BSE market update today [date]"
    WebSearch: "site:moneycontrol.com market news today"
    WebSearch: "site:economictimes.indiatimes.com stock market today"
    
  3. Fetch stocks in news (if broker MCP available)

    Groww: fetch_market_movers_and_trending_stocks_funds(["STOCKS_IN_NEWS"])
    Groww: fetch_market_movers_and_trending_stocks_funds(["VOLUME_SHOCKERS"])
    Groww: fetch_market_movers_and_trending_stocks_funds(["TOP_GAINERS", "TOP_LOSERS"])
    
  4. Fetch regulatory updates

    WebSearch: "SEBI circular [current month] [year]"
    WebSearch: "RBI announcement today [date]"
    
  5. Fetch corporate actions

    WebSearch: "corporate actions NSE [date] ex-date dividend bonus split"
    WebSearch: "board meeting results today NSE BSE"
    
  6. Categorize each news item using the Event Classification table below

  7. Score market impact for each news item (1-10 scale, see Scoring Framework)

  8. Cross-reference with price action

    • For top 5-10 news items, check stock price movement using get_ltp
    • Flag significant gaps or volume spikes matching news
  9. Generate Daily Briefing using assets/daily_briefing_template.md


Mode 2: Stock-Specific News

Trigger: "News about Reliance", "What's happening with TCS?", "Any announcements from HDFC Bank?"

Steps:

  1. Resolve the company symbol

    • Use curate_symbols or search_instruments to get the correct trading symbol
  2. Fetch company-specific news (parallel searches)

    WebSearch: "[company name] stock news [current month] [year]"
    WebSearch: "site:moneycontrol.com [company name] [year]"
    WebSearch: "site:bseindia.com [company name] announcement"
    WebSearch: "[company name] quarterly results [year]"
    WebSearch: "[company name] corporate action dividend bonus split"
    
  3. Fetch fundamental context

    Groww: fetch_stocks_fundamental_data(company, view='stats_only')
    Groww: get_ltp([company])
    
  4. Check for recent price impact

    Groww: fetch_historical_candle_data(symbol, last 30 days, daily)
    
  5. Compile and present categorized news with impact scores

  6. Highlight actionable items:

    • Upcoming earnings dates
    • Pending corporate actions (ex-dates)
    • Regulatory changes affecting the company
    • Management changes or M&A activity
    • Insider trading activity

Mode 3: Sector News Roundup

Trigger: "What's happening in banking sector?", "IT sector news", "Pharma sector update"

Steps:

  1. Map sector to NSE sectoral index and constituent stocks

    • See references/sector_mapping.md for sector → index → stocks mapping
  2. Fetch sector-specific news (parallel searches)

    WebSearch: "[sector] sector India stock market [current month] [year]"
    WebSearch: "site:moneycontrol.com [sector] sector India"
    WebSearch: "[sector] policy regulation India [year]"
    
  3. Fetch sector movers (if Groww MCP connected)

    Groww: fetch_market_movers_and_trending_stocks_funds(sector-specific filters)
    Groww: fetch_technical_screener(sector filter)
    
  4. Identify sector themes:

    • Policy/regulatory changes (e.g., banking NPA norms, pharma FDA)
    • Earnings trend across sector
    • FII/DII sector rotation signals
    • Commodity input cost changes
  5. Present sector roundup with:

    • Top 3-5 sector headlines
    • Sector index performance
    • Notable stock moves within sector
    • Upcoming sector catalysts

Mode 4: Earnings Tracker

Trigger: "Upcoming earnings", "Results calendar", "Who's reporting this week?", "How were [company] results?"

Steps:

  1. Fetch earnings calendar

    WebSearch: "NSE BSE quarterly results schedule [current month] [year]"
    WebSearch: "site:trendlyne.com earnings calendar"
    WebSearch: "board meeting intimate NSE [date range]"
    
  2. For upcoming earnings, present:

    | Company | Date | Quarter | Analyst Estimate | Previous Quarter |
    
  3. For reported earnings, fetch and analyze:

    WebSearch: "[company] quarterly results Q[x] FY[xx]"
    Groww: fetch_stocks_fundamental_data(company, view='financials_only')
    
  4. Earnings analysis includes:

    • Revenue vs estimate (beat/miss/inline)
    • PAT vs estimate
    • Margin expansion/compression
    • Management guidance highlights
    • YoY and QoQ growth rates
    • Stock price reaction post-results

Mode 5: Corporate Actions Tracker

Trigger: "Upcoming dividends", "Stock splits this month", "Bonus shares", "Corporate actions"

Steps:

  1. Fetch corporate actions calendar

    WebSearch: "NSE corporate actions [current month] [year] ex-date"
    WebSearch: "upcoming dividend ex-date NSE [month] [year]"
    WebSearch: "stock split bonus issue NSE BSE [year]"
    
  2. Present corporate actions organized by type:

    Dividends:

    | Company | Type | Amount (Rs.) | Ex-Date | Record Date |
    

    Bonus Issues:

    | Company | Ratio | Ex-Date | Record Date |
    

    Stock Splits:

    | Company | From FV | To FV | Ex-Date |
    

    Rights Issues:

    | Company | Ratio | Price (Rs.) | Open Date | Close Date |
    

Mode 6: Bulk/Block Deal Monitor

Trigger: "Bulk deals today", "Block deals", "Who's buying/selling large quantities?"

Steps:

  1. Fetch bulk/block deal data

    WebSearch: "NSE bulk deals today [date]"
    WebSearch: "BSE block deals today [date]"
    WebSearch: "site:nseindia.com bulk deals"
    WebSearch: "site:trendlyne.com bulk deals"
    
  2. Analyze and present:

    | Stock | Deal Type | Buyer/Seller | Quantity | Price (Rs.) | % of Equity |
    
  3. Flag significant deals:

    • Promoter buying/selling
    • FII/DII bulk transactions
    • PE fund entries/exits
    • Deals > 1% of equity

Mode 7: Regulatory & Policy Monitor

Trigger: "SEBI updates", "RBI policy impact", "New regulations", "Policy changes"

Steps:

  1. Fetch regulatory updates

    WebSearch: "SEBI circular [current month] [year] new regulation"
    WebSearch: "RBI monetary policy [current month] [year]"
    WebSearch: "India financial regulation change [year]"
    
  2. Categorize by impact:

    • Market-wide: F&O margin changes, STT changes, settlement cycle changes
    • Sector-specific: Banking NPA norms, insurance regulations, telecom spectrum
    • Company-specific: SEBI enforcement, listing requirements
  3. Assess impact and affected stocks/sectors


Event Classification

Categorize every news item into one of these categories:

Category Examples Typical Impact
Earnings Quarterly results, annual results, earnings surprise High (on specific stock)
Corporate Action Dividend, bonus, split, buyback, rights issue Medium (on specific stock)
M&A Merger, acquisition, demerger, stake sale High (on involved companies)
Management CEO change, board reshuffle, key hire/exit Medium
Regulatory SEBI order, RBI circular, govt policy Medium-High (sector-wide)
Institutional FII/DII flow data, bulk/block deals, MF holdings Medium
Sector Industry trend, commodity price, global peer news Medium
Macro GDP data, inflation, IIP, PMI, trade deficit Medium-High (market-wide)
Global Fed decision, US markets, crude oil, China data Medium-High
IPO New filing, listing, subscription data Medium (on IPO stock)
Legal Court order, NCLT, arbitration, penalty Variable
Rating Analyst upgrade/downgrade, target price change Medium
Insider Promoter buy/sell, SAST disclosure, pledge change Medium-High
ESG Environmental violation, governance issue, social impact Low-Medium

Impact Scoring Framework

Score each news item on a 1-10 scale:

Score Label Criteria Example
9-10 Critical Market-wide impact, will move indices RBI emergency rate cut, SEBI bans F&O
7-8 High Sector-wide or large-cap stock impact Major M&A, earnings shock on Nifty 50 stock
5-6 Medium Significant for specific stocks Mid-cap earnings beat, analyst upgrade
3-4 Low Limited impact, FYI value Minor corporate action, routine filing
1-2 Noise Background info, no trading signal Industry conference, routine compliance

Scoring Adjustments:

  • +1 if the stock is in Nifty 50 or Bank Nifty
  • +1 if unexpected (vs market expectations)
  • +1 if involves promoter/insider activity
  • -1 if already priced in (market didn't react)
  • -1 if from low-reliability source

Sentiment Classification

For each news item, classify sentiment:

Sentiment Signal Indicators
Bullish 🟢 Earnings beat, upgrade, promoter buying, positive guidance, policy tailwind
Bearish 🔴 Earnings miss, downgrade, promoter selling/pledging, negative guidance, regulatory action
Neutral 🟡 In-line results, routine filing, mixed signals
Ambiguous ⚪ Complex event requiring analysis (e.g., M&A — good for buyer or target?)

Integration with Other Skills

This skill is designed to feed actionable news into other skills:

News Type Feed To How
Major headline / policy event Scenario Analyzer "Analyze: [headline]" → 3 scenarios
Stock earnings / corporate action India Stock Analysis "Analyze [stock] in context of [news]"
Sector rotation signals India Market Breadth Check if breadth confirms sector narrative
FII/DII bulk deal activity FII/DII Flow Tracker "What are institutional flows telling us about [sector]?"
F&O regulatory change Options Strategy Advisor Check strategy impact of rule change
Breakout candidate in news NSE VCP Screener Verify if news stock has VCP setup

Output Guidelines

  • Recency: Always show the most recent news first
  • Source attribution: Every news item must cite the source
  • Timestamp: Include date and time for each item
  • Currency: All amounts in INR (Rs., Cr, L)
  • Fiscal year: Use Indian FY convention (FY25 = April 2024 - March 2025)
  • Trading symbol: Always include NSE symbol alongside company name
  • Market hours context: Note if news came pre-market, during market, or post-market (affects price impact timing)
  • Sentiment icon: Use 🟢/🔴/🟡/⚪ for quick visual scanning
  • Impact score: Show [1-10] score for each significant item

Quality Standards

  • Never present news older than requested timeframe without flagging it
  • Cross-reference breaking news across at least 2 sources before treating as confirmed
  • Distinguish between "rumor/report" and "confirmed announcement"
  • Flag if a news source has known bias or is promotional content
  • Include "price reaction" data when available — news without market reaction context is incomplete
  • Always note the market status (open/closed) when presenting news, as impact timing differs

Error Handling

  • If web search returns no results for a specific source, move to next source in priority
  • If broker MCP is unavailable, proceed with web-only data
  • If a company cannot be resolved, ask user to clarify
  • If market is closed, note the timing context and present previous session's news
  • Always provide at least a basic briefing even if some sources fail

Example Usage

User: "Market news today"

News Tracker:
1. Fetches date context → Thursday, March 12, 2026, market open
2. Parallel web searches across MoneyControl, ET, LiveMint
3. Fetches STOCKS_IN_NEWS via Groww MCP
4. Fetches VOLUME_SHOCKERS for unusual activity
5. Categorizes 15-20 news items
6. Scores each item (1-10)
7. Cross-references top items with LTP for price reaction
8. Generates daily briefing with:
   - Market overview (Nifty, Sensex, Bank Nifty)
   - Top 5 stories with impact scores
   - Stocks in focus (with price change)
   - Upcoming events (earnings, corporate actions)
   - Regulatory updates
   - Global cues for tomorrow

Resources

references/news_source_guide.md

Detailed guide on Indian financial news sources, their strengths, biases, and optimal search patterns.

references/sector_mapping.md

Mapping of NSE sectors to indices, constituent stocks, and relevant news categories.

references/sentiment_patterns.md

Historical patterns of how Indian markets react to different news categories, with lag analysis.

assets/daily_briefing_template.md

Template for the daily market briefing output format.

Files (indian-trading-skills)
  • assets
    • daily_briefing_template.md 4.1 KB
      # Daily Market Briefing Template
      
      ## Usage
      This template defines the output format for daily market briefings. Fill in data from news collection and broker MCP tools.
      
      ---
      
      ## 📊 Market Briefing — [Day], [Date] [Month] [Year]
      
      **Market Status:** [Open / Closed] | **Time:** [HH:MM IST]
      
      ---
      
      ### 🏦 Market Snapshot
      
      | Index | LTP | Change | % Change | Trend |
      |-------|-----|--------|----------|-------|
      | Nifty 50 | [value] | [+/-value] | [+/-x.xx%] | [🟢/🔴] |
      | Sensex | [value] | [+/-value] | [+/-x.xx%] | [🟢/🔴] |
      | Bank Nifty | [value] | [+/-value] | [+/-x.xx%] | [🟢/🔴] |
      | Nifty IT | [value] | [+/-value] | [+/-x.xx%] | [🟢/🔴] |
      | India VIX | [value] | [+/-value] | [+/-x.xx%] | [🟢/🔴] |
      
      **Market Breadth:** [Advances]: [Declines]: [Unchanged] | **A/D Ratio:** [x.xx]
      
      ---
      
      ### 📰 Top Stories (Impact Score ≥ 5)
      
      #### 1. [Headline] — Impact: [X/10] [🟢/🔴/🟡]
      - **Source:** [Source Name] | [Time]
      - **Category:** [Event Classification]
      - **Stocks Affected:** [SYMBOL1] ([+/-x%]), [SYMBOL2] ([+/-x%])
      - **Key Detail:** [1-2 sentence summary of the news and its significance]
      
      #### 2. [Headline] — Impact: [X/10] [🟢/🔴/🟡]
      - **Source:** [Source Name] | [Time]
      - **Category:** [Event Classification]
      - **Stocks Affected:** [SYMBOL1] ([+/-x%]), [SYMBOL2] ([+/-x%])
      - **Key Detail:** [1-2 sentence summary]
      
      #### 3. [Headline] — Impact: [X/10] [🟢/🔴/🟡]
      [Same format]
      
      *(Continue for all stories with impact ≥ 5)*
      
      ---
      
      ### 🔥 Stocks in Focus
      
      | Stock | LTP (Rs.) | Change | Volume vs Avg | News Driver |
      |-------|-----------|--------|--------------|-------------|
      | [SYMBOL] | [value] | [+/-x%] | [x.x]x | [Brief reason] |
      | [SYMBOL] | [value] | [+/-x%] | [x.x]x | [Brief reason] |
      | [SYMBOL] | [value] | [+/-x%] | [x.x]x | [Brief reason] |
      | [SYMBOL] | [value] | [+/-x%] | [x.x]x | [Brief reason] |
      | [SYMBOL] | [value] | [+/-x%] | [x.x]x | [Brief reason] |
      
      ---
      
      ### 📊 Institutional Activity
      
      | Participant | Buy (Rs. Cr) | Sell (Rs. Cr) | Net (Rs. Cr) | Trend |
      |------------|-------------|--------------|-------------|-------|
      | FII/FPI | [value] | [value] | [+/-value] | [🟢/🔴] |
      | DII | [value] | [value] | [+/-value] | [🟢/🔴] |
      
      **FII Derivatives:** [Long/Short ratio], [Change from previous day]
      
      ---
      
      ### 📅 Upcoming Events
      
      **Today / This Week:**
      - [ ] [Company] — Q[x] FY[xx] results ([Date])
      - [ ] [Company] — Board meeting ([Date], [Purpose])
      - [ ] [Company] — Ex-dividend Rs.[amount] ([Date])
      - [ ] [Event] — [Description] ([Date])
      
      **Earnings Calendar (Next 5 Trading Days):**
      
      | Date | Company | Event | Quarter |
      |------|---------|-------|---------|
      | [Date] | [Company] | Results | Q[x] FY[xx] |
      | [Date] | [Company] | Results | Q[x] FY[xx] |
      
      ---
      
      ### 🏢 Corporate Actions (Coming Week)
      
      | Company | Action | Details | Ex-Date | Record Date |
      |---------|--------|---------|---------|-------------|
      | [Company] | Dividend | Rs.[amount] per share | [Date] | [Date] |
      | [Company] | Bonus | [ratio] | [Date] | [Date] |
      | [Company] | Split | FV Rs.[from] → Rs.[to] | [Date] | [Date] |
      
      ---
      
      ### 🔔 Regulatory Updates
      
      - [SEBI/RBI circular summary, if any]
      - [Policy change summary, if any]
      - [F&O ban list changes, if any]
      
      ---
      
      ### 🌍 Global Cues
      
      | Market | Level | Change | Signal |
      |--------|-------|--------|--------|
      | US (S&P 500) | [value] | [+/-x%] | [🟢/🔴] |
      | US (Nasdaq) | [value] | [+/-x%] | [🟢/🔴] |
      | SGX Nifty | [value] | [+/-x%] | [🟢/🔴] |
      | Crude Oil (Brent) | $[value] | [+/-x%] | [🟢/🔴] |
      | USD/INR | [value] | [+/-x%] | [🟢/🔴] |
      | Gold (MCX) | Rs.[value] | [+/-x%] | [🟢/🔴] |
      | US 10Y Yield | [value]% | [+/-bps] | [🟢/🔴] |
      
      ---
      
      ### 📝 Key Takeaways
      
      1. **[Main theme]** — [1 sentence summary]
      2. **[Secondary theme]** — [1 sentence summary]
      3. **[Watch item]** — [1 sentence on what to monitor]
      
      ---
      
      ### ⚠️ Disclaimer
      
      This briefing is for educational and informational purposes only. It does not constitute investment advice. Please consult a SEBI-registered advisor before making investment decisions.
      
      *Generated at [HH:MM IST] on [Date] using India News Tracker skill*
      
  • references
    • news_source_guide.md 5.7 KB
      # Indian Financial News Source Guide
      
      ## Source Reliability & Speed Matrix
      
      | Source | Reliability | Speed | Bias | Best For |
      |--------|------------|-------|------|----------|
      | BSE India (bseindia.com) | ★★★★★ | Medium | None (official) | Corporate filings, results, announcements |
      | NSE India (nseindia.com) | ★★★★★ | Medium | None (official) | Bulk/block deals, F&O data, circulars |
      | SEBI (sebi.gov.in) | ★★★★★ | Slow | None (regulatory) | Regulations, enforcement, circulars |
      | RBI (rbi.org.in) | ★★★★★ | Slow | None (regulatory) | Monetary policy, banking norms, forex |
      | MoneyControl | ★★★★ | Fast | Slight bullish | Breaking news, earnings, market updates |
      | Economic Times | ★★★★ | Fast | Neutral | Corporate news, policy, deep dives |
      | LiveMint | ★★★★ | Medium | Neutral | Premium analysis, policy, macro |
      | Business Standard | ★★★★ | Medium | Neutral | Corporate, banking, policy |
      | NDTV Profit | ★★★ | Fast | Neutral | Quick market updates, interviews |
      | Trendlyne | ★★★★ | Medium | Data-driven | Bulk deals, technicals, earnings calendar |
      | Screener.in | ★★★★ | Slow | Data-driven | Financials, screening, results |
      | Financial Express | ★★★ | Medium | Neutral | Economy, policy, regulation |
      | Reuters India | ★★★★★ | Fast | Neutral | Global macro, major corporate events |
      | Bloomberg Quint | ★★★★ | Fast | Neutral | Premium analysis, global context |
      
      ## Optimal Search Patterns
      
      ### Breaking News (Last 24 hours)
      ```
      "Indian stock market news today"
      "NSE BSE market update [date]"
      "site:moneycontrol.com markets today"
      "site:economictimes.indiatimes.com stock market [date]"
      ```
      
      ### Company-Specific News
      ```
      "[Company Name] NSE stock news [month] [year]"
      "site:moneycontrol.com [Company Name]"
      "site:bseindia.com [BSE Code] announcement"
      "[Company Name] quarterly results [quarter] FY[year]"
      "[Company Name] board meeting outcome"
      ```
      
      ### Sector News
      ```
      "[Sector] sector India stock market [month] [year]"
      "Nifty [Sector Index] news analysis"
      "[Sector] policy regulation India [year]"
      ```
      
      ### Regulatory Updates
      ```
      "SEBI circular [month] [year]"
      "SEBI new regulation [year]"
      "RBI monetary policy [month] [year]"
      "RBI circular banking [year]"
      ```
      
      ### Institutional Activity
      ```
      "FII DII data [date] NSE"
      "bulk deals NSE today [date]"
      "block deals BSE today [date]"
      "promoter buying selling [month] [year]"
      "mutual fund portfolio changes [quarter] [year]"
      ```
      
      ### Earnings & Results
      ```
      "quarterly results schedule NSE [month] [year]"
      "[Company] Q[x] FY[xx] results"
      "earnings surprise India [quarter] [year]"
      "results calendar upcoming NSE BSE"
      ```
      
      ### IPO News
      ```
      "upcoming IPO India [month] [year]"
      "IPO subscription status [company]"
      "IPO listing price [company]"
      "DRHP filing SEBI [year]"
      ```
      
      ### Corporate Actions
      ```
      "dividend ex-date NSE [month] [year]"
      "stock split bonus issue NSE [year]"
      "buyback offer India [year]"
      "rights issue NSE [year]"
      ```
      
      ## Source-Specific Parsing Notes
      
      ### MoneyControl
      - URL pattern: `moneycontrol.com/news/business/markets/`
      - Earnings URL: `moneycontrol.com/news/business/earnings/`
      - Has dedicated earnings calendar section
      - Flash news updates are usually reliable and fast
      - Best for: Real-time market commentary, earnings analysis
      
      ### Economic Times Markets
      - URL pattern: `economictimes.indiatimes.com/markets/stocks/`
      - Has good ETF and MF coverage
      - Policy analysis is particularly strong
      - Best for: Deep corporate stories, policy impact analysis
      
      ### BSE India Filings
      - URL pattern: `bseindia.com/corporates/ann.html`
      - Search by scrip code or company name
      - Categories: Board Meeting, Financial Results, Corporate Action, Shareholding
      - Best for: Official corporate announcements (primary source of truth)
      
      ### NSE India
      - Bulk deals: `nseindia.com/market-data/bulk-deal-data`
      - Block deals: `nseindia.com/market-data/block-deal-data`
      - Insider trades: `nseindia.com/companies-listing/corporate-filings-insider-trading`
      - F&O ban: `nseindia.com/market-data/fno-ban`
      - Best for: Official market data, institutional activity
      
      ### Trendlyne
      - URL pattern: `trendlyne.com/stock-deals/`
      - Has excellent bulk/block deal aggregation
      - Earnings calendar with estimates
      - Best for: Data-driven news, aggregated institutional activity
      
      ## Handling Conflicting Reports
      
      When different sources report conflicting information:
      
      1. **Prioritize official sources** (BSE/NSE filings > media reports)
      2. **Check the timestamp** — newer information may supersede older
      3. **Verify with 2+ independent sources** before treating as confirmed
      4. **Label unconfirmed news** clearly: "Reports suggest..." or "According to [source]..."
      5. **Flag rumor vs confirmed**: Clearly distinguish between market rumors and official announcements
      
      ## Common Misinformation Patterns
      
      Watch out for:
      - **Pump-and-dump social media posts** — verify any "breaking news" from X/Twitter against official sources
      - **Misquoted earnings numbers** — always verify against BSE/NSE filing
      - **Outdated news recycled** — check dates carefully, especially for regulatory changes
      - **Promotional "news"** — some outlets publish sponsored content as news
      - **Analyst estimates presented as results** — distinguish between expected and actual numbers
      
      ## News Timing Context
      
      | Timing | Impact Pattern |
      |--------|---------------|
      | **Pre-market (before 9:15 AM)** | Creates gap up/down at open, look for global cues |
      | **During market (9:15-3:30)** | Immediate price reaction, watch volume spike |
      | **Post-market (after 3:30 PM)** | Impact priced in next day's open |
      | **Weekend/Holiday** | Accumulates for Monday/post-holiday opening |
      | **After F&O expiry** | May have outsized impact in next series |
      | **Before results** | Rumor-driven, verify after official announcement |
      
    • sector_mapping.md 6.9 KB
      # Indian Market Sector Mapping
      
      ## NSE Sectoral Indices → Key Stocks
      
      ### Banking & Financial Services
      
      | Index | Top Constituents |
      |-------|-----------------|
      | **Nifty Bank** | HDFCBANK, ICICIBANK, SBIN, KOTAKBANK, AXISBANK, INDUSINDBK, BANDHANBNK, FEDERALBNK, IDFCFIRSTB, AUBANK |
      | **Nifty PSU Bank** | SBIN, BANKBARODA, PNB, CANBK, UNIONBANK, IOB, INDIANB, BANKINDIA, CENTRALBK, MAHABANK |
      | **Nifty Private Bank** | HDFCBANK, ICICIBANK, KOTAKBANK, AXISBANK, INDUSINDBK, FEDERALBNK, BANDHANBNK, IDFCFIRSTB, RBLBANK |
      | **Nifty Financial Services** | HDFCBANK, ICICIBANK, SBIN, KOTAKBANK, BAJFINANCE, BAJAJFINSV, AXISBANK, HDFCAMC, SBILIFE, ICICIGI |
      
      **Key news categories:** RBI policy, NPA norms, credit growth, NIM trends, deposit rates, digital lending rules, NBFC regulations
      
      ### Information Technology
      
      | Index | Top Constituents |
      |-------|-----------------|
      | **Nifty IT** | TCS, INFY, HCLTECH, WIPRO, TECHM, LTIM, MPHASIS, COFORGE, PERSISTENT, LTTS |
      
      **Key news categories:** Deal wins, US IT spending, visa policies, INR/USD movement, margin guidance, attrition, AI impact
      
      ### Pharmaceuticals & Healthcare
      
      | Index | Top Constituents |
      |-------|-----------------|
      | **Nifty Pharma** | SUNPHARMA, DRREDDY, CIPLA, DIVISLAB, APOLLOHOSP, TORNTPHARM, LUPIN, AUROPHARMA, ALKEM, BIOCON |
      | **Nifty Healthcare** | SUNPHARMA, DRREDDY, CIPLA, APOLLOHOSP, MAXHEALTH, FORTIS, LALPATHLAB, METROPOLIS, IPCALAB |
      
      **Key news categories:** USFDA approvals/warnings, ANDA filings, API pricing, drug price control (DPCO), patent expiry, clinical trials
      
      ### Automobile
      
      | Index | Top Constituents |
      |-------|-----------------|
      | **Nifty Auto** | M&M, TATAMOTORS, MARUTI, BAJAJ-AUTO, HEROMOTOCO, EICHERMOT, BHARATFORG, ASHOKLEY, TVS, BOSCH |
      
      **Key news categories:** Monthly sales data, EV policy, PLI scheme, commodity input costs (steel, rubber), export data, BSVI norms
      
      ### Fast Moving Consumer Goods
      
      | Index | Top Constituents |
      |-------|-----------------|
      | **Nifty FMCG** | HINDUNILVR, ITC, NESTLEIND, BRITANNIA, GODREJCP, DABUR, MARICO, COLPAL, TATACONSUM, PGHH |
      
      **Key news categories:** Rural demand, monsoon impact, inflation/deflation, raw material costs (palm oil, crude), GST rate changes
      
      ### Energy & Oil
      
      | Index | Top Constituents |
      |-------|-----------------|
      | **Nifty Energy** | RELIANCE, NTPC, POWERGRID, ONGC, ADANIGREEN, BPCL, IOC, GAIL, TATAPOWER, COALINDIA |
      | **Nifty Oil & Gas** | RELIANCE, ONGC, BPCL, IOC, GAIL, HINDPETRO, PETRONET, GUJGASLTD, ATGL, IGL |
      
      **Key news categories:** Crude oil prices, OPEC decisions, natural gas prices, refining margins, fuel price revisions, green energy policy, coal supply
      
      ### Metals & Mining
      
      | Index | Top Constituents |
      |-------|-----------------|
      | **Nifty Metal** | TATASTEEL, JSWSTEEL, HINDALCO, VEDL, COALINDIA, NMDC, ADANIENT, NATIONALUM, SAIL, JINDALSTEL |
      
      **Key news categories:** Global metal prices, China demand, US tariffs, anti-dumping duty, iron ore prices, PLI for steel
      
      ### Real Estate
      
      | Index | Top Constituents |
      |-------|-----------------|
      | **Nifty Realty** | DLF, GODREJPROP, OBEROIRLTY, PRESTIGE, PHOENIXLTD, LODHA, BRIGADE, SOBHA, SUNTECK |
      
      **Key news categories:** Interest rate changes, RERA compliance, housing demand, commercial real estate, REIT performance, circle rates
      
      ### Infrastructure & Construction
      
      | Index | Top Constituents |
      |-------|-----------------|
      | **Nifty Infra** | LARSEN, RELIANCE, NTPC, POWERGRID, ADANIPORTS, ULTRACEMCO, GRASIM, BHARTIARTL, TECHM, SBIN |
      
      **Key news categories:** Government capex, highway contracts, railway orders, smart city projects, budget allocation, order inflows
      
      ### Telecom
      
      **Key Stocks:** BHARTIARTL, IDEA, RCOM, TATACOMM, INDUSTOWER
      
      **Key news categories:** Tariff hikes, spectrum auction, 5G rollout, ARPU trends, subscriber data, tower tenancy, AGR dues
      
      ### Power & Utilities
      
      | Index | Top Constituents |
      |-------|-----------------|
      | **Nifty Power** | NTPC, POWERGRID, TATAPOWER, ADANIGREEN, JSW ENERGY, NHPC, SJVN, CESC |
      
      **Key news categories:** Electricity demand, renewable energy targets, coal supply, power purchase agreements, transmission projects
      
      ### Consumer Durables
      
      **Key Stocks:** VOLTAS, HAVELLS, BLUESTAR, DIXON, AMBER, WHIRLPOOL, CROMPTON, VIP
      
      **Key news categories:** Festive demand, summer demand (ACs), BIS standards, PLI electronics, raw material costs
      
      ### Chemicals
      
      **Key Stocks:** PIDILITIND, SRF, AARTI, DEEPAKNITRITE, CLEAN, ALKYLAMINE, GALAXYSURF
      
      **Key news categories:** China+1 beneficiaries, agrochemical demand, specialty chemicals growth, environmental regulations, anti-dumping
      
      ## Sector → Event Sensitivity Map
      
      | Event Type | Most Sensitive Sectors |
      |------------|----------------------|
      | **RBI rate cut** | Banks, Realty, Auto, NBFCs |
      | **RBI rate hike** | Banks (short-term positive NIM), Realty (negative), NBFCs |
      | **Crude oil spike** | OMCs (negative), Airlines (negative), Paints (negative), ONGC (positive) |
      | **Crude oil drop** | OMCs (positive), Airlines (positive), Paints (positive), ONGC (negative) |
      | **INR depreciation** | IT (positive), Pharma exports (positive), importers (negative) |
      | **INR appreciation** | IT (negative), Pharma (negative), importers (positive) |
      | **Monsoon good** | FMCG, Auto (rural), Agri, Fertilizers |
      | **Monsoon poor** | FMCG (negative rural), Sugar, Agri inputs |
      | **Union Budget** | Depends on allocations — Infra, Defense, Railways, PSU banks |
      | **Global recession** | IT (negative), Metals (negative), Pharma (defensive) |
      | **China slowdown** | Metals (negative), Chemicals (positive — China+1), Textiles (positive) |
      | **US tariffs** | IT services, Pharma (if targeted), Metals |
      | **Election results** | PSU stocks, Infra, Defense, Realty |
      | **GST rate change** | Affected sector directly, FMCG, Consumer Durables |
      | **SEBI F&O rules** | Brokers, exchanges, high-beta stocks |
      | **PLI scheme** | Eligible sectors — Electronics, Pharma, Auto components, Solar |
      | **Inflation spike** | FMCG (margin pressure), Banking (rate hike expectations) |
      | **FII selling** | High-FII-holding stocks, large caps first, then mid/small |
      | **DII buying** | Banks, IT, FMCG (defensive accumulation patterns) |
      
      ## Sector Seasonality Patterns
      
      | Month | Seasonal Theme | Sectors Affected |
      |-------|---------------|-----------------|
      | **Jan** | Budget expectations | Infra, PSU, Defense |
      | **Feb** | Union Budget | Depends on allocations |
      | **Mar** | FY-end tax selling, NAV window dressing | Broad market |
      | **Apr** | New FY, fresh FII allocations | Large caps, banks |
      | **May** | Summer demand, election season (if applicable) | Consumer durables, AC, beverages |
      | **Jun** | Monsoon onset | Agri, FMCG rural, fertilizers |
      | **Jul** | Q1 results season | Broad market |
      | **Aug** | Monsoon mid-season, Independence Day | Agri, fertilizers |
      | **Sep** | FII fund flow (post US labor day) | Large caps |
      | **Oct** | Festive season (Navratri, Diwali) | Auto, FMCG, consumer durables, retail |
      | **Nov** | Festive season continued, Q2 results | Auto sales data, FMCG |
      | **Dec** | FII year-end, Santa rally, global cues | Broad market |
      
    • sentiment_patterns.md 8.6 KB
      # Indian Market Sentiment & News Reaction Patterns
      
      ## How Indian Markets React to News Categories
      
      ### 1. RBI Monetary Policy
      
      | Scenario | Immediate Reaction | Sectors | Typical Duration |
      |----------|-------------------|---------|-----------------|
      | **Rate cut (expected)** | Mild positive, already priced in | Banks +0.5-1%, Realty +1-2% | 1-2 days |
      | **Rate cut (surprise)** | Strong positive rally | Banks +2-4%, Realty +3-5%, Auto +2-3% | 3-5 days |
      | **Rate hold (expected cut)** | Negative, disappointment | Banks -1-2%, Realty -2-3% | 1-2 days |
      | **Rate hike** | Negative broad market | Banks (mixed — NIM vs growth), Realty -3-5%, NBFCs -2-4% | 3-7 days |
      | **Dovish commentary** | Positive, rate cut expectations build | Rate-sensitive sectors rally | 1-2 weeks |
      | **Hawkish commentary** | Negative, rate hike fears | Rate-sensitive sectors decline | 1-2 weeks |
      
      **Lag analysis:** Banks react immediately. Real estate lags by 1-2 days. Auto sector reacts with 2-3 day lag as loan rate transmission expectations build.
      
      ### 2. Union Budget
      
      | Scenario | Typical Reaction | Key Patterns |
      |----------|-----------------|--------------|
      | **Infrastructure push** | Infra, cement, L&T rally 3-5% | Lasts 1-2 weeks then mean-reverts |
      | **Defense allocation up** | HAL, BEL, BDL rally 5-10% | Sector re-rating over weeks |
      | **Tax relief (personal)** | FMCG, consumer durables, auto up 2-3% | Consumer spending boost narrative |
      | **Tax hike (capital gains)** | Market sell-off 2-5% | Recovers within 2-4 weeks |
      | **Fiscal deficit overshoot** | Bond yields up, bank stocks dip | Medium-term negative for rate-sensitive |
      | **Disinvestment target** | PSU stocks volatile | Initial pop on privatization names |
      
      **Historical pattern:** Budget day often sees high volatility with 300-500 point Nifty swings. The initial reaction often reverses within 48 hours as market digests details.
      
      ### 3. Earnings Announcements
      
      | Scenario | Price Reaction | Volume Pattern |
      |----------|---------------|---------------|
      | **Beat + raise guidance** | Gap up 3-10%, sustains | 3-5x normal volume |
      | **Beat + inline guidance** | Gap up 1-3%, partial reversion | 2-3x normal volume |
      | **Inline results** | Flat to -1% | Normal volume |
      | **Miss + cut guidance** | Gap down 5-15% | 5-10x normal volume |
      | **Miss + maintain guidance** | Down 2-5%, gradual recovery | 2-4x normal volume |
      
      **India-specific nuances:**
      - Large-cap results often "leak" before official announcement — watch for unusual pre-result price moves
      - Results announced post-market (after 3:30 PM) impact next day's opening
      - Results during F&O expiry week amplify options volatility
      - "Analyst concalls" at 5-7 PM post-results often drive next-day gap direction
      
      ### 4. FII/DII Flow Events
      
      | Scenario | Market Impact | Duration |
      |----------|-------------|----------|
      | **FII buying > ₹2000 Cr/day** | Nifty up 0.5-1% | Sustains if multi-day |
      | **FII selling > ₹3000 Cr/day** | Nifty down 0.5-1.5% | Can persist for weeks |
      | **FII selling + DII buying** | Market supported but choppy | "Tug of war" — range-bound |
      | **Both FII + DII buying** | Strong rally, breadth expands | Can sustain for weeks |
      | **Both FII + DII selling** | Rare, sharp correction | Usually brief (1-3 days) |
      
      **Key insight:** FII selling in cash + buying in derivatives (long futures, short puts) is actually bullish. Look at combined cash + derivative position, not just cash data.
      
      ### 5. Crude Oil Price Shocks
      
      | Scenario | Indian Market Impact | Key Stocks |
      |----------|---------------------|-----------|
      | **Crude > $90 (spike)** | Nifty -1-2%, OMCs hammered | BPCL, IOC, HPCL down 5-10%; ONGC up |
      | **Crude > $100 (sustained)** | Broad market negative, INR weakens | Airlines, paints, plastics negative |
      | **Crude < $70 (drop)** | Positive for India, INR strengthens | OMCs rally, Airlines rally |
      | **Crude $70-85 (range)** | Neutral, no major impact | Goldilocks zone for India |
      
      **Transmission lag:** Crude oil impact takes 2-4 weeks to flow into earnings. Fuel price revisions are the trigger — watch OMC marketing margins.
      
      ### 6. Global Events
      
      | Event | Indian Market Correlation | Lag |
      |-------|--------------------------|-----|
      | **US Fed rate decision** | High for IT, Banks, FII flows | Same day (evening IST → next morning) |
      | **US non-farm payrolls** | Medium — affects Fed expectations | Next trading day |
      | **China PMI data** | Medium — affects metals, chemicals | 1-2 days |
      | **US-China trade tensions** | Medium — China+1 narrative for India | Multi-week theme |
      | **Geopolitical crisis** | High short-term, fades | 1-5 days depending on proximity |
      | **Global risk-off (VIX spike)** | FII selling in India | 1-3 days lag, can persist weeks |
      
      ### 7. Corporate Governance / Fraud
      
      | Scenario | Reaction | Recovery |
      |----------|----------|----------|
      | **Accounting fraud allegation** | -10-30% crash | Months to years (if true) |
      | **Promoter arrest/ED raid** | -5-15% crash | Weeks if cleared, permanent if convicted |
      | **Short seller report** | -10-25% crash, high volume | 2-4 weeks for dust to settle |
      | **SEBI investigation** | -5-10% decline | Gradual over investigation period |
      | **Auditor resignation** | -5-15% crash | Months — investors fear what's hidden |
      
      **India-specific:** Adani-Hindenburg (Jan 2023) pattern — initial 25%+ crash, gradual recovery over months. Short seller reports on Indian companies have higher initial impact than global averages.
      
      ### 8. IPO Market Signals
      
      | Signal | Market Implication |
      |--------|-------------------|
      | **High subscription (>10x retail)** | Bullish overall sentiment |
      | **Multiple IPO withdrawals** | Bearish sentiment, risk-off |
      | **Day-1 listing below issue price** | Cooling sentiment for new issues |
      | **SME IPO frenzy** | Late-stage bullishness, potential froth |
      | **PE/VC exits via OFS** | Mixed — smart money taking profits |
      
      ## Sentiment Indicators (India-Specific)
      
      ### India VIX Interpretation
      | VIX Level | Market Regime | Trading Implication |
      |-----------|-------------|-------------------|
      | **< 12** | Extreme complacency | Breakout or breakdown incoming |
      | **12-15** | Low volatility, trending | Ride the trend |
      | **15-20** | Normal range | Standard strategies |
      | **20-25** | Elevated fear | Hedging active, may be near bottom |
      | **25-35** | High fear | Panic selling, contrarian opportunities |
      | **> 35** | Crisis mode | Cash is king, wait for VIX to peak |
      
      ### Put-Call Ratio (Nifty)
      | PCR Level | Signal | Interpretation |
      |-----------|--------|---------------|
      | **> 1.3** | Extreme put buying | Contrarian bullish (too many bears) |
      | **1.0-1.3** | Moderately bearish | Cautious, hedge in place |
      | **0.7-1.0** | Neutral to bullish | Normal market |
      | **< 0.7** | Extreme call buying | Contrarian bearish (too many bulls) |
      
      ### FII Long/Short Ratio (Index Futures)
      | Ratio | Signal |
      |-------|--------|
      | **> 70% long** | FII bullish, but watch for reversal at extremes |
      | **50-70% long** | Moderately bullish |
      | **30-50% long** | Bearish to neutral |
      | **< 30% long** | Extremely bearish, contrarian buy zone |
      
      ## News Impact Decay Curve
      
      Most news events follow a predictable decay pattern:
      
      ```
      Impact
        │
        │ ████
        │ ████████
        │ ████████████
        │ ████████████████
        │ ████████████████████
        │ ████████████████████████
        │ ████████████████████████████
        │ ████████████████████████████████
        └──────────────────────────────────── Time
        Day1  Day2  Day3  Week1  Week2  Month1
      
        Typical pattern:
        - Day 1: 60-80% of total move
        - Day 2-3: 15-25% (continuation or reversion)
        - Week 1: Narrative builds or fades
        - Week 2+: Structural impact or full mean-reversion
      ```
      
      **Exceptions to decay:**
      - Earnings re-ratings → sustain for quarters
      - Regulatory structural changes → sustain for months
      - Fraud/governance → permanent derating
      - M&A → sustains until deal completion/failure
      
      ## Contrarian Signals
      
      When to go against the news narrative:
      
      1. **Universal consensus** — When every headline says "market will crash/rally", the move is usually done
      2. **Volume exhaustion** — If bad news arrives but selling volume is declining, bears are exhausted
      3. **VIX spike + support hold** — Fear without price breakdown = accumulation
      4. **FII selling + DII buying at support** — Smart domestic money stepping in
      5. **Multiple downgrades at 52-week low** — Often marks the bottom
      6. **Euphoric retail participation in SME IPOs** — Often marks the top
      
  • scripts
    • news_fetcher.py 23.8 KB
      #!/usr/bin/env python3
      """
      India Market News Fetcher
      Fetches and categorizes Indian stock market news from RSS feeds.
      
      Usage:
          # Daily briefing from all sources
          python3 news_fetcher.py
      
          # Stock-specific news
          python3 news_fetcher.py --stock RELIANCE
      
          # Sector news
          python3 news_fetcher.py --sector banking
      
          # Custom date range (days back)
          python3 news_fetcher.py --days 7
      
          # Output as JSON
          python3 news_fetcher.py --format json
      
          # Save to file
          python3 news_fetcher.py --output reports/daily_briefing.md
      """
      
      import argparse
      import json
      import re
      import sys
      from datetime import datetime, timedelta
      from typing import Optional
      from dataclasses import dataclass, field, asdict
      
      try:
          import feedparser
          HAS_FEEDPARSER = True
      except ImportError:
          HAS_FEEDPARSER = False
      
      try:
          import requests
          HAS_REQUESTS = True
      except ImportError:
          HAS_REQUESTS = False
      
      try:
          import yfinance as yf
          HAS_YFINANCE = True
      except ImportError:
          HAS_YFINANCE = False
      
      
      # ──────────────────────────────────────────────
      # RSS Feed Sources
      # ──────────────────────────────────────────────
      
      RSS_FEEDS = {
          "moneycontrol_markets": {
              "url": "https://www.moneycontrol.com/rss/marketreports.xml",
              "source": "MoneyControl",
              "category": "Markets",
              "tier": 2,
          },
          "moneycontrol_news": {
              "url": "https://www.moneycontrol.com/rss/latestnews.xml",
              "source": "MoneyControl",
              "category": "General",
              "tier": 2,
          },
          "moneycontrol_business": {
              "url": "https://www.moneycontrol.com/rss/business.xml",
              "source": "MoneyControl",
              "category": "Business",
              "tier": 2,
          },
          "et_markets": {
              "url": "https://economictimes.indiatimes.com/markets/rssfeeds/1977021501.cms",
              "source": "Economic Times",
              "category": "Markets",
              "tier": 2,
          },
          "et_stocks": {
              "url": "https://economictimes.indiatimes.com/markets/stocks/rssfeeds/2146842.cms",
              "source": "Economic Times",
              "category": "Stocks",
              "tier": 2,
          },
          "livemint_markets": {
              "url": "https://www.livemint.com/rss/markets",
              "source": "LiveMint",
              "category": "Markets",
              "tier": 2,
          },
          "livemint_companies": {
              "url": "https://www.livemint.com/rss/companies",
              "source": "LiveMint",
              "category": "Companies",
              "tier": 2,
          },
          "business_standard": {
              "url": "https://www.business-standard.com/rss/markets-106.rss",
              "source": "Business Standard",
              "category": "Markets",
              "tier": 2,
          },
          "ndtv_business": {
              "url": "https://feeds.feedburner.com/ndtvprofit-latest",
              "source": "NDTV Profit",
              "category": "Business",
              "tier": 3,
          },
      }
      
      # ──────────────────────────────────────────────
      # Event Classification Keywords
      # ──────────────────────────────────────────────
      
      EVENT_KEYWORDS = {
          "Earnings": [
              "quarterly results", "Q1", "Q2", "Q3", "Q4", "earnings", "profit",
              "revenue", "net income", "PAT", "EBITDA", "results declared",
              "topline", "bottomline", "YoY growth", "QoQ", "guidance",
          ],
          "Corporate Action": [
              "dividend", "bonus", "stock split", "buyback", "rights issue",
              "face value", "record date", "ex-date", "ex-dividend",
          ],
          "M&A": [
              "acquisition", "merger", "demerger", "takeover", "stake sale",
              "buyout", "amalgamation", "joint venture", "strategic investment",
          ],
          "Management": [
              "CEO", "MD", "chairman", "appointed", "resigned", "board",
              "managing director", "CFO", "key managerial",
          ],
          "Regulatory": [
              "SEBI", "RBI", "circular", "regulation", "compliance", "penalty",
              "norm", "guideline", "framework", "notification",
          ],
          "Institutional": [
              "FII", "FPI", "DII", "mutual fund", "bulk deal", "block deal",
              "institutional", "promoter", "insider trading", "SAST",
          ],
          "IPO": [
              "IPO", "initial public offering", "listing", "subscription",
              "allotment", "DRHP", "RHP", "anchor investor", "OFS",
          ],
          "Macro": [
              "GDP", "inflation", "CPI", "WPI", "IIP", "PMI", "trade deficit",
              "fiscal deficit", "current account", "unemployment",
          ],
          "Global": [
              "Fed", "US market", "Wall Street", "Nasdaq", "S&P 500", "Dow Jones",
              "crude oil", "dollar", "tariff", "global", "China", "recession",
          ],
          "Rating": [
              "upgrade", "downgrade", "target price", "outperform", "underperform",
              "buy rating", "sell rating", "hold rating", "analyst",
          ],
      }
      
      # ──────────────────────────────────────────────
      # Sentiment Keywords
      # ──────────────────────────────────────────────
      
      BULLISH_KEYWORDS = [
          "rally", "surge", "soar", "gain", "jump", "rise", "bullish", "record high",
          "breakout", "upgrade", "outperform", "beat estimate", "strong results",
          "positive", "boom", "recovery", "expansion", "growth", "optimistic",
          "buying", "accumulate", "all-time high",
      ]
      
      BEARISH_KEYWORDS = [
          "crash", "plunge", "sink", "fall", "drop", "decline", "bearish", "low",
          "breakdown", "downgrade", "underperform", "miss estimate", "weak results",
          "negative", "slump", "contraction", "slowdown", "pessimistic",
          "selling", "exit", "52-week low", "correction", "panic",
      ]
      
      # ──────────────────────────────────────────────
      # Sector Keywords
      # ──────────────────────────────────────────────
      
      SECTOR_KEYWORDS = {
          "Banking": ["bank", "HDFC", "ICICI", "SBI", "Kotak", "Axis", "NPA", "NIM", "credit growth", "deposit"],
          "IT": ["IT", "TCS", "Infosys", "Wipro", "HCL", "Tech Mahindra", "software", "digital", "AI", "cloud"],
          "Pharma": ["pharma", "drug", "FDA", "ANDA", "API", "hospital", "healthcare", "Sun Pharma", "Dr Reddy"],
          "Auto": ["auto", "Maruti", "Tata Motors", "Bajaj", "Hero", "EV", "electric vehicle", "sales data"],
          "FMCG": ["FMCG", "HUL", "ITC", "Nestle", "Britannia", "consumer", "rural demand"],
          "Realty": ["real estate", "realty", "DLF", "Godrej Properties", "housing", "RERA"],
          "Metal": ["metal", "steel", "Tata Steel", "JSW", "Hindalco", "aluminium", "iron ore", "copper"],
          "Energy": ["oil", "gas", "ONGC", "Reliance", "BPCL", "IOC", "crude", "refining", "energy"],
          "Infra": ["infra", "L&T", "construction", "highway", "railway", "smart city", "cement"],
          "Telecom": ["telecom", "Airtel", "Jio", "Vodafone", "5G", "spectrum", "ARPU", "subscriber"],
          "Power": ["power", "NTPC", "electricity", "renewable", "solar", "wind", "grid", "transmission"],
          "Defence": ["defence", "defense", "HAL", "BEL", "BDL", "missile", "military", "arms"],
      }
      
      # ──────────────────────────────────────────────
      # NSE Stock Symbols (Common)
      # ──────────────────────────────────────────────
      
      STOCK_NAME_TO_SYMBOL = {
          "reliance": "RELIANCE", "tcs": "TCS", "infosys": "INFY", "infy": "INFY",
          "hdfc bank": "HDFCBANK", "hdfcbank": "HDFCBANK", "icici bank": "ICICIBANK",
          "icicibank": "ICICIBANK", "sbi": "SBIN", "state bank": "SBIN",
          "kotak": "KOTAKBANK", "axis bank": "AXISBANK", "wipro": "WIPRO",
          "hcl": "HCLTECH", "tech mahindra": "TECHM", "bharti airtel": "BHARTIARTL",
          "airtel": "BHARTIARTL", "itc": "ITC", "hindustan unilever": "HINDUNILVR",
          "hul": "HINDUNILVR", "larsen": "LT", "l&t": "LT", "bajaj finance": "BAJFINANCE",
          "maruti": "MARUTI", "tata motors": "TATAMOTORS", "sun pharma": "SUNPHARMA",
          "titan": "TITAN", "asian paints": "ASIANPAINT", "adani": "ADANIENT",
          "mahindra": "M&M", "m&m": "M&M", "power grid": "POWERGRID", "ntpc": "NTPC",
          "ultratech": "ULTRACEMCO", "nestle": "NESTLEIND", "bajaj auto": "BAJAJ-AUTO",
          "hero motocorp": "HEROMOTOCO", "dr reddy": "DRREDDY", "cipla": "CIPLA",
          "divis": "DIVISLAB", "grasim": "GRASIM", "britannia": "BRITANNIA",
          "godrej": "GODREJCP", "tata steel": "TATASTEEL", "jsw steel": "JSWSTEEL",
          "hindalco": "HINDALCO", "coal india": "COALINDIA", "ongc": "ONGC",
          "bpcl": "BPCL", "ioc": "IOC", "gail": "GAIL", "dlf": "DLF",
          "hal": "HAL", "bel": "BEL",
      }
      
      
      @dataclass
      class NewsItem:
          """Represents a single news item."""
          title: str
          source: str
          published: str
          link: str
          category: str = "General"
          event_type: str = "Uncategorized"
          sentiment: str = "Neutral"
          impact_score: int = 3
          sectors: list = field(default_factory=list)
          stocks_mentioned: list = field(default_factory=list)
          summary: str = ""
      
      
      def classify_event(title: str, summary: str = "") -> str:
          """Classify news into event type based on keywords."""
          text = (title + " " + summary).lower()
          scores = {}
          for event_type, keywords in EVENT_KEYWORDS.items():
              score = sum(1 for kw in keywords if kw.lower() in text)
              if score > 0:
                  scores[event_type] = score
          if scores:
              return max(scores, key=scores.get)
          return "General"
      
      
      def detect_sentiment(title: str, summary: str = "") -> str:
          """Detect sentiment from title and summary."""
          text = (title + " " + summary).lower()
          bull_score = sum(1 for kw in BULLISH_KEYWORDS if kw in text)
          bear_score = sum(1 for kw in BEARISH_KEYWORDS if kw in text)
          if bull_score > bear_score and bull_score >= 2:
              return "Bullish"
          elif bear_score > bull_score and bear_score >= 2:
              return "Bearish"
          elif bull_score > 0 and bear_score == 0:
              return "Bullish"
          elif bear_score > 0 and bull_score == 0:
              return "Bearish"
          return "Neutral"
      
      
      def detect_sectors(title: str, summary: str = "") -> list:
          """Detect which sectors are mentioned."""
          text = (title + " " + summary).lower()
          sectors = []
          for sector, keywords in SECTOR_KEYWORDS.items():
              for kw in keywords:
                  if kw.lower() in text:
                      sectors.append(sector)
                      break
          return sectors
      
      
      def detect_stocks(title: str, summary: str = "") -> list:
          """Detect stock symbols mentioned in the text."""
          text = (title + " " + summary).lower()
          stocks = []
          for name, symbol in STOCK_NAME_TO_SYMBOL.items():
              if name in text and symbol not in stocks:
                  stocks.append(symbol)
          return stocks
      
      
      def score_impact(item: NewsItem) -> int:
          """Score the market impact of a news item (1-10)."""
          score = 3  # baseline
      
          # Event type scoring
          high_impact = ["M&A", "Regulatory", "Macro", "IPO"]
          medium_impact = ["Earnings", "Institutional", "Rating", "Global"]
          if item.event_type in high_impact:
              score += 2
          elif item.event_type in medium_impact:
              score += 1
      
          # Sentiment strength
          if item.sentiment in ("Bullish", "Bearish"):
              score += 1
      
          # Nifty 50 stocks get a boost
          nifty50_stocks = {
              "RELIANCE", "TCS", "HDFCBANK", "INFY", "ICICIBANK", "HINDUNILVR",
              "SBIN", "BHARTIARTL", "ITC", "KOTAKBANK", "LT", "AXISBANK",
              "BAJFINANCE", "MARUTI", "TATAMOTORS", "SUNPHARMA", "TITAN",
              "ASIANPAINT", "HCLTECH", "WIPRO", "NTPC", "POWERGRID",
          }
          if any(s in nifty50_stocks for s in item.stocks_mentioned):
              score += 1
      
          # Multiple sectors affected
          if len(item.sectors) >= 2:
              score += 1
      
          return min(10, max(1, score))
      
      
      def fetch_rss_feeds(
          days_back: int = 1,
          stock_filter: Optional[str] = None,
          sector_filter: Optional[str] = None,
      ) -> list[NewsItem]:
          """Fetch news from RSS feeds."""
          if not HAS_FEEDPARSER:
              print("ERROR: feedparser not installed. Run: pip install feedparser")
              sys.exit(1)
      
          cutoff = datetime.now() - timedelta(days=days_back)
          all_items = []
      
          for feed_name, feed_info in RSS_FEEDS.items():
              try:
                  feed = feedparser.parse(feed_info["url"])
                  for entry in feed.entries[:20]:  # limit per feed
                      # Parse published date
                      published = ""
                      if hasattr(entry, "published"):
                          published = entry.published
                      elif hasattr(entry, "updated"):
                          published = entry.updated
      
                      title = entry.get("title", "").strip()
                      summary = entry.get("summary", "").strip()
                      # Strip HTML tags from summary
                      summary = re.sub(r"<[^>]+>", "", summary)[:300]
                      link = entry.get("link", "")
      
                      if not title:
                          continue
      
                      item = NewsItem(
                          title=title,
                          source=feed_info["source"],
                          published=published,
                          link=link,
                          category=feed_info["category"],
                          summary=summary,
                      )
      
                      # Classify
                      item.event_type = classify_event(title, summary)
                      item.sentiment = detect_sentiment(title, summary)
                      item.sectors = detect_sectors(title, summary)
                      item.stocks_mentioned = detect_stocks(title, summary)
                      item.impact_score = score_impact(item)
      
                      # Apply filters
                      if stock_filter:
                          stock_upper = stock_filter.upper()
                          stock_lower = stock_filter.lower()
                          if (
                              stock_upper not in item.stocks_mentioned
                              and stock_lower not in title.lower()
                              and stock_lower not in summary.lower()
                          ):
                              continue
      
                      if sector_filter:
                          sector_lower = sector_filter.lower()
                          if not any(s.lower() == sector_lower for s in item.sectors):
                              # Also check title/summary for sector keyword
                              if sector_lower not in title.lower() and sector_lower not in summary.lower():
                                  continue
      
                      all_items.append(item)
      
              except Exception as e:
                  print(f"Warning: Failed to fetch {feed_name}: {e}", file=sys.stderr)
      
          # Sort by impact score (descending), then by source tier
          all_items.sort(key=lambda x: (-x.impact_score, x.source))
      
          # Deduplicate by similar titles
          seen_titles = set()
          unique_items = []
          for item in all_items:
              # Simple dedup: normalize title
              normalized = re.sub(r"[^a-z0-9]", "", item.title.lower())[:50]
              if normalized not in seen_titles:
                  seen_titles.add(normalized)
                  unique_items.append(item)
      
          return unique_items
      
      
      def get_stock_price(symbol: str) -> Optional[dict]:
          """Fetch current stock price using yfinance."""
          if not HAS_YFINANCE:
              return None
          try:
              ticker = yf.Ticker(f"{symbol}.NS")
              info = ticker.fast_info
              return {
                  "symbol": symbol,
                  "price": round(info.get("lastPrice", 0), 2),
                  "change_pct": round(
                      ((info.get("lastPrice", 0) - info.get("previousClose", 0))
                       / info.get("previousClose", 1)) * 100, 2
                  ) if info.get("previousClose") else 0,
              }
          except Exception:
              return None
      
      
      def format_sentiment_icon(sentiment: str) -> str:
          """Return emoji icon for sentiment."""
          icons = {
              "Bullish": "🟢",
              "Bearish": "🔴",
              "Neutral": "🟡",
          }
          return icons.get(sentiment, "⚪")
      
      
      def format_markdown(items: list[NewsItem], stock_filter: Optional[str] = None,
                           sector_filter: Optional[str] = None) -> str:
          """Format news items as markdown."""
          now = datetime.now()
          lines = []
      
          if stock_filter:
              lines.append(f"# 📰 News Report — {stock_filter.upper()}")
          elif sector_filter:
              lines.append(f"# 📰 Sector News — {sector_filter.title()}")
          else:
              lines.append(f"# 📊 Daily Market News Briefing")
      
          lines.append(f"\n**Generated:** {now.strftime('%A, %d %B %Y %I:%M %p IST')}")
          lines.append(f"**Total Items:** {len(items)}")
          lines.append("")
      
          if not items:
              lines.append("No news items found for the given filters.")
              return "\n".join(lines)
      
          # High impact items (score >= 6)
          high_impact = [i for i in items if i.impact_score >= 6]
          if high_impact:
              lines.append("---")
              lines.append(f"\n## 🔥 High Impact News ({len(high_impact)} items)\n")
              for idx, item in enumerate(high_impact[:10], 1):
                  icon = format_sentiment_icon(item.sentiment)
                  lines.append(f"### {idx}. {item.title} — [{item.impact_score}/10] {icon}")
                  lines.append(f"- **Source:** {item.source} | {item.published}")
                  lines.append(f"- **Type:** {item.event_type} | **Sentiment:** {item.sentiment}")
                  if item.sectors:
                      lines.append(f"- **Sectors:** {', '.join(item.sectors)}")
                  if item.stocks_mentioned:
                      lines.append(f"- **Stocks:** {', '.join(item.stocks_mentioned)}")
                  if item.summary:
                      lines.append(f"- {item.summary[:200]}")
                  lines.append(f"- [Read more]({item.link})")
                  lines.append("")
      
          # Medium impact items (score 4-5)
          medium_impact = [i for i in items if 4 <= i.impact_score <= 5]
          if medium_impact:
              lines.append("---")
              lines.append(f"\n## 📰 Notable News ({len(medium_impact)} items)\n")
              for idx, item in enumerate(medium_impact[:15], 1):
                  icon = format_sentiment_icon(item.sentiment)
                  lines.append(f"**{idx}. {item.title}** [{item.impact_score}/10] {icon}")
                  lines.append(f"   {item.source} | {item.event_type} | {', '.join(item.sectors) if item.sectors else 'General'}")
                  if item.stocks_mentioned:
                      lines.append(f"   Stocks: {', '.join(item.stocks_mentioned)}")
                  lines.append("")
      
          # Low impact items (score 1-3)
          low_impact = [i for i in items if i.impact_score <= 3]
          if low_impact:
              lines.append("---")
              lines.append(f"\n## 📋 Other News ({len(low_impact)} items)\n")
              for item in low_impact[:10]:
                  icon = format_sentiment_icon(item.sentiment)
                  lines.append(f"- {icon} {item.title} — *{item.source}*")
              lines.append("")
      
          # Sector summary
          sector_counts = {}
          for item in items:
              for sector in item.sectors:
                  sector_counts[sector] = sector_counts.get(sector, 0) + 1
          if sector_counts:
              lines.append("---")
              lines.append("\n## 📊 Sector Activity\n")
              lines.append("| Sector | News Count | Sentiment |")
              lines.append("|--------|-----------|-----------|")
              for sector, count in sorted(sector_counts.items(), key=lambda x: -x[1]):
                  sector_items = [i for i in items if sector in i.sectors]
                  bull = sum(1 for i in sector_items if i.sentiment == "Bullish")
                  bear = sum(1 for i in sector_items if i.sentiment == "Bearish")
                  if bull > bear:
                      sent = "🟢 Bullish"
                  elif bear > bull:
                      sent = "🔴 Bearish"
                  else:
                      sent = "🟡 Mixed"
                  lines.append(f"| {sector} | {count} | {sent} |")
              lines.append("")
      
          # Stocks mentioned
          stock_counts = {}
          for item in items:
              for stock in item.stocks_mentioned:
                  stock_counts[stock] = stock_counts.get(stock, 0) + 1
          if stock_counts:
              lines.append("---")
              lines.append("\n## 🏢 Most Mentioned Stocks\n")
              lines.append("| Stock | Mentions | Price (Rs.) | Change |")
              lines.append("|-------|----------|-------------|--------|")
              for stock, count in sorted(stock_counts.items(), key=lambda x: -x[1])[:15]:
                  price_info = get_stock_price(stock)
                  if price_info:
                      change_str = f"{price_info['change_pct']:+.2f}%"
                      lines.append(f"| {stock} | {count} | {price_info['price']} | {change_str} |")
                  else:
                      lines.append(f"| {stock} | {count} | — | — |")
              lines.append("")
      
          # Event type distribution
          event_counts = {}
          for item in items:
              event_counts[item.event_type] = event_counts.get(item.event_type, 0) + 1
          if event_counts:
              lines.append("---")
              lines.append("\n## 📁 News by Category\n")
              lines.append("| Category | Count |")
              lines.append("|----------|-------|")
              for event, count in sorted(event_counts.items(), key=lambda x: -x[1]):
                  lines.append(f"| {event} | {count} |")
              lines.append("")
      
          lines.append("---")
          lines.append("\n*⚠️ Disclaimer: For educational purposes only. Not investment advice.*")
      
          return "\n".join(lines)
      
      
      def format_json(items: list[NewsItem]) -> str:
          """Format news items as JSON."""
          return json.dumps(
              {
                  "generated_at": datetime.now().isoformat(),
                  "total_items": len(items),
                  "items": [asdict(item) for item in items],
              },
              indent=2,
              ensure_ascii=False,
          )
      
      
      def main():
          parser = argparse.ArgumentParser(
              description="India Market News Fetcher — Fetch and categorize Indian stock market news"
          )
          parser.add_argument(
              "--stock", type=str, default=None,
              help="Filter news for a specific stock (e.g., RELIANCE, TCS)"
          )
          parser.add_argument(
              "--sector", type=str, default=None,
              help="Filter news for a sector (e.g., banking, IT, pharma, auto)"
          )
          parser.add_argument(
              "--days", type=int, default=1,
              help="Number of days to look back (default: 1)"
          )
          parser.add_argument(
              "--format", type=str, choices=["markdown", "json"], default="markdown",
              help="Output format (default: markdown)"
          )
          parser.add_argument(
              "--output", type=str, default=None,
              help="Save output to file (default: print to stdout)"
          )
          parser.add_argument(
              "--min-impact", type=int, default=1,
              help="Minimum impact score to include (1-10, default: 1)"
          )
          parser.add_argument(
              "--limit", type=int, default=50,
              help="Maximum number of items to return (default: 50)"
          )
      
          args = parser.parse_args()
      
          # Check dependencies
          if not HAS_FEEDPARSER:
              print("ERROR: 'feedparser' package is required.")
              print("Install it with: pip install feedparser")
              sys.exit(1)
      
          print(f"Fetching news (last {args.days} day(s))...", file=sys.stderr)
          if args.stock:
              print(f"Filtering for stock: {args.stock}", file=sys.stderr)
          if args.sector:
              print(f"Filtering for sector: {args.sector}", file=sys.stderr)
      
          # Fetch and process
          items = fetch_rss_feeds(
              days_back=args.days,
              stock_filter=args.stock,
              sector_filter=args.sector,
          )
      
          # Apply min impact filter
          items = [i for i in items if i.impact_score >= args.min_impact]
      
          # Apply limit
          items = items[:args.limit]
      
          print(f"Found {len(items)} news items.", file=sys.stderr)
      
          # Format output
          if args.format == "json":
              output = format_json(items)
          else:
              output = format_markdown(items, args.stock, args.sector)
      
          # Output
          if args.output:
              with open(args.output, "w", encoding="utf-8") as f:
                  f.write(output)
              print(f"Report saved to: {args.output}", file=sys.stderr)
          else:
              print(output)
      
      
      if __name__ == "__main__":
          main()
      
  • SKILL.md 17.6 KB
    ---
    name: india-news-tracker
    description: Track and analyze Indian stock market news, corporate announcements, SEBI circulars, bulk/block deals, and earnings calendars. Auto-fetches headlines from MoneyControl, Economic Times, LiveMint, BSE/NSE filings. Use when the user asks about recent news, corporate actions, upcoming events, or wants a daily market news briefing for NSE/BSE.
    ---
    
    # India News Tracker
    
    ## Overview
    
    This skill fetches, categorizes, scores, and summarizes Indian market news from multiple sources. It tracks corporate announcements, SEBI circulars, bulk/block deals, insider trades, earnings calendars, and breaking market news — then feeds actionable insights to the user or other skills (like Scenario Analyzer).
    
    ## Architecture
    
    ```
    Skill (Orchestrator)
    ├── Phase 1: News Collection
    │   ├── Web search across Indian financial media
    │   ├── BSE/NSE corporate filings
    │   ├── Regulatory circulars (SEBI, RBI)
    │   └── Bulk/block deal data
    ├── Phase 2: Processing
    │   ├── Categorize by event type
    │   ├── Score market impact (1-10)
    │   ├── Tag affected sectors and stocks
    │   └── Detect sentiment (bullish/bearish/neutral)
    ├── Phase 3: Analysis
    │   ├── Identify top movers from news
    │   ├── Cross-reference with price action (via broker MCP)
    │   ├── Flag earnings surprises and guidance changes
    │   └── Detect theme clusters
    └── Phase 4: Report
        ├── Daily briefing format
        ├── Stock-specific news digest
        ├── Sector news roundup
        └── Actionable alerts
    ```
    
    ## News Source Priority
    
    Use web search to fetch news from these sources, in order of reliability:
    
    ### Tier 1 — Official / Regulatory (Highest Priority)
    | Source | What to Fetch | Search Query Pattern |
    |--------|--------------|---------------------|
    | **BSE India** (bseindia.com) | Corporate announcements, board meeting outcomes, results | `site:bseindia.com [company] announcement` |
    | **NSE India** (nseindia.com) | Bulk deals, block deals, insider trades, F&O ban list | `site:nseindia.com [topic]` |
    | **SEBI** (sebi.gov.in) | Circulars, new regulations, enforcement orders | `site:sebi.gov.in circular 2026` |
    | **RBI** (rbi.org.in) | Monetary policy, banking regulations, forex data | `site:rbi.org.in [topic]` |
    
    ### Tier 2 — Financial Media (Primary News)
    | Source | Strength | Search Query Pattern |
    |--------|----------|---------------------|
    | **MoneyControl** | Fastest Indian market news, earnings analysis | `site:moneycontrol.com [topic]` |
    | **Economic Times Markets** | Corporate news, policy analysis | `site:economictimes.indiatimes.com markets [topic]` |
    | **LiveMint** | Policy, macro, premium analysis | `site:livemint.com [topic]` |
    | **Business Standard** | In-depth corporate and policy coverage | `site:business-standard.com [topic]` |
    
    ### Tier 3 — Supplementary
    | Source | Strength | Search Query Pattern |
    |--------|----------|---------------------|
    | **NDTV Profit** | Quick market updates | `site:ndtvprofit.com [topic]` |
    | **Trendlyne** | Technicals, bulk deals, DII/FII data | `site:trendlyne.com [topic]` |
    | **Screener.in** | Financials, results calendar | `site:screener.in [topic]` |
    | **Tijori Finance** | Earnings summaries, sector data | `site:tijorifinance.com [topic]` |
    
    ### Tier 4 — Social / Real-time Sentiment
    | Source | Strength | Search Query Pattern |
    |--------|----------|---------------------|
    | **X/Twitter** | Breaking news, market sentiment | `site:x.com [topic] NSE OR BSE` |
    | **Reddit (ISB)** | Retail sentiment, trading ideas | `site:reddit.com/r/IndianStreetBets [topic]` |
    
    ## Broker MCP Integration
    
    Use broker MCP tools to cross-reference news with live market data:
    
    ### Groww MCP (if connected)
    - `fetch_market_movers_and_trending_stocks_funds` with `STOCKS_IN_NEWS` — stocks currently in news
    - `get_ltp` — check price reaction to news
    - `fetch_historical_candle_data` — verify price movement post-announcement
    - `fetch_stocks_fundamental_data` — earnings data to compare with announced results
    - `fetch_market_movers_and_trending_stocks_funds` with `VOLUME_SHOCKERS` — abnormal volume (often news-driven)
    - `resolve_market_time_and_calendar` — trading day context
    
    ### Zerodha Kite MCP (if connected)
    - `get_ltp` — last traded price for news impact verification
    - `get_quotes` — real-time quotes with depth
    - `get_historical_data` — price history for post-news analysis
    - `search_instruments` — resolve company names to trading symbols
    
    ### No Broker Available
    - Use web search for all data (MoneyControl, Google Finance for prices)
    - yfinance as fallback for historical price data
    
    ## Workflow
    
    ### Mode 1: Daily Market Briefing
    
    Trigger: "What's the market news today?", "Daily briefing", "Morning update", "What happened in markets today?"
    
    **Steps:**
    
    1. **Determine market context**
       - Call `resolve_market_time_and_calendar` to get current date and market status
       - If market is closed, note it and provide previous day's wrap + upcoming catalysts
    
    2. **Fetch top market news** (run searches in parallel)
       ```
       WebSearch: "Indian stock market news today [date]"
       WebSearch: "NSE BSE market update today [date]"
       WebSearch: "site:moneycontrol.com market news today"
       WebSearch: "site:economictimes.indiatimes.com stock market today"
       ```
    
    3. **Fetch stocks in news** (if broker MCP available)
       ```
       Groww: fetch_market_movers_and_trending_stocks_funds(["STOCKS_IN_NEWS"])
       Groww: fetch_market_movers_and_trending_stocks_funds(["VOLUME_SHOCKERS"])
       Groww: fetch_market_movers_and_trending_stocks_funds(["TOP_GAINERS", "TOP_LOSERS"])
       ```
    
    4. **Fetch regulatory updates**
       ```
       WebSearch: "SEBI circular [current month] [year]"
       WebSearch: "RBI announcement today [date]"
       ```
    
    5. **Fetch corporate actions**
       ```
       WebSearch: "corporate actions NSE [date] ex-date dividend bonus split"
       WebSearch: "board meeting results today NSE BSE"
       ```
    
    6. **Categorize each news item** using the Event Classification table below
    
    7. **Score market impact** for each news item (1-10 scale, see Scoring Framework)
    
    8. **Cross-reference with price action**
       - For top 5-10 news items, check stock price movement using `get_ltp`
       - Flag significant gaps or volume spikes matching news
    
    9. **Generate Daily Briefing** using `assets/daily_briefing_template.md`
    
    ---
    
    ### Mode 2: Stock-Specific News
    
    Trigger: "News about Reliance", "What's happening with TCS?", "Any announcements from HDFC Bank?"
    
    **Steps:**
    
    1. **Resolve the company symbol**
       - Use `curate_symbols` or `search_instruments` to get the correct trading symbol
    
    2. **Fetch company-specific news** (parallel searches)
       ```
       WebSearch: "[company name] stock news [current month] [year]"
       WebSearch: "site:moneycontrol.com [company name] [year]"
       WebSearch: "site:bseindia.com [company name] announcement"
       WebSearch: "[company name] quarterly results [year]"
       WebSearch: "[company name] corporate action dividend bonus split"
       ```
    
    3. **Fetch fundamental context**
       ```
       Groww: fetch_stocks_fundamental_data(company, view='stats_only')
       Groww: get_ltp([company])
       ```
    
    4. **Check for recent price impact**
       ```
       Groww: fetch_historical_candle_data(symbol, last 30 days, daily)
       ```
    
    5. **Compile and present** categorized news with impact scores
    
    6. **Highlight actionable items:**
       - Upcoming earnings dates
       - Pending corporate actions (ex-dates)
       - Regulatory changes affecting the company
       - Management changes or M&A activity
       - Insider trading activity
    
    ---
    
    ### Mode 3: Sector News Roundup
    
    Trigger: "What's happening in banking sector?", "IT sector news", "Pharma sector update"
    
    **Steps:**
    
    1. **Map sector to NSE sectoral index and constituent stocks**
       - See `references/sector_mapping.md` for sector → index → stocks mapping
    
    2. **Fetch sector-specific news** (parallel searches)
       ```
       WebSearch: "[sector] sector India stock market [current month] [year]"
       WebSearch: "site:moneycontrol.com [sector] sector India"
       WebSearch: "[sector] policy regulation India [year]"
       ```
    
    3. **Fetch sector movers** (if Groww MCP connected)
       ```
       Groww: fetch_market_movers_and_trending_stocks_funds(sector-specific filters)
       Groww: fetch_technical_screener(sector filter)
       ```
    
    4. **Identify sector themes:**
       - Policy/regulatory changes (e.g., banking NPA norms, pharma FDA)
       - Earnings trend across sector
       - FII/DII sector rotation signals
       - Commodity input cost changes
    
    5. **Present sector roundup** with:
       - Top 3-5 sector headlines
       - Sector index performance
       - Notable stock moves within sector
       - Upcoming sector catalysts
    
    ---
    
    ### Mode 4: Earnings Tracker
    
    Trigger: "Upcoming earnings", "Results calendar", "Who's reporting this week?", "How were [company] results?"
    
    **Steps:**
    
    1. **Fetch earnings calendar**
       ```
       WebSearch: "NSE BSE quarterly results schedule [current month] [year]"
       WebSearch: "site:trendlyne.com earnings calendar"
       WebSearch: "board meeting intimate NSE [date range]"
       ```
    
    2. **For upcoming earnings**, present:
       ```
       | Company | Date | Quarter | Analyst Estimate | Previous Quarter |
       ```
    
    3. **For reported earnings**, fetch and analyze:
       ```
       WebSearch: "[company] quarterly results Q[x] FY[xx]"
       Groww: fetch_stocks_fundamental_data(company, view='financials_only')
       ```
    
    4. **Earnings analysis includes:**
       - Revenue vs estimate (beat/miss/inline)
       - PAT vs estimate
       - Margin expansion/compression
       - Management guidance highlights
       - YoY and QoQ growth rates
       - Stock price reaction post-results
    
    ---
    
    ### Mode 5: Corporate Actions Tracker
    
    Trigger: "Upcoming dividends", "Stock splits this month", "Bonus shares", "Corporate actions"
    
    **Steps:**
    
    1. **Fetch corporate actions calendar**
       ```
       WebSearch: "NSE corporate actions [current month] [year] ex-date"
       WebSearch: "upcoming dividend ex-date NSE [month] [year]"
       WebSearch: "stock split bonus issue NSE BSE [year]"
       ```
    
    2. **Present corporate actions** organized by type:
    
       **Dividends:**
       ```
       | Company | Type | Amount (Rs.) | Ex-Date | Record Date |
       ```
    
       **Bonus Issues:**
       ```
       | Company | Ratio | Ex-Date | Record Date |
       ```
    
       **Stock Splits:**
       ```
       | Company | From FV | To FV | Ex-Date |
       ```
    
       **Rights Issues:**
       ```
       | Company | Ratio | Price (Rs.) | Open Date | Close Date |
       ```
    
    ---
    
    ### Mode 6: Bulk/Block Deal Monitor
    
    Trigger: "Bulk deals today", "Block deals", "Who's buying/selling large quantities?"
    
    **Steps:**
    
    1. **Fetch bulk/block deal data**
       ```
       WebSearch: "NSE bulk deals today [date]"
       WebSearch: "BSE block deals today [date]"
       WebSearch: "site:nseindia.com bulk deals"
       WebSearch: "site:trendlyne.com bulk deals"
       ```
    
    2. **Analyze and present:**
       ```
       | Stock | Deal Type | Buyer/Seller | Quantity | Price (Rs.) | % of Equity |
       ```
    
    3. **Flag significant deals:**
       - Promoter buying/selling
       - FII/DII bulk transactions
       - PE fund entries/exits
       - Deals > 1% of equity
    
    ---
    
    ### Mode 7: Regulatory & Policy Monitor
    
    Trigger: "SEBI updates", "RBI policy impact", "New regulations", "Policy changes"
    
    **Steps:**
    
    1. **Fetch regulatory updates**
       ```
       WebSearch: "SEBI circular [current month] [year] new regulation"
       WebSearch: "RBI monetary policy [current month] [year]"
       WebSearch: "India financial regulation change [year]"
       ```
    
    2. **Categorize by impact:**
       - **Market-wide**: F&O margin changes, STT changes, settlement cycle changes
       - **Sector-specific**: Banking NPA norms, insurance regulations, telecom spectrum
       - **Company-specific**: SEBI enforcement, listing requirements
    
    3. **Assess impact and affected stocks/sectors**
    
    ---
    
    ## Event Classification
    
    Categorize every news item into one of these categories:
    
    | Category | Examples | Typical Impact |
    |----------|----------|---------------|
    | **Earnings** | Quarterly results, annual results, earnings surprise | High (on specific stock) |
    | **Corporate Action** | Dividend, bonus, split, buyback, rights issue | Medium (on specific stock) |
    | **M&A** | Merger, acquisition, demerger, stake sale | High (on involved companies) |
    | **Management** | CEO change, board reshuffle, key hire/exit | Medium |
    | **Regulatory** | SEBI order, RBI circular, govt policy | Medium-High (sector-wide) |
    | **Institutional** | FII/DII flow data, bulk/block deals, MF holdings | Medium |
    | **Sector** | Industry trend, commodity price, global peer news | Medium |
    | **Macro** | GDP data, inflation, IIP, PMI, trade deficit | Medium-High (market-wide) |
    | **Global** | Fed decision, US markets, crude oil, China data | Medium-High |
    | **IPO** | New filing, listing, subscription data | Medium (on IPO stock) |
    | **Legal** | Court order, NCLT, arbitration, penalty | Variable |
    | **Rating** | Analyst upgrade/downgrade, target price change | Medium |
    | **Insider** | Promoter buy/sell, SAST disclosure, pledge change | Medium-High |
    | **ESG** | Environmental violation, governance issue, social impact | Low-Medium |
    
    ## Impact Scoring Framework
    
    Score each news item on a 1-10 scale:
    
    | Score | Label | Criteria | Example |
    |-------|-------|----------|---------|
    | **9-10** | Critical | Market-wide impact, will move indices | RBI emergency rate cut, SEBI bans F&O |
    | **7-8** | High | Sector-wide or large-cap stock impact | Major M&A, earnings shock on Nifty 50 stock |
    | **5-6** | Medium | Significant for specific stocks | Mid-cap earnings beat, analyst upgrade |
    | **3-4** | Low | Limited impact, FYI value | Minor corporate action, routine filing |
    | **1-2** | Noise | Background info, no trading signal | Industry conference, routine compliance |
    
    **Scoring Adjustments:**
    - +1 if the stock is in Nifty 50 or Bank Nifty
    - +1 if unexpected (vs market expectations)
    - +1 if involves promoter/insider activity
    - -1 if already priced in (market didn't react)
    - -1 if from low-reliability source
    
    ## Sentiment Classification
    
    For each news item, classify sentiment:
    
    | Sentiment | Signal | Indicators |
    |-----------|--------|------------|
    | **Bullish** | 🟢 | Earnings beat, upgrade, promoter buying, positive guidance, policy tailwind |
    | **Bearish** | 🔴 | Earnings miss, downgrade, promoter selling/pledging, negative guidance, regulatory action |
    | **Neutral** | 🟡 | In-line results, routine filing, mixed signals |
    | **Ambiguous** | ⚪ | Complex event requiring analysis (e.g., M&A — good for buyer or target?) |
    
    ## Integration with Other Skills
    
    This skill is designed to feed actionable news into other skills:
    
    | News Type | Feed To | How |
    |-----------|---------|-----|
    | Major headline / policy event | **Scenario Analyzer** | "Analyze: [headline]" → 3 scenarios |
    | Stock earnings / corporate action | **India Stock Analysis** | "Analyze [stock] in context of [news]" |
    | Sector rotation signals | **India Market Breadth** | Check if breadth confirms sector narrative |
    | FII/DII bulk deal activity | **FII/DII Flow Tracker** | "What are institutional flows telling us about [sector]?" |
    | F&O regulatory change | **Options Strategy Advisor** | Check strategy impact of rule change |
    | Breakout candidate in news | **NSE VCP Screener** | Verify if news stock has VCP setup |
    
    ## Output Guidelines
    
    - **Recency**: Always show the most recent news first
    - **Source attribution**: Every news item must cite the source
    - **Timestamp**: Include date and time for each item
    - **Currency**: All amounts in INR (Rs., Cr, L)
    - **Fiscal year**: Use Indian FY convention (FY25 = April 2024 - March 2025)
    - **Trading symbol**: Always include NSE symbol alongside company name
    - **Market hours context**: Note if news came pre-market, during market, or post-market (affects price impact timing)
    - **Sentiment icon**: Use 🟢/🔴/🟡/⚪ for quick visual scanning
    - **Impact score**: Show [1-10] score for each significant item
    
    ## Quality Standards
    
    - Never present news older than requested timeframe without flagging it
    - Cross-reference breaking news across at least 2 sources before treating as confirmed
    - Distinguish between "rumor/report" and "confirmed announcement"
    - Flag if a news source has known bias or is promotional content
    - Include "price reaction" data when available — news without market reaction context is incomplete
    - Always note the market status (open/closed) when presenting news, as impact timing differs
    
    ## Error Handling
    
    - If web search returns no results for a specific source, move to next source in priority
    - If broker MCP is unavailable, proceed with web-only data
    - If a company cannot be resolved, ask user to clarify
    - If market is closed, note the timing context and present previous session's news
    - Always provide at least a basic briefing even if some sources fail
    
    ## Example Usage
    
    ```
    User: "Market news today"
    
    News Tracker:
    1. Fetches date context → Thursday, March 12, 2026, market open
    2. Parallel web searches across MoneyControl, ET, LiveMint
    3. Fetches STOCKS_IN_NEWS via Groww MCP
    4. Fetches VOLUME_SHOCKERS for unusual activity
    5. Categorizes 15-20 news items
    6. Scores each item (1-10)
    7. Cross-references top items with LTP for price reaction
    8. Generates daily briefing with:
       - Market overview (Nifty, Sensex, Bank Nifty)
       - Top 5 stories with impact scores
       - Stocks in focus (with price change)
       - Upcoming events (earnings, corporate actions)
       - Regulatory updates
       - Global cues for tomorrow
    ```
    
    ## Resources
    
    ### references/news_source_guide.md
    Detailed guide on Indian financial news sources, their strengths, biases, and optimal search patterns.
    
    ### references/sector_mapping.md
    Mapping of NSE sectors to indices, constituent stocks, and relevant news categories.
    
    ### references/sentiment_patterns.md
    Historical patterns of how Indian markets react to different news categories, with lag analysis.
    
    ### assets/daily_briefing_template.md
    Template for the daily market briefing output format.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related