Overview
The EDL Pipeline produces a unified JSON file (all_stocks_fundamental_analysis.json.gz) containing 86 fields per stock across 2,775 stocks. This schema is the result of combining data from 12+ endpoints and processing through 4 pipeline phases.
Output File:
- Compressed:
all_stocks_fundamental_analysis.json.gz(~8-10 MB) - Uncompressed:
all_stocks_fundamental_analysis.json(~40 MB) - Records: 2,775 stocks
- Fields per stock: 86
Schema Visualization
1. Identity & Classification
Fields (6)
| Field | Type | Source | Example |
|---|---|---|---|
Symbol | string | dhan_data_response.json | "RELIANCE" |
Name | string | fundamental_data.json | "Reliance Industries Ltd" |
Listing Date | string | nse_equity_list.csv | "29-Nov-1977" |
Basic Industry | string | fundamental_data.json (CV.INDUSTRY_NAME) | "Refineries" |
Sector | string | fundamental_data.json (CV.SECTOR) | "Energy" |
Index | string | dhan_data_response.json (idxlist) | "NIFTY 50, NIFTY 100, NIFTY ENERGY" |
Index Membership
TheIndex field contains comma-separated index names. The pipeline tracks 37 major indices:
2. Fundamentals (Quarterly)
Fields (45)
Latest Quarter
| Field | Type | Calculation | Example | ||
|---|---|---|---|---|---|
Latest Quarter | string | cq.YEAR (split pipe, index 0) | "Q3-FY24" | ||
Net Profit Latest Quarter | float | cq.NET_PROFIT (index 0) | 18500.0 | ||
Net Profit Previous Quarter | float | cq.NET_PROFIT (index 1) | 17200.0 | ||
Net Profit 2 Quarters Back | float | cq.NET_PROFIT (index 2) | 16800.0 | ||
Net Profit 3 Quarters Back | float | cq.NET_PROFIT (index 3) | 15900.0 | ||
Net Profit Last Year Quarter | float | cq.NET_PROFIT (index 4) | 17800.0 | ||
QoQ % Net Profit Latest | float | ((Latest - Previous) / | Previous | ) * 100 | 7.56 |
YoY % Net Profit Latest | float | ((Latest - Last Year) / | Last Year | ) * 100 | 3.93 |
EPS (Earnings Per Share)
| Field | Type | Calculation | Example | ||
|---|---|---|---|---|---|
EPS Latest Quarter | float | cq.EPS (index 0) | 27.5 | ||
EPS Previous Quarter | float | cq.EPS (index 1) | 25.6 | ||
EPS 2 Quarters Back | float | cq.EPS (index 2) | 25.0 | ||
EPS 3 Quarters Back | float | cq.EPS (index 3) | 23.7 | ||
EPS Last Year Quarter | float | cq.EPS (index 4) | 26.5 | ||
QoQ % EPS Latest | float | ((Latest - Previous) / | Previous | ) * 100 | 7.42 |
YoY % EPS Latest | float | ((Latest - Last Year) / | Last Year | ) * 100 | 3.77 |
EPS Last Year | float | cy.EPS (index 0) — Annual | 98.5 | ||
EPS 2 Years Back | float | cy.EPS (index 1) — Annual | 92.3 |
Sales (Revenue)
| Field | Type | Calculation | Example | ||
|---|---|---|---|---|---|
Sales Latest Quarter | float | cq.SALES (index 0) | 234000.0 | ||
Sales Previous Quarter | float | cq.SALES (index 1) | 228000.0 | ||
Sales 2 Quarters Back | float | cq.SALES (index 2) | 225000.0 | ||
Sales 3 Quarters Back | float | cq.SALES (index 3) | 220000.0 | ||
Sales Last Year Quarter | float | cq.SALES (index 4) | 232000.0 | ||
QoQ % Sales Latest | float | ((Latest - Previous) / | Previous | ) * 100 | 2.63 |
YoY % Sales Latest | float | ((Latest - Last Year) / | Last Year | ) * 100 | 0.86 |
Sales Growth 5 Years(%) | float | ((Current / 5Y Ago)^(1/5) - 1) * 100 | 8.45 |
OPM (Operating Profit Margin)
| Field | Type | Calculation | Example | ||
|---|---|---|---|---|---|
OPM Latest Quarter | float | cq.OPM (index 0) | 12.5 | ||
OPM Previous Quarter | float | cq.OPM (index 1) | 11.8 | ||
OPM 2 Quarters Back | float | cq.OPM (index 2) | 12.1 | ||
OPM 3 Quarters Back | float | cq.OPM (index 3) | 11.5 | ||
OPM Last Year Quarter | float | cq.OPM (index 4) | 12.3 | ||
QoQ % OPM Latest | float | ((Latest - Previous) / | Previous | ) * 100 | 5.93 |
YoY % OPM Latest | float | ((Latest - Last Year) / | Last Year | ) * 100 | 1.63 |
OPM TTM(%) | float | ttm_cy.OPM | 12.2 |
Pipe-Separated Values:
All quarterly data from Indexing: 0=Latest, 1=Previous, 2=2Q Back, 3=3Q Back, 4=Same Quarter Last Year
fundamental_data.json comes as pipe-separated strings:3. Valuation Ratios
Fields (9)
| Field | Type | Calculation | Example |
|---|---|---|---|
Market Cap(Cr.) | float | CV.MARKET_CAP | 1658234.5 |
Stock Price(₹) | float | dhan_tech.Ltp | 2456.75 |
P/E | float | CV.STOCK_PE | 24.5 |
Forward P/E | float | P/E * (TTM EPS / Annualized Current EPS) | 23.8 |
Historical P/E 5 | float | Reserved for future use | 0.0 |
PEG | float | P/E / YoY EPS Growth | 6.5 |
ROE(%) | float | roce_roe.ROE | 14.8 |
ROCE(%) | float | roce_roe.ROCE | 16.2 |
D/E | float | Non-Current Liabilities / Total Equity | 0.29 |
Calculation Details
Forward P/E
PEG Ratio
D/E Ratio
4. Ownership & Float
Fields (4)
| Field | Type | Calculation | Example |
|---|---|---|---|
FII % change QoQ | float | sHp.FII[0] - sHp.FII[1] | 0.7 |
DII % change QoQ | float | sHp.DII[0] - sHp.DII[1] | 0.2 |
Free Float(%) | float | 100 - sHp.PROMOTER[0] | 49.6 |
Float Shares(Cr.) | float | (Market Cap / LTP) * (Free Float / 100) | 3345.2 |
Shareholding Pattern Logic
5. Technical Indicators
Fields (7)
| Field | Type | Source | Example |
|---|---|---|---|
RSI (14) | float | dhan_tech.DayRSI14CurrentCandle | 62.5 |
SMA Status | string | advanced_indicators (calculated) | "SMA 20: Above (4.9%) | SMA 50: Above (24.1%)" |
EMA Status | string | advanced_indicators (calculated) | "EMA 20: Above (6.3%) | EMA 200: Above (72.6%)" |
Technical Sentiment | string | advanced_indicators.TechnicalIndicators | "RSI: Neutral | MACD: Bearish" |
Pivot Point | string | advanced_indicators.Pivots[0].Classic.PP | "245.50" |
Gap Up % | float | Reserved (calculated from intraday data) | 0.0 |
SMA/EMA Status Calculation
For each SMA (20, 50, 200):6. Price Performance
Fields (9)
| Field | Type | Source | Example |
|---|---|---|---|
1 Day Returns(%) | float | dhan_tech.PPerchange | 1.23 |
1 Week Returns(%) | float | dhan_tech.PricePerchng1week | 2.1 |
1 Month Returns(%) | float | dhan_tech.PricePerchng1mon | -3.5 |
3 Month Returns(%) | float | dhan_tech.PricePerchng3mon | 8.2 |
6 Month Returns(%) | float | Reserved | 0.0 |
1 Year Returns(%) | float | dhan_tech.PricePerchng1year | 15.6 |
% from 52W High | float | ((LTP - High1Yr) / High1Yr) * 100 | -12.3 |
% from 52W Low | float | Reserved | 0.0 |
% from ATH | float | Calculated from ohlcv_data/*.csv | -18.5 |
Day Range(%) | float | Reserved | 0.0 |
Fields marked as “Reserved” are placeholders for future enhancements. They currently return
0.0.7. Volume & Liquidity
Fields (6)
| Field | Type | Source Phase | Example |
|---|---|---|---|
RVOL | float | Phase 4 (advanced_metrics_processor.py) | 1.45 |
200 Days EMA Volume | float | Phase 4 (advanced_metrics_processor.py) | 12500000.0 |
% from 52W High 200 Days EMA Volume | float | Phase 4 | -15.2 |
Daily Rupee Turnover 20(Cr.) | float | Phase 4 | 3450.5 |
Daily Rupee Turnover 50(Cr.) | float | Phase 4 | 3280.2 |
Daily Rupee Turnover 100(Cr.) | float | Phase 4 | 3120.8 |
30 Days Average Rupee Volume(Cr.) | float | Phase 4 | 3350.0 |
Calculation Logic
RVOL (Relative Volume)
RVOL > 1.5— High volume (50% above average)RVOL = 1.0— Average volumeRVOL < 0.5— Low volume (50% below average)
Daily Rupee Turnover
8. Volatility
Fields (4)
| Field | Type | Source Phase | Example |
|---|---|---|---|
5 Days MA ADR(%) | float | Phase 4 (advanced_metrics_processor.py) | 2.3 |
14 Days MA ADR(%) | float | Phase 4 | 2.5 |
20 Days MA ADR(%) | float | Phase 4 | 2.4 |
30 Days MA ADR(%) | float | Phase 4 | 2.6 |
ADR (Average Daily Range) Calculation
ADR > 5%— High volatilityADR 2-5%— Normal volatilityADR < 2%— Low volatility
9. Circuit & Price Bands
Fields (1)
| Field | Type | Source Phase | Example |
|---|---|---|---|
Circuit Limit | string | Phase 4 (add_corporate_events.py) | "20%" |
Circuit Limit Values
20%— Standard circuit (most stocks)10%— Restricted circuit5%— Highly restricted (ASM/GSM stocks)2%— Extreme restriction
complete_price_bands.json (NSE CSV)
10. Earnings Tracking
Fields (3)
| Field | Type | Source Phase | Example |
|---|---|---|---|
Quarterly Results Date | string | Phase 4 (process_earnings_performance.py) | "03-Mar-2024" |
Returns since Earnings(%) | float | Phase 4 | 8.5 |
Max Returns since Earnings(%) | float | Phase 4 | 12.3 |
Calculation Logic
- Results Date: Mar 3, 2024
- Pre-Earnings Close: ₹2,265
- Current Price: ₹2,456 → Returns = +8.5%
- Max Price Since Results: ₹2,543 → Max Returns = +12.3%
11. Event Markers
Field (1)
| Field | Type | Source Phase | Example |
|---|---|---|---|
Event Markers | array | Phase 4 (add_corporate_events.py) | See below |
Event Marker Structure
Complete Event Icons Reference
| Icon | Name | Trigger Condition |
|---|---|---|
| ★ | LTASM / STASM | Stock in ASM surveillance groups |
| 📊 | Results Recently Out | Results released in last 7 days |
| 🔑 | Insider Trading | SEBI Reg 7(2) / Form C filing in last 15 days |
| 📦 | Block Deal | Bulk/Block deal in last 7 days |
| # | +/- Revision | Price band revision detected (incremental_price_bands.json) |
| ⏰ | Results (DD-Mon) | Upcoming results announcement (with date) |
| 🎁 | Bonus (DD-Mon) | Upcoming bonus issue (with date) |
| ✂️ | Split (DD-Mon) | Upcoming stock split (with date) |
| 💸 | Dividend (DD-Mon) | Upcoming dividend (with ex-date) |
| 📈 | Rights (DD-Mon) | Upcoming rights issue (with date) |
Trigger Logic Examples
ASM/GSM Surveillance
Results Recently Out
Upcoming Dividend
12. Recent Announcements (Regulatory)
Field (1)
| Field | Type | Source Phase | Example |
|---|---|---|---|
Recent Announcements | array | Phase 4 (add_corporate_events.py) | See below |
Structure
Top 5 most recent regulatory filings:Data Source
Files:company_filings/{SYMBOL}_filings.json
Sorting: By news_date descending (newest first)
Limit: Top 5 announcements
13. News Feed (Media)
Field (1)
| Field | Type | Source Phase | Example |
|---|---|---|---|
News Feed | array | Phase 4 (add_corporate_events.py) | See below |
Structure
Top 5 most recent news items with AI sentiment:Data Source
Files:market_news/{SYMBOL}_news.json
Sorting: By published_date descending (newest first)
Limit: Top 5 news items
Sentiment Values
positive— Bullish news (🟢)neutral— Factual reporting (⚪)negative— Bearish news (🔴)
Complete Schema Example
Single Stock Record
Field Count Summary
| Category | Field Count |
|---|---|
| Identity & Classification | 6 |
| Fundamentals (Quarterly) | 45 |
| Valuation Ratios | 9 |
| Ownership & Float | 4 |
| Technical Indicators | 7 |
| Price Performance | 9 |
| Volume & Liquidity | 7 |
| Volatility | 4 |
| Circuit & Price Bands | 1 |
| Earnings Tracking | 3 |
| Event Markers | 1 |
| Recent Announcements | 1 |
| News Feed | 1 |
| Total | 86 |
Next Steps
Pipeline Architecture
Learn how these 86 fields are built through the 4-phase pipeline
Data Sources
Explore the 12+ endpoints that feed data into this schema