Method & data quality
How the data was assembled, and the four defects that had to be found and fixed before any statistic could be trusted — including one fix that was too aggressive, caught, and reverted.
Raw market data from a broker API is not clean, and the errors are not random — they systematically inflate results. One uncleaned artifact in this dataset would have made a stock appear to return +112,250% in a single day and rank as the best performer of its year by a factor of roughly a thousand. Everything on this site is post-correction. This page documents what was changed and why.
Pipeline
| Step | What was done |
|---|
The four data defects
The fix that was too aggressive — caught and reverted
Eligibility rules
A stock enters a financial year's ranking only if all of these hold. This is why the eligible count grows from 316 to 473 — not because the universe changed, but because later constituents had not yet listed.
What was not corrected
Fetch facts
Two Kite API constraints shaped the fetch and are worth recording because they are easy to get silently wrong:
-
A
dayrequest is capped at 2000 days. Every token was therefore fetched in ≤1999-day chunks and merged — a single monolithic request fails outright. - A stock can change NSE series (EQ ↔ BE ↔ D1), and each series has a different instrument token whose history covers only its own span. Fetching one token silently truncates the series. All tokens per symbol were fetched and stitched.
Reproducibility
| Artifact | Purpose |
|---|---|
| REPORT.md | The full written report this site is built from |
| build_universe.py | Resolve universe + macro symbols to Kite instrument tokens (series changes, hyphenated symbols) |
| fetch_prices.py | Chunked, resumable Kite OHLCV fetch |
| audit.py | Data-quality audit run before any statistic |
| prep_panel.py | Cleaning, corporate-action repair, financial-year returns |
| analysis1…5 | The five analyses, each emitting JSON |
| export_web_data.py | Exports the same JSON that builds this site — so the site cannot drift from the report |
| diagnostics/ | The investigation scripts that found the defects listed above |