Buy a close above the previous day's high just after an inside bar; hold for 10 sessions.
Backtest of Inside Bar Breakout on Nifty 50 from Dec 2005 to Nov 2026: CAGR 2.3%, max drawdown 30.6%, win rate 57.6% over 144 trades, vs buy-and-hold 11.0%.
As of · Hypothetical backtest by Jivani Markets on Nifty 50 daily data; re-run weekly
| Measure | Inside Bar Breakout | Buy and hold Nifty 50 |
|---|---|---|
| CAGR (annual return) | 2.3% | 11.0% |
| Total return | 62% | 783% |
| Max drawdown | −30.6% | −59.9% |
| ₹10 lakh became | ₹16.2 lakh | ₹88.3 lakh |
| Win rate | 57.6% | — |
| Trades (closed) | 144 | — |
| Winning / losing trades | 83 / 61 | — |
| Profit factor | 1.25 | — |
| Sharpe ratio | 0.32 | — |
| Volatility (annual) | 8.6% | — |
| Time in the market | 28% | 100% |
| Average holding | 10 sessions | — |
| Charges and slippage paid | ₹11,99,275 | — |
# Inside Bar Breakout on Nifty 50
universe("NIFTY 50", asset="index")
settings(
timeframe="1d",
entry_timing="next_open",
cost_model="retail",
slippage_model="tiered",
start="2006-01-01",
benchmark="NIFTY 50",
allow_short=False,
participation_ignore_zero_volume=True,
)
time_exit(bars=10)
buy(all_of(recently(inside_bar(), 2), close() > high().shift(1)), size=percent_of_equity(100))
| Year | Strategy | Buy and hold |
|---|---|---|
| 2026* | −4.1% | −4.2% |
| 2025 | −1.5% | +10.5% |
| 2024 | −4.2% | +8.8% |
| 2023 | −1.6% | +20.0% |
| 2022 | +1.8% | +4.3% |
| 2021 | −0.8% | +24.1% |
| 2020 | +26.8% | +14.9% |
| 2019 | +4.4% | +12.0% |
| 2018 | +1.1% | +3.1% |
| 2017 | +1.1% | +28.6% |
| 2016 | −0.9% | +3.0% |
| 2015 | −10.7% | −4.1% |
| 2014 | −9.1% | +31.4% |
| 2013 | +4.7% | +6.8% |
| 2012 | −4.7% | +27.7% |
| 2011 | −10.3% | −24.6% |
| 2010 | +16.7% | +17.9% |
| 2009 | +24.9% | +75.8% |
| 2008 | −12.0% | −51.8% |
| 2007 | +28.8% | +54.8% |
| 2006 | +11.7% | +39.9% |
| Bought | At | Sold | At | Return |
|---|---|---|---|---|
| 13 Jul 2026 | 24,075.46 | 27 Jul 2026 | 23,892.51 | −1.0% |
| 18 Jun 2026 | 24,109.91 | 3 Jul 2026 | 24,339.09 | +0.7% |
| 26 May 2026 | 24,040.11 | 10 Jun 2026 | 23,199.1 | −3.7% |
| 4 Feb 2026 | 25,713.56 | 18 Feb 2026 | 25,714.02 | −0.2% |
| 17 Sept 2025 | 25,314.51 | 1 Oct 2025 | 24,583.62 | −3.1% |
| 21 Aug 2025 | 25,179.71 | 5 Sept 2025 | 24,781.62 | −1.8% |
| 27 Jun 2025 | 25,615.02 | 11 Jul 2025 | 25,217.62 | −1.8% |
| 6 Jun 2025 | 24,785.82 | 20 Jun 2025 | 24,750.47 | −0.4% |
| 15 Apr 2025 | 23,403.4 | 30 Apr 2025 | 24,305.54 | +3.6% |
| 24 Jan 2025 | 23,218.68 | 6 Feb 2025 | 23,726.31 | +2.0% |
From 30 Dec 2005 to 9 Nov 2026, these Inside Bar Breakout rules on the Nifty 50 index returned a CAGR of 2.3% after costs, less than the 11.0% a year from buying and holding the index, with a worst fall of 30.6% against 59.9% for buy-and-hold. It made 144 trades and was invested 28% of the time. This is a hypothetical test on past data, not a recommendation, and past performance is not indicative of future results.
57.6%: 83 of 144 closed trades made money after charges and slippage. On a ₹10 lakh account the average winning trade made ₹36,702 and the average losing trade lost ₹39,829; the profit factor (gross profit ÷ gross loss) was 1.25. A high win rate with small wins can still lose money, so read it with the CAGR and drawdown.
Buy: An inside bar in the last two sessions and the close is above the previous day's high. Sell: After 10 sessions. 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 50 index over the same dates returned 11.0% a year with a worst fall of 59.9%; the strategy returned 2.3% a year with a worst fall of 30.6%. 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.