Buy a hammer candle while price is above its 200-day average; hold for 10 sessions.
Hammer Candle in an Uptrend on Nifty IT from Dec 2005 to Nov 2026: CAGR 4.3%, max drawdown 32.7%, win rate 58.6% over 191 trades, vs buy-and-hold 10.7%.
As of · Hypothetical backtest by Jivani Markets on Nifty IT daily data; re-run weekly
| Measure | Hammer Candle in an Uptrend | Buy and hold Nifty IT |
|---|---|---|
| CAGR (annual return) | 4.3% | 10.7% |
| Total return | 141% | 736% |
| Max drawdown | −32.7% | −65.7% |
| ₹10 lakh became | ₹24.1 lakh | ₹83.6 lakh |
| Win rate | 58.6% | — |
| Trades (closed) | 191 | — |
| Winning / losing trades | 112 / 79 | — |
| Profit factor | 1.29 | — |
| Sharpe ratio | 0.39 | — |
| Volatility (annual) | 13.3% | — |
| Time in the market | 37% | 100% |
| Average holding | 10 sessions | — |
| Charges and slippage paid | ₹18,35,883 | — |
# Hammer Candle in an Uptrend 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,
)
time_exit(bars=10)
buy(all_of(hammer(), close() > sma(200)), size=percent_of_equity(100))
| Year | Strategy | Buy and hold |
|---|---|---|
| 2026* | +7.2% | −14.3% |
| 2025 | −9.7% | −12.6% |
| 2024 | +0.3% | +22.0% |
| 2023 | +14.7% | +24.1% |
| 2022 | −16.8% | −26.0% |
| 2021 | +30.3% | +59.6% |
| 2020 | −1.6% | +54.9% |
| 2019 | −0.1% | +8.4% |
| 2018 | +31.4% | +23.8% |
| 2017 | −13.8% | +12.2% |
| 2016 | −4.9% | −7.3% |
| 2015 | −5.3% | 0.0% |
| 2014 | +13.3% | +17.8% |
| 2013 | +35.6% | +58.0% |
| 2012 | −8.2% | −1.9% |
| 2011 | −14.5% | −18.1% |
| 2010 | +16.8% | +28.8% |
| 2009 | +24.4% | +166.0% |
| 2008 | −2.2% | −54.6% |
| 2007 | +1.3% | −11.4% |
| 2006 | +15.1% | +39.9% |
| Bought | At | Sold | At | Return |
|---|---|---|---|---|
| 28 Oct 2026 | 31,486.06 | 9 Nov 2026 (end of test) | 32,452.67 | +2.8% |
| 20 Jan 2026 | 38,811.33 | 3 Feb 2026 | 40,240.95 | +3.5% |
| 5 Jan 2026 | 38,279.33 | 20 Jan 2026 | 38,695.07 | +0.9% |
| 15 Dec 2025 | 38,183.14 | 30 Dec 2025 | 38,224.13 | −0.1% |
| 28 Nov 2025 | 37,544.73 | 12 Dec 2025 | 38,146.55 | +1.4% |
| 18 Feb 2025 | 41,159.1 | 5 Mar 2025 | 37,231.32 | −9.8% |
| 21 Jan 2025 | 42,351.98 | 3 Feb 2025 | 41,529.81 | −2.2% |
| 27 Dec 2024 | 43,772.56 | 10 Jan 2025 | 43,665.9 | −0.5% |
| 26 Nov 2024 | 43,828.84 | 10 Dec 2024 | 44,781.23 | +1.9% |
| 30 Oct 2024 | 42,038.31 | 14 Nov 2024 | 42,255.27 | +0.3% |
From 30 Dec 2005 to 9 Nov 2026, these Hammer Candle in an Uptrend rules on the Nifty IT index returned a CAGR of 4.3% after costs, less than the 10.7% a year from buying and holding the index, with a worst fall of 32.7% against 65.7% for buy-and-hold. It made 191 trades and was invested 37% of the time. This is a hypothetical test on past data, not a recommendation, and past performance is not indicative of future results.
58.6%: 112 of 191 closed trades made money after charges and slippage. On a ₹10 lakh account the average winning trade made ₹55,847 and the average losing trade lost ₹61,296; the profit factor (gross profit ÷ gross loss) was 1.29. A high win rate with small wins can still lose money, so read it with the CAGR and drawdown.
Buy: A hammer candle (long lower wick) while the close is above the 200-day SMA. 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 IT index over the same dates returned 10.7% a year with a worst fall of 65.7%; the strategy returned 4.3% a year with a worst fall of 32.7%. 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.