Buy after a panic bar closing near its low
Entry at latest close if latest bar's range >= 4*ATR(14) (ATR computed over bars prior to it), close is in the lower 35% of that range and below the open, and close is above the 252-day low. Stop = bar low minus 0.3*ATR(14). Target = entry + 2.0*ATR(14).
A bar whose range exceeds 4x ATR and closes in the lower third signals forced or panic liquidation. The immediate aftermath sees market-makers' inventory at extremes; providers earn a premium by buying, and price recovers part of the move over days. Large bars in a single stock are visible from OHLC.
Too rare to judge
Too few trades in 15 years to tell anything either way.
- 24 trades on the laggard stocks in 15 years; 30 are needed to judge.
42 large US stocks, 15 years
Before costs −0.526R
By trade and by day, sized to 362 rules
What the numbers say
Only 24 trades on the laggards in 15 years, short of the 30 needed to judge. They averaged −0.773R per trade after costs, against 0.153 on today's winners. The bull-market group (18 trades) beat 0.6 of random-date draws; the flat (4 trades) and bear (2 trades) groups beat none.
How it was tested
The rule as written, coded once, run on every stock the same way.
- Side
- Long
- Time limit
- Exit at the close after 30 trading days, unless the stop, the target or its own exit comes first
- Bar to clear
- t > 2.95, by trade and by day, sized to the 362 rules in the search it came from
- Prices
- 15 years of daily bars through 2026-11-20; judged 2026-11-22
The evidence
The laggards decide: 22 large stocks that lagged or fell, where hindsight can't flatter a rule. Today's winners sit beside them to show what survivorship would add.
| Market | Trades | Per trade | t, by trade | t, by day | Random dates | Winners, per trade |
|---|---|---|---|---|---|---|
| Bull | 18 | −0.241R | −0.34 | −0.13 · 16d | −0.275R · beats 60% | +0.358R |
| Flat | 4 | −2.121R | −2.59 | −2.59 · 4d | −0.263R · beats 0% | −1.106R |
| Bear | 2 | −2.863R | −1.82 | −1.82 · 2d | −0.985R · beats 0% | −1.439R |
| All | 24 | −0.773R | −0.333R | +0.153R |
R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 12.9 bps) plus 0.045R for the fills a real order wouldn't get. “By day” groups trades opened the same day, so a rule that fires on the same dates for every stock counts as a few events. “Random dates” places the same plan on random days of the same stocks in the same kind of market, 20 times; the idea must beat 95% of those draws.
The scanner we wroteShow the codeHide
from decimal import Decimal
from core.domain import Bar
from strategies.indicators import atr
from scanners.base import Candidate
class ExtremeRangePanicBarReversionLong:
name = "extreme_range_panic_bar_reversion_long"
description = "Buy the close of a >=4x-ATR weak-closing panic bar (intraday-driven, above 252d low), expecting partial mean reversion."
def __init__(self, atr_period: int = 14, range_mult: float = 4.0, max_close_pos: float = 0.35, stop_atr_buffer: float = 0.3, target_atr_mult: float = 2.0, low_lookback: int = 252, max_gap_share: float = 0.75, rr_floor: float = 1.6) -> None:
self._atr_period = atr_period
self._range_mult = Decimal(str(range_mult))
self._max_close_pos = Decimal(str(max_close_pos))
self._stop_buf = Decimal(str(stop_atr_buffer))
self._target_mult = Decimal(str(target_atr_mult))
self._low_lookback = low_lookback
self._max_gap_share = Decimal(str(max_gap_share))
self._rr_floor = Decimal(str(rr_floor))
def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
if len(bars) < self._low_lookback + 5:
return None
cur = bars[-1]
prev = bars[-2]
a = atr(bars[:-1], self._atr_period)
if a is None or a <= 0:
return None
a_d = Decimal(str(a))
rng = cur.high - cur.low
if rng <= 0 or rng < self._range_mult * a_d:
return None
close_pos = (cur.close - cur.low) / rng
if close_pos > self._max_close_pos:
return None
if cur.close >= cur.open:
return None
prior_low = min(b.low for b in bars[-(self._low_lookback + 1):-1])
if cur.close <= prior_low:
return None
# Gap vs intraday split: reject bars where nearly all damage was an overnight gap
decline = prev.close - cur.close
gap = prev.close - cur.open
if gap < 0:
gap = Decimal("0")
if decline > 0:
gap_share = gap / decline
if gap_share > Decimal("1"):
gap_share = Decimal("1")
else:
gap_share = Decimal("0")
if gap_share > self._max_gap_share:
return None
entry = cur.close
stop = cur.low - self._stop_buf * a_d
risk = entry - stop
if risk <= 0:
return None
target = entry + self._target_mult * a_d
extended = False
if (target - entry) / risk < self._rr_floor:
# Platform requires R:R > 1.5; for very large bars scale target to the bar's own structure
target = entry + self._rr_floor * risk
extended = True
if target > cur.high:
return None
rr = (target - entry) / risk
if rr <= Decimal("1.5"):
return None
range_x = float(rng / a_d)
range_score = min(30, max(0, int((range_x - 4.0) * 10) + 10))
cp = float(close_pos)
close_score = min(25, max(0, int((0.35 - cp) / 0.35 * 25)))
intraday_score = min(25, max(0, int((1.0 - float(gap_share)) * 25)))
vols = [float(b.volume) for b in bars[-21:-1]]
avg_vol = sum(vols) / max(len(vols), 1)
vol_ratio = float(cur.volume) / max(avg_vol, 1.0)
vol_score = min(20, max(0, int((vol_ratio - 1.0) * 8)))
strength = max(0, min(100, range_score + close_score + intraday_score + vol_score))
kind = "intraday collapse" if gap_share < Decimal("0.4") else "gap plus intraday selling"
tgt_note = "target scaled to 1.6R of bar structure" if extended else "target entry+2ATR"
thesis = (
f"Panic bar: range {range_x:.1f}x ATR, close at {cp*100:.0f}% of range, below open, "
f"{kind} (gap share {float(gap_share)*100:.0f}%), vol {vol_ratio:.1f}x avg; above 252d low. "
f"Liquidity providers absorbing forced selling should earn partial reversion; {tgt_note}, stop under bar low."
)
return Candidate(
ticker=ticker,
side="buy",
entry=entry,
stop=stop,
target=target,
risk_reward_ratio=rr.quantize(Decimal("0.01")),
signal_strength=int(strength),
thesis=thesis,
)
Hypothetical results from our own backtest of the rule as restated, on 42 large US stocks over 15 years. Past performance, real or simulated, does not predict future results. Research and education only; not investment advice.
Describe it in plain words and get the same honest test in about a minute.