Buy a hammer candle while price is above its 200-day average; hold for 10 sessions.
Hammer Candle in an Uptrend on Sensex from Dec 2005 to Nov 2026: CAGR 0.5%, max drawdown 47.7%, win rate 49.4% over 237 trades, vs buy-and-hold 10.9%.
As of · Hypothetical backtest by Jivani Markets on Sensex daily data; re-run weekly
| Measure | Hammer Candle in an Uptrend | Buy and hold Sensex |
|---|---|---|
| CAGR (annual return) | 0.5% | 10.9% |
| Total return | 11% | 764% |
| Max drawdown | −47.7% | −60.9% |
| ₹10 lakh became | ₹11.1 lakh | ₹86.4 lakh |
| Win rate | 49.4% | — |
| Trades (closed) | 237 | — |
| Winning / losing trades | 117 / 120 | — |
| Profit factor | 1.03 | — |
| Sharpe ratio | 0.10 | — |
| Volatility (annual) | 11.7% | — |
| Time in the market | 46% | 100% |
| Average holding | 10 sessions | — |
| Charges and slippage paid | ₹14,34,439 | — |
# Hammer Candle in an Uptrend on Sensex
universe("SENSEX", asset="index")
settings(
timeframe="1d",
entry_timing="next_open",
cost_model="retail",
slippage_model="tiered",
start="2006-01-01",
benchmark="SENSEX",
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* | −3.2% | −4.8% |
| 2025 | −7.6% | +9.1% |
| 2024 | +0.9% | +8.2% |
| 2023 | +11.8% | +18.7% |
| 2022 | +2.0% | +4.4% |
| 2021 | +11.0% | +22.0% |
| 2020 | +6.3% | +15.8% |
| 2019 | −11.3% | +14.4% |
| 2018 | −1.2% | +5.9% |
| 2017 | 0.0% | +27.9% |
| 2016 | −4.5% | +1.9% |
| 2015 | −13.7% | −5.0% |
| 2014 | +2.0% | +29.9% |
| 2013 | −8.9% | +9.0% |
| 2012 | −1.1% | +25.7% |
| 2011 | −12.2% | −24.6% |
| 2010 | +1.3% | +17.4% |
| 2009 | +35.5% | +81.0% |
| 2008 | −6.8% | −52.5% |
| 2007 | +12.5% | +47.1% |
| 2006 | +8.6% | +46.8% |
| Bought | At | Sold | At | Return |
|---|---|---|---|---|
| 19 Feb 2026 | 84,095.77 | 6 Mar 2026 | 79,539.5 | −5.6% |
| 30 Jan 2026 | 82,070.23 | 12 Feb 2026 | 83,842.48 | +1.9% |
| 4 Dec 2025 | 85,115.04 | 18 Dec 2025 | 84,391.55 | −1.1% |
| 29 Oct 2025 | 84,790.68 | 13 Nov 2025 | 84,399.1 | −0.7% |
| 24 Sept 2025 | 82,040.52 | 9 Oct 2025 | 81,777.15 | −0.5% |
| 10 Sept 2025 | 81,626.62 | 24 Sept 2025 | 81,794.77 | 0.0% |
| 14 Aug 2025 | 80,746.22 | 1 Sept 2025 | 79,709.25 | −1.5% |
| 31 Jul 2025 | 80,816.54 | 14 Aug 2025 | 80,504.34 | −0.6% |
| 7 Jul 2025 | 83,523.18 | 21 Jul 2025 | 81,795.65 | −2.3% |
| 30 May 2025 | 81,587.89 | 13 Jun 2025 | 80,307.17 | −1.8% |
From 30 Dec 2005 to 9 Nov 2026, these Hammer Candle in an Uptrend rules on the Sensex index returned a CAGR of 0.5% after costs, less than the 10.9% a year from buying and holding the index, with a worst fall of 47.7% against 60.9% for buy-and-hold. It made 237 trades and was invested 46% of the time. This is a hypothetical test on past data, not a recommendation, and past performance is not indicative of future results.
49.4%: 117 of 237 closed trades made money after charges and slippage. On a ₹10 lakh account the average winning trade made ₹28,376 and the average losing trade lost ₹26,779; the profit factor (gross profit ÷ gross loss) was 1.03. 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 Sensex index over the same dates returned 10.9% a year with a worst fall of 60.9%; the strategy returned 0.5% a year with a worst fall of 47.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.