Buy a close above the highest high of the past 252 sessions; sell when the close falls below the 50-day average.
Backtest of 52-Week High Breakout on Nifty IT from Dec 2005 to Nov 2026: CAGR 6.2%, max drawdown 17.5%, win rate 58.3% over 24 trades, vs buy-and-hold 10.7%.
As of · Hypothetical backtest by Jivani Markets on Nifty IT daily data; re-run weekly
| Measure | 52-Week High Breakout | Buy and hold Nifty IT |
|---|---|---|
| CAGR (annual return) | 6.2% | 10.7% |
| Total return | 250% | 736% |
| Max drawdown | −17.5% | −65.7% |
| ₹10 lakh became | ₹35 lakh | ₹83.6 lakh |
| Win rate | 58.3% | — |
| Trades (closed) | 24 | — |
| Winning / losing trades | 14 / 10 | — |
| Profit factor | 5.15 | — |
| Sharpe ratio | 0.66 | — |
| Volatility (annual) | 10.2% | — |
| Time in the market | 26% | 100% |
| Average holding | 56 sessions | — |
| Charges and slippage paid | ₹2,37,116 | — |
# 52-Week High Breakout on Nifty IT
universe("NIFTY IT", asset="index")
settings(
timeframe="1d",
entry_timing="next_open",
cost_model="retail",
slippage_model="tiered",
start="2006-01-01",
benchmark="NIFTY IT",
allow_short=False,
participation_ignore_zero_volume=True,
)
exit_when(close() < sma(50))
buy(close() > high().highest(252).shift(1), size=percent_of_equity(100))
| Year | Strategy | Buy and hold |
|---|---|---|
| 2026* | 0.0% | −14.3% |
| 2025 | +0.6% | −12.6% |
| 2024 | +5.6% | +22.0% |
| 2023 | +4.1% | +24.1% |
| 2022 | −6.2% | −26.0% |
| 2021 | +30.6% | +59.6% |
| 2020 | +42.4% | +54.9% |
| 2019 | −4.0% | +8.4% |
| 2018 | +15.9% | +23.8% |
| 2017 | +3.6% | +12.2% |
| 2016 | 0.0% | −7.3% |
| 2015 | −0.4% | 0.0% |
| 2014 | +2.7% | +17.8% |
| 2013 | +27.2% | +58.0% |
| 2012 | 0.0% | −1.9% |
| 2011 | −6.9% | −18.1% |
| 2010 | −4.8% | +28.8% |
| 2009 | +23.2% | +166.0% |
| 2008 | 0.0% | −54.6% |
| 2007 | −2.7% | −11.4% |
| 2006 | +13.9% | +39.9% |
| Bought | At | Sold | At | Return |
|---|---|---|---|---|
| 27 Nov 2024 | 44,198.7 | 10 Jan 2025 | 43,665.9 | −1.4% |
| 15 Jul 2024 | 39,491.25 | 22 Oct 2024 | 41,494.02 | +4.8% |
| 12 Dec 2023 | 33,535.03 | 6 Mar 2024 | 36,572.71 | +8.8% |
| 5 Sept 2023 | 32,255.71 | 17 Oct 2023 | 31,836.42 | −1.5% |
| 28 Dec 2021 | 38,241.88 | 21 Jan 2022 | 36,299.77 | −5.3% |
| 9 Jun 2021 | 27,732.84 | 26 Oct 2021 | 35,128.93 | +26.4% |
| 17 Jul 2020 | 16,962.35 | 23 Feb 2021 | 24,896.3 | +46.5% |
| 25 Apr 2019 | 16,385.54 | 15 May 2019 | 15,769.66 | −4.0% |
| 23 Apr 2018 | 13,918.5 | 9 Oct 2018 | 15,282.19 | +9.6% |
| 8 Nov 2017 | 11,244.54 | 20 Mar 2018 | 12,366.42 | +9.7% |
From 30 Dec 2005 to 9 Nov 2026, these 52-Week High Breakout rules on the Nifty IT index returned a CAGR of 6.2% after costs, less than the 10.7% a year from buying and holding the index, with a worst fall of 17.5% against 65.7% for buy-and-hold. It made 24 trades and was invested 26% of the time. This is a hypothetical test on past data, not a recommendation, and past performance is not indicative of future results.
58.3%: 14 of 24 closed trades made money after charges and slippage. On a ₹10 lakh account the average winning trade made ₹2,21,855 and the average losing trade lost ₹60,274; the profit factor (gross profit ÷ gross loss) was 5.15. A high win rate with small wins can still lose money, so read it with the CAGR and drawdown.
Buy: The close is above the highest high of the previous 252 sessions (a new 52-week high). Sell: The close falls below the 50-day SMA. One position at a time with all of the capital; out of the market (in cash, earning nothing) between trades. Daily candles, long only, orders filled at the next session's open.
Buying and holding the Nifty IT index over the same dates returned 10.7% a year with a worst fall of 65.7%; the strategy returned 6.2% a year with a worst fall of 17.5%. A strategy that is out of the market part of the time usually gives up some return in rising years in exchange for missing part of the falls; the year-by-year table on this page shows where each one gained or lost.
Retail delivery charges (STT, exchange and SEBI fees, stamp duty and GST) and size-based slippage on every buy and sell; signals are read on the daily close and filled at the next session's open; price return only, so dividends are left out of both the strategy and buy-and-hold. An index cannot be bought directly; a fund or ETF that tracks it adds its own expense ratio and tracking error, and pays dividends this price-index test leaves out.
Yes. The "Run it yourself" link opens these exact rules in the Jivani Markets backtest builder, where you can change the indicator settings, add a stop-loss, pick other stocks or indices and re-run it on the latest data.