The hammer is the first candle every chart course teaches: the market sells off during the day, buyers push it back up, and it closes near the high with a long lower wick. Put that wick on the 50-day moving average after a pullback and many traders call it a textbook buy.
I tested it on the S&P 500 since 2014. The candle sets everything: the stop goes under the hammer’s low and the target twice that distance above its close. 8 closed trades.
The rules
- Buy when the S&P 500 prints a hammer that touches its 50-day moving average: the day’s low is at or below the 50-day and the close is at or above it.
- A hammer: the lower shadow is at least twice as long as the body, and the upper shadow is at most a quarter of the day’s range. It has to come after a fall: the close is below the close five trading days earlier.
- Sell when a close goes below the hammer’s low (the stop), when a close goes above the hammer’s close plus twice its distance to the low (the target, 2R), or after 20 trading days. All three are fixed on the day of the buy signal.
- Daily open, high, low and close from January 2014 (older S&P 500 opens in the free data are copies of the previous close). Long only; in cash between trades.
Market: S&P 500 index (^GSPC), price only, dividends not included.
The result
| Hammer at the 50-day | Buy-and-hold | |
|---|---|---|
| Annual return | −0.56% | 11.90% |
| Total return | −7% | 319% |
| Max drawdown | −8.0% | −33.9% |
| Worst fall, from – to | Jan 2014 – May 2019 | Feb 2020 – Mar 2020 |
| Time in the market | 1% | 100% |
| Trades | Value |
|---|---|
| Closed trades | 8 |
| Winners | 4 (50.0%) |
| Average winner | +0.31% |
| Average loser | −2.06% |
| Win/loss ratio | 0.15 |
| Profit factor | 0.15 |
| Best / worst trade | +0.7% / −5.3% |
| Average holding time | 2 sessions |
My read
The first result is how rare it is. Chart courses make it look common, but on daily bars of the index the rule found 8 trades in 13 years, fewer than one a year. It was in the market 0.5% of the days.
The second is that it did not work. 50% of the trades won, but the average winner made 0.31% and the average loser lost 2.06%. The trades were over in 2 days on average, and none lasted long enough to reach the 20-day exit. The worst, bought in Oct 2018 during that month’s sell-off, lost 5.3%: the market fell well through the stop before the rule could sell.
Over the whole period it lost 0.6% a year while holding the S&P 500 made 11.9% a year. Its worst fall was 8% against 34% for holding, but that is only because it was almost never in the market. The latest hammer printed on Sep 18, 2026; the next close was already above the target, so the rule sold a day later for a flat trade.
My read: a hammer on the 50-day is a reason to look closer, not a reason to buy. On the index it is too rare to trade on its own, and the low of one day’s candle is too close to survive ordinary daily noise. If I use it at all, it is as a sign that buyers showed up at a level I was already watching, with the stop where the whole chart says I am wrong.
Every trade
8 closed trades, newest first
| Bought | Price | Sold | Price | Result |
|---|---|---|---|---|
| 2026-09-21 | 7,765 | 2026-09-22 | 7,765 | −0.0% |
| 2023-09-12 | 4,462 | 2023-09-13 | 4,467 | +0.1% |
| 2023-02-24 | 3,970 | 2023-03-02 | 3,981 | +0.3% |
| 2019-05-10 | 2,881 | 2019-05-14 | 2,834 | −1.6% |
| 2018-10-09 | 2,880 | 2018-10-11 | 2,728 | −5.3% |
| 2017-07-12 | 2,443 | 2017-07-17 | 2,459 | +0.7% |
| 2017-04-12 | 2,345 | 2017-04-17 | 2,349 | +0.2% |
| 2014-09-30 | 1,972 | 2014-10-02 | 1,946 | −1.3% |
How it was tested
- Signals are read on the daily close; each trade happens at the next day’s close. No look-ahead.
- Long only, fully in or fully out. No commissions, slippage, interest or dividends.
- The test starts on the first day every indicator has a value (Jan 2, 2014); buy-and-hold covers the same days.
- Prices: Yahoo Finance daily data (^GSPC), snapshot
spx-2026-09-30.csv. Checked by a second, independent program before publishing.
Not financial advice. This is educational content, shared for information and entertainment only, and it is not a recommendation to buy or sell any asset. Backtests and past results do not guarantee future results, and the numbers or charts here may contain mistakes. Trading carries risk, including losing all the money you put in. Do your own research before you make any decision.