TradeTech Analytics

All strategies · Review page

Nifty 500 weekly ranking with a pooled LightGBM: build, optimisation and test, 2010 to September 2025

Update 31 Oct 2026 (version 2). Frozen v2 re-run on survivorship-free data: validation 2018 to September 2025 21.3% at 1x and 18.7% at 2x (earlier 25.6%), development 2010 to 2017 10.7% (earlier 16.0%) with a 50% drawdown in 2011; correlation with the two Longbow strategies about 0.45. Read the survivorship-free re-test, comparison and Kelly analysis. The figures below are the earlier version (Dhan price history without delisted stocks, 4%/yr allowance) and are kept for the record.

Inspired by the owner's weekly-ranking write-up · specification fixed 31 Oct 2026 before any result (research/rank500/STRATEGY_RANK500.md, with dated disclosures) · ₹50 lakh · out-of-sample walk-forward from 2010 (the earlier studies here started in 2018) · sealed hold-out from October 2025 never loaded

Short answer. The pooled model has real, persistent ranking skill: over 16 out-of-sample years the top predicted decile beat the bottom one by 0.76% a week, monotonically and in every year, and the strategy built on it beat random picks from the same stock universe by a wide margin in both periods. Two portfolio versions were frozen on 2010-2017 data and run once on 2018 to September 2025. Both pass every pre-registered gate; the lower-turnover v2 (N = 30, rebalance Friday every second week, buffer k = 2.0, liquidity floor ₹5 crore, 5-session model) returned 25.6% a year net against 11.8% for the Nifty 500 price index (still 15.9% after the 4% survivorship allowance at three times the assumed costs), with a similar drawdown (36.2% vs 34.4%). The development margin was smaller (16.0% against 10.1%; alpha t = 0.8 after the allowance), so the validation margin should not simply be extrapolated. Three things keep this a candidate, not a proven edge: most of the return comes from small and mid-sized, less liquid stocks in a period when they boomed (2020 to 2023); 6 to 26% of past index members have no price history in our data (survivorship); and the weekly index-direction call has no skill (accuracy 54% against a 59% always-up baseline). The sealed period (October 2025 to October 2026) was opened once, at your instruction: in a falling market (index -5.2%) v2 gained 4.5% a year net against random picks' -8.0%; a forward paper run of v2 starts on 2 November 2026.

1. What the write-up asks for, what we kept and what we changed

Write-upHereHow
Pooled LightGBM, 5-day forward return, cross-sectional ranks, market context, VIX interactionsKept31 features: 17 within-day ranks, 10 market-context features, 4 rank × VIX-regime interactions
Purged expanding walk-forward, early stopping, regularised shallow treesKept, with 16 yearly folds (2010-2025) instead of 4Embargo 6 sessions (11 for the 10-session model); three seeds averaged
Label from the rebalance closeChangedLabel is the return from the next open to the open five sessions later, matching how a close-based signal can actually be traded
Target: raw returnChangedTarget is the cross-sectional rank of that return (market component removed); market direction is a separate head
Holding buffer, N sweep, weekday sweep, empty slots in cashKept and extendedBuffer k up to 3, liquidity floor, 10-session model blend, weekly or fortnightly cadence (version 2)
Cost: square-root impactChangedIndian delivery charges plus slippage by liquidity tier (v1: 0.05/0.10/0.20%; v2: 0.05/0.10/0.25/0.50%), stressed at 2x and 3x
Selection by robustness and low turnoverKept, with two safeguardsSelection among configurations positive in at least 60% of development years (and, in v2, alpha t above 1.5 at 2x costs and at least 4 turnovers a year)
Index-direction call from breadth of predictionsChangedSeparate small model on market features; evaluated honestly (section 8)

2. Data and test period

Year-endIndex membersWith price historyCoverage
201050029860%
201150030661%
201250031563%
201350032164%
201450032565%
201550033467%
201650134669%
201750135771%
201850136974%
201950138877%
202050139579%
202150141783%
202250142785%
202350144088%
202450145491%
202550146994%

3. The ranking model

Mean five-session return by predicted decile, overall and by liquidity: the ranking is monotone, but the long-side edge is concentrated in less liquid stocks
Mean five-session return by predicted decile, overall and by liquidity: the ranking is monotone, but the long-side edge is concentrated in less liquid stocks
Rank IC by test year
Rank IC by test year

Average daily rank IC across the 16 test years: 0.076 (range 0.041 to 0.114). Top-decile minus bottom-decile spread: 0.76% per five sessions overall. In stocks with more than ₹100 crore of daily traded value the top decile earns about the same as the average stock (0.45% vs 0.32%); the long-side edge sits in the ₹5 to ₹100 crore range and below. This is why the liquidity floor and the cost tiers matter.

4. Portfolio versions and results

v1 (as inspired, v1 costs): N = 30, rebalance Friday every week, buffer k = 1.0, liquidity floor ₹0.5 crore, 5-session model. v2 (improved, v2 costs): N = 30, rebalance Friday every second week, buffer k = 2.0, liquidity floor ₹5 crore, 5-session model. Both configurations were chosen on 2010-2017 only, by the pre-registered rules; validation was run once for each, together.

v2: the recommended version

PeriodCostsNet CAGRAfter 4%/yr allowanceNifty 500 priceSharpeMax drawdownIndex drawdownAlpha after allowanceYears ahead of indexTurnover (× capital a year)Costs a year
Development 2010-2017-121x16.0%12.0%10.1%1.0025.8%30.4%1.8% (t 0.8)75%4.11.3%
Development 2010-2017-122x14.3%10.3%10.1%0.9127.8%30.4%0.4% (t 0.2)62%4.22.7%
Development 2010-2017-123x12.6%8.6%10.1%0.8229.7%30.4%-1.0% (t -0.5)62%4.24.0%
Validation 2018-2025-091x25.6%21.6%11.8%1.2236.2%34.4%7.1% (t 2.2)88%7.42.0%
Validation 2018-2025-092x22.7%18.7%11.8%1.1236.0%34.4%4.9% (t 1.5)88%7.54.0%
Validation 2018-2025-093x19.9%15.9%11.8%1.0037.0%34.4%2.6% (t 0.8)75%7.56.0%

v1: close to the original design

PeriodCostsNet CAGRAfter 4%/yr allowanceNifty 500 priceSharpeMax drawdownIndex drawdownAlpha after allowanceYears ahead of indexTurnover (× capital a year)Costs a year
Development 2010-2017-121x22.0%18.0%10.1%1.3721.9%30.4%7.6% (t 3.0)88%21.16.4%
Development 2010-2017-122x13.8%9.8%10.1%0.9229.3%30.4%0.7% (t 0.3)88%21.513.1%
Development 2010-2017-123x6.2%2.2%10.1%0.4642.0%30.4%-6.3% (t -2.5)12%21.820.1%
Validation 2018-2025-091x29.0%25.0%11.8%1.2639.7%34.4%9.7% (t 2.3)88%28.17.0%
Validation 2018-2025-092x19.2%15.2%11.8%0.9141.3%34.4%1.8% (t 0.4)62%28.514.5%
Validation 2018-2025-093x10.1%6.1%11.8%0.5549.8%34.4%-6.1% (t -1.5)50%28.822.3%
Growth of ₹1 against the Nifty 500 price index
Growth of ₹1 against the Nifty 500 price index
Cost stress and yearly excess return in validation
Cost stress and yearly excess return in validation
Yearv2 net returnv1 net returnNifty 500 price index
201017.7%22.7%13.1%
2011-18.4%-14.1%-27.2%
201232.3%24.0%31.8%
201316.2%20.7%3.6%
201449.0%70.3%37.8%
201510.3%9.3%-0.7%
20160.5%14.5%3.8%
201733.5%45.7%35.9%
20180.7%3.2%-3.4%
20197.6%3.5%7.7%
202050.3%49.7%16.7%
202160.5%76.5%30.2%
20228.9%24.6%3.0%
202346.2%53.3%25.8%
202425.5%30.2%15.2%
202512.0%2.2%1.6%

2025 is January to September; 2018 to 2025 returns restart from cash on 1 January 2018.

5. Optimisation: what the grids showed

v1 grid on development data: net CAGR by N and weekday for three buffers
v1 grid on development data: net CAGR by N and weekday for three buffers
v2 grid: mean net CAGR by buffer and liquidity floor at 1x and 2x costs
v2 grid: mean net CAGR by buffer and liquidity floor at 1x and 2x costs

6. Controls

VersionRandom selection, development (median / 90th pct)Random selection, validationModel, developmentModel, validation20-day momentum / 5-day reversal ranks, validationWith index-head cash overlay, validationShifted sample 2012-2025 vs index
v25.9% / 8.2%11.0% / 14.2%16.0%25.6%23.7% (dd 58%) / 7.9%18.7% (t 0.7)22.4% vs 14.1%
v1-5.6% / -3.1%-1.7% / 0.6%22.0%29.0%11.9% (dd 77%) / -0.5%25.0% (t 1.8)29.4% vs 14.1%

7. Pre-registered pass rule

v2 conditionResultFigures
1. Validation net CAGR after the 4%/yr allowance at least the index, alpha t above 1.5 after the allowancepass21.6% vs 11.8%; t = 2.16
2. Net excess over the index positive in at least 60% of validation yearspass88% of years
3. Still ahead of the index (after the allowance) at 2x costspass18.7% vs 11.8%
4. Development CAGR above the 90th percentile of random selection; reality check p below 0.10pass16.0% vs null p90 8.2%; reality-check p = 0.000
5. Maximum drawdown within the index's plus 10 points; worst year above −25%passdrawdown 36.2% vs index 34.4%; worst year 0.7%
6. Plateau: at least 60% of neighbouring configurations positive in both periodspass100% of 11 neighbours
7. Shifted sample (first two years dropped) keeps the signpassalpha 3.1%, t = 1.31
v1 conditionResultFigures
1. Validation net CAGR after the 4%/yr allowance at least the index, alpha t above 1.5 after the allowancepass25.0% vs 11.8%; t = 2.33
2. Net excess over the index positive in at least 60% of validation yearspass88% of years
3. Still ahead of the index (after the allowance) at 2x costspass15.2% vs 11.8%
4. Development CAGR above the 90th percentile of random selection; reality check p below 0.10pass22.0% vs null p90 -3.1%; reality-check p = 0.000
5. Maximum drawdown within the index's plus 10 points; worst year above −25%passdrawdown 39.7% vs index 34.4%; worst year 2.2%
6. Plateau: at least 60% of neighbouring configurations positive in both periodspass100% of 6 neighbours
7. Shifted sample (first two years dropped) keeps the signpassalpha 8.5%, t = 3.13

All seven conditions pass for both versions at their assumed costs. v1 fails at 3x costs (10.1% against the 11.8% index) while v2 still earns 19.9% before and 15.9% after the allowance: another reason to prefer v2.

7b. Sealed hold-out, opened once (October 2025 to 28 October 2026)

On your instruction the sealed period was opened one time on the two frozen configurations (ledger: research/rank500/holdout_ledger.json). One model was trained on rows whose label ended before 1 October 2025 (same parameters and seeds) and the strategies started from cash. No gate was written for this period; it is reported as the last independent check. Window length is about 13 months, so statistical power is low.

VersionNet CAGR 1x costs2x3xAfter 4%/yr allowanceNifty 500 price indexMax drawdown vs indexAlpha after allowanceRandom selection (median / 90th pct)Turnover
v24.5%3.1%1.8%0.5%-5.3%16.5% vs 13.1%7.6% (t 1.2)-8.0% / -2.0%5.6
v110.9%5.2%-0.2%6.9%-5.3%14.0% vs 13.1%12.8% (t 2.0)-19.0% / -11.5%23.0

In a market that fell 5.2% over the window, v2 earned 4.5% a year net (the model beat the 90th percentile of random selection, -2.0%) but only 0.5% after the survivorship allowance, with alpha t = 1.2, below the 1.5 used in the validation gate. v1 earned 10.9% but fell to -0.2% at three times costs. The sealed period therefore supports the ranking skill (both versions are far above random picks and the index) without confirming a large absolute return; it also shows again that v2's low turnover is what keeps it cost-robust.

7c. Charts and trade details (v2, all three windows)

The same v2 book in each window: growth against the index, drawdown, how much of the book was invested, the shape of the trades, where the money was made, and the largest winners and losers. Per-trade, per-fill and per-day files are on the strategy page, which has the interactive equity chart, monthly table and the full trade log.

Per window: growth of ₹1 against the Nifty 500 price index, drawdown against the index, and the share of the book invested (the rest is cash).
Per window: growth of ₹1 against the Nifty 500 price index, drawdown against the index, and the share of the book invested (the rest is cash).
Distribution of round-trip returns (after slippage and charges are in the P&L; the return is price-to-price).
Distribution of round-trip returns (after slippage and charges are in the P&L; the return is price-to-price).
Holding periods. The buffer keeps winners, so many positions last months.
Holding periods. The buffer keeps winners, so many positions last months.
Realised P&L and costs by year (sealed window shown with its own exits).
Realised P&L and costs by year (sealed window shown with its own exits).

Which names made and lost the money

Across all three windows the 10 best names contributed 20% of total net P&L of ₹30,831,434 (394 names traded, 1594 round trips).

Best 10 namesTradesNet P&LAvg trade
LUPIN10₹842,59231.3%
CHOICEIN2₹833,45374.0%
GLENMARK16₹670,6088.0%
EICHERMOT7₹639,01331.9%
TATAMOTORS7₹573,47721.0%
TRENT5₹547,47416.2%
MARUTI7₹504,33024.9%
TATAELXSI8₹501,73420.3%
BAJAJ-AUTO9₹496,21213.4%
MCX4₹485,39419.6%
Worst 10 namesTradesNet P&LAvg trade
HEROMOTOCO12₹-316,378-3.1%
OFSS11₹-224,226-6.3%
CHAMBLFERT7₹-219,914-1.7%
KIMS2₹-214,896-18.2%
INDIACEM6₹-212,880-4.7%
SIEMENS7₹-210,552-0.0%
UTIAMC1₹-198,435-22.7%
NTPC7₹-196,922-8.4%
BALRAMCHIN7₹-196,777-2.0%
VTL1₹-195,192-41.3%

Ten best and ten worst round trips

NameEntryExitDaysEntry price*Exit price*ReturnNet P&LCostsWindow
CHOICEIN2023-10-162024-11-254062.837.29156.2%₹876,566₹5,621validation
MARUTI2014-01-202016-12-2610714.7313.81191.2%₹462,418₹1,913development
GLENMARK2025-02-172025-09-0820336.2156.5755.7%₹437,116₹4,217validation
TATAMOTORS2023-11-132024-07-292595.519.4971.6%₹428,624₹3,094validation
DIXON2023-11-132024-05-211909.1215.5069.4%₹415,396₹3,069validation
ZYDUSLIFE2024-01-232024-05-2111918.4529.2858.1%₹410,755₹3,829validation
INDHOTEL2022-10-172024-02-264978.3016.0292.5%₹408,599₹2,458validation
TORNTPHARM2023-11-282024-12-2339179.91131.2963.7%₹397,237₹3,443validation
MCX2025-03-032025-06-09983.865.8450.8%₹388,629₹4,623validation
SUNDARMFIN2023-05-152024-08-2646940.5373.0779.5%₹387,485₹4,012validation
NameEntryExitDaysEntry price*Exit price*ReturnNet P&LCostsWindow
HEROMOTOCO2024-09-232025-02-1714713.188.38-36.8%₹-348,075₹2,999validation
BPCL2024-09-092025-02-171619.056.45-29.0%₹-266,022₹3,032validation
SIEMENS2024-12-232025-04-0710565.0746.75-28.5%₹-248,916₹2,902validation
CUMMINSIND2024-06-032025-02-1725941.1530.44-26.4%₹-215,179₹2,744validation
INDIACEM2024-10-212025-02-171197.595.93-22.3%₹-206,816₹4,007validation
CHAMBLFERT2025-04-282025-08-049828.3621.98-22.9%₹-201,399₹3,353validation
COLPAL2024-08-262024-12-2311940.9232.07-22.0%₹-199,575₹3,124validation
UTIAMC2024-12-232025-03-03702.541.98-22.7%₹-198,435₹4,791validation
VTL2022-04-112022-06-136317.1210.13-41.3%₹-195,192₹2,262validation
KIMS2025-01-202025-03-03423.202.49-22.7%₹-192,044₹3,650validation

* Prices are split-adjusted to today by the project's rule, so they can differ from the quoted price on that day. Every trade, fill and cost is in the downloadable files on the review page (trade log and audit tables).

8. The index-direction call

Weekly direction call versus the majority-direction baseline
Weekly direction call versus the majority-direction baseline

A small LightGBM on market-context features (index returns and moving averages, volatility, VIX level and regime, breadth, drawdown from the 252-day high) predicts whether the Nifty 500 is higher five sessions later. Out of sample, Fridays 2010-2025: accuracy 53.7%, AUC 0.51 (0.50 is chance), against 56.8% for always predicting the majority direction. In validation: accuracy 53.8%, AUC 0.51. A rule that moves to cash on a bearish call reduced validation CAGR from 25.6% to 18.7% for v2. The weekly index call has no demonstrated skill and should not be used.

9. What could make this too good to be true, and the checks

10. Recommendation and next steps

  1. Forward paper run of v2: approved and scheduled. Frozen specification research/rank500/paper_spec.json; paper start Monday 2 November 2026, ₹50 lakh notional, decisions every second Friday close (first: 6 November), orders recorded for the next open with the v2 cost schedule, a model trained at the start and refitted each January. No orders or broker calls. A nightly job (19:50 IST) replays the run and updates the forward section of the review page.
  2. Sealed period: opened once (section 7b) and now spent for this strategy; it becomes training data for the forward models.
  3. Measure real execution costs on a small test basket in the ₹5 to ₹20 crore names before sizing up: this needs real orders and therefore your explicit instruction; none have been placed.
  4. Survivorship gap: work in progress (price histories of delisted and merged members from NSE archives); results are rerun if the data can be recovered.
  5. Do not use the weekly index call.

11. Sources and files

Prices and membership: Dhan daily bars and NSE Nifty 500 constituent snapshots held in the project (data/research); India VIX and Nifty 500 index: Yahoo Finance series held in data/niftyscalp. Code, pre-registration, results and figures: research/rank500/. Education and research only; not investment advice.


Research and education only. Hypothetical and back-tested results have inherent limitations and do not guarantee future results. Not investment advice; the publisher is not presented as a SEBI-registered investment adviser or research analyst.