Verdict
No edge
As supplied the rule earns almost nothing: 0.2% a year on the Nifty 50 index and about 0% a year on a Nifty 500 stock portfolio before stress. At 2x costs the stock portfolio loses 7% a year. No variant of 144 clears 8% a year with drawdown under 20% in both periods.
- Replication. The code was reproduced line for line (vectorised regression over the previous 100 closes, ATR 14, z-score 20, entry at the signal bar's close, stop checked before target, fills at the stop or target price, risk 0.5%, one position, no costs). On the Nifty 50 index from 2008 to 2022 it made 52 trades, +2.8% in total (0.19% a year), worst drop 3.1%, Sharpe 0.18, because the 2-ATR stop sizing holds only a fifth of the account for a few days at a time.
- Realistic version on the index (signal at close, next-open entry, gap-aware exits, futures costs and carry): +2.1% in total at 1x costs, -0.3% at 2x and -1.6% at 3x.
- Stock portfolio (liquid Nifty 500 members, up to 8 positions sharing ₹5 lakh, 0.5% risk each, 2014 to 2025-09, delivery costs and 0.2% slippage a side): 1,204 trades, win rate 44%, average +0.6% a trade before charges. 1x costs: 0.0% a year, worst drop 43% (train 2014 to 2019: -2.9%, 36%; validation 2020 to 2025-09: +3.2%, 22%). 2x: -7.2% a year, worst drop 60%. 3x: -14.0%, worst drop 82%.
- Robustness grid of 144 combinations (z-score limit -1.0 to -2.5, R-squared 0.2 to 0.6, regression window 60 to 150 bars, four stop and target pairs). Positive in both periods: 21% at 1x costs and 6% at 2x. None reached 8% a year with drawdown under 20% in both periods, even at 1x. The best (z -2, stop 3 ATR, target 4.5 ATR) made 1% to 5% a year at 2x costs. Wider stops and targets help; tight ones lose most.
- Why it fails. Dips inside regression uptrends are common, but gaps through the 2-ATR stop (19% of trades lost more than 8%) and about 0.5% round-trip charges plus slippage consume the small average gain. In market sell-offs the oversold names fall together, which drove the large drawdowns in 2016, 2018 and 2020.
- What the supplied code overstates: it enters at the same close that generates the signal, fills stops at the stop price even after gaps, and charges no costs. Each of those flatters results.
Promotion gates
As supplied: -2.9% (train) and +3.2% (validation) at 1x; negative at 2x.
43% at 1x on the stock portfolio.
6% of 144 combinations positive in both periods at 2x.
Not opened; development gates failed.
Explain the strategy
The idea is to buy a good stock on a temporary dip. On paper this earned about nothing, and after fees and the habit of stocks to gap past the stop-loss it lost money.
Report
Ten best of 144 combinations by train CAGR at 2x costs (stock portfolio)
| z limit | R-squared min | regression bars | stop (ATR) | target (ATR) | train CAGR 2x | train max DD | validation CAGR 2x | validation max DD | trades |
|---|---|---|---|---|---|---|---|---|---|
| -2.0 | 0.2 | 60 | 3.0 | 4.5 | 1.2% | 17% | 3.1% | 17% | 585 |
| -2.0 | 0.35 | 100 | 3.0 | 4.5 | 1.1% | 16% | 3.0% | 14% | 522 |
| -1.5 | 0.2 | 60 | 3.0 | 4.5 | 0.7% | 12% | 4.1% | 14% | 617 |
| -2.0 | 0.6 | 60 | 3.0 | 4.5 | 0.6% | 17% | 5.1% | 11% | 547 |
| -2.0 | 0.35 | 60 | 3.0 | 4.5 | 0.5% | 14% | 4.9% | 13% | 544 |
| -2.5 | 0.6 | 60 | 3.0 | 4.5 | 0.4% | 14% | 5.2% | 11% | 470 |
| -2.0 | 0.2 | 150 | 3.0 | 4.5 | 0.4% | 16% | 2.1% | 13% | 518 |
| -1.5 | 0.2 | 150 | 3.0 | 4.5 | 0.3% | 12% | 2.4% | 12% | 513 |
| -1.0 | 0.2 | 150 | 3.0 | 4.5 | 0.0% | 12% | 2.9% | 14% | 521 |
| -1.5 | 0.35 | 60 | 3.0 | 4.5 | -0.1% | 16% | 2.9% | 13% | 589 |
Rules and parameters
Rules
- Signal: 100-bar linear regression of the previous closes has positive slope and R-squared of at least 0.35; 20-bar z-score of the close at or below -1.5; close above the prior close minus 2.5 ATR(14).
- Entry: as supplied at the signal close; realistic version at the next open plus slippage.
- Exit: stop at entry minus 2 ATR, target at entry plus 3 ATR, whichever is hit first (stop first inside a bar); gap-aware fills in the realistic version.
- Sizing: 0.5% of equity at risk per trade, capped at 15% of equity per stock; stock portfolio holds up to 8 positions, most oversold first.
- Costs: delivery brokerage, STT, stamp, exchange, DP charge and 0.2% slippage a side for stocks; futures costs and carry for the index; stress 2x and 3x.
Parameters
- capital
- ₹5,00,000 (stocks), ₹10,00,000 (index, as supplied)
- index window
- 2008 to 2022
- stock window
- 2014 to 2025-09
- train/validation
- 2014-2019 / 2020-2025-09
- hold-out
- 2025-10 onward and 2023 onward (index), not loaded
- code
- research/meanrev/
Instrument
Nifty 50 index and liquid Nifty 500 stocks · capital ₹500,000
Known limitations
- Survivorship: delisted members are missing from the stock data, which flatters long-only results.
- The 35% jump filter removes true crashes of that size.
- The index test uses price-index data and futures costs, not an executable order history.
Logs and raw data
Downloads appear once a data window is loaded.
Files are plain CSV so results can be re-computed independently. Trade dates are IST sessions; returns are net of modelled costs and slippage.