Skip to main content
This section documents the fundamental identity and classification fields that uniquely identify each stock and categorize it by industry, sector, and index membership.

Fields

Symbol
string
required
Stock ticker symbol as per NSE.Example: "RELIANCE"Source: NSE equity list
Name
string
required
Full company name.Example: "Reliance Industries Limited"Source: NSE equity master data
Listing Date
string
Date when the stock was first listed on the exchange.Format: YYYY-MM-DDExample: "1977-11-29"Source: NSE historical listing data via listing_date_mapDefault: "N/A" if not available
Basic Industry
string
Granular industry classification.Example: "Refineries"Source: Screener.in industry taxonomyDefault: "N/A" if not available
Sector
string
Broad sector classification.Example: "Energy"Source: Screener.in sector taxonomyDefault: "N/A" if not available
Index
string
Comma-separated list of indices the stock is a constituent of.Example: "NIFTY 50, NIFTY ENERGY, NIFTY 100"Source: Dhan API idxlist field filtered by requested index IDs:
requested_indices = {13,51,38,17,18,19,20,37,1,442,443,22,5,3,444,7,14,25,27,28,447,35,41,46,44,16,43,42,45,39,466,34,32,15,33,31,30,29}
Extraction Logic:
indices_found = []
idx_list_raw = tech.get("idxlist", [])
for idx_obj in idx_list_raw:
    idx_id = idx_obj.get("Indexid")
    idx_name = idx_obj.get("Name")
    if idx_id in requested_indices and idx_name:
        indices_found.append(idx_name)
stock_analysis["Index"] = ", ".join(indices_found) if indices_found else "N/A"
Default: "N/A" if stock is not part of any tracked index

Usage Context

These fields form the foundation for:
  • Stock identification in the output JSON (86 fields per stock across 2,775 stocks)
  • Sector and industry filtering for thematic analysis
  • Index-based screening for benchmark constituents
  • Historical context via listing date for maturity assessment

Data Flow

  1. Symbol & Name: Extracted from NSE equity list
  2. Listing Date: Mapped from listing_date_map dictionary
  3. Industry & Sector: Enriched from Screener.in fundamentals API
  4. Index: Parsed from Dhan technical API idxlist array filtered by predefined index IDs

Source Code Reference

  • Field extraction: bulk_market_analyzer.py:203-210, 271-281, 333
  • Output schema: all_stocks_fundamental_analysis.json

Build docs developers (and LLMs) love