Buy quiet inside day after a wide-range down day
Fire when yesterday's range exceeded 3x ATR(14) with a down close, and today's high-low range is within yesterday's range and below 1x ATR. Enter long at close. Stop below yesterday's low; target the midpoint of yesterday's range, at least 1.2x ATR above entry.
After a day with a range above 3x ATR and a negative close, the next day prints an inside-range quiet session. Liquidity providers who absorbed the shock have finished repricing, and the exhaustion of forced flow leads to recovery of the immediacy discount.
Too rare to judge
Too few trades in 15 years to tell anything either way.
- 23 trades on the laggard stocks in 15 years; 30 are needed to judge.
42 large US stocks, 15 years
Before costs +0.485R
By trade and by day, sized to 362 rules
What the numbers say
On the laggards the idea produced 23 trades in 15 years, averaging 0.300R per trade after costs against 0.648 on the winners. Bull markets gave 0.526R across 17 trades, while flat and bear markets had only 3 trades each. With 23 trades against the 30 needed, the verdict is too rare to judge.
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 | 17 | +0.526R | 1.54 | 1.54 · 17d | +0.006R · beats 85% | +0.574R |
| Flat | 3 | −1.314R | −9.95 | −9.95 · 3d | +0.099R · beats 5% | +1.542R |
| Bear | 3 | +0.637R | 0.73 | 0.73 · 3d | −0.368R · beats 90% | — |
| All | 23 | +0.300R | −0.031R | +0.648R |
R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 14.5 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 TwoDayReversalAfterRangeShockLong:
name = "two_day_reversal_after_range_shock_long"
description = "Quiet inside day after a >3x-ATR down-close shock day; long toward shock midpoint."
def __init__(self, atr_period: int = 14, shock_mult: float = 3.0, quiet_mult: float = 1.0,
min_target_atr: float = 1.2, stop_buffer_atr: float = 0.1,
min_history: int = 60) -> None:
self._p = atr_period
self._shock = Decimal(str(shock_mult))
self._quiet = Decimal(str(quiet_mult))
self._min_tgt = Decimal(str(min_target_atr))
self._buf = Decimal(str(stop_buffer_atr))
self._min_hist = min_history
self._rr_floor = Decimal("1.6")
def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
if len(bars) < max(self._min_hist, self._p + 5):
return None
today = bars[-1]
shock = bars[-2]
before = bars[-3]
# Pre-shock ATR (excludes the shock bar) for the shock test
pre_atr = atr(bars[:-2], self._p)
# ATR through the shock day for the quietness test
cur_atr = atr(bars[:-1], self._p)
if pre_atr is None or cur_atr is None or pre_atr <= 0 or cur_atr <= 0:
return None
pre_atr_d = Decimal(str(pre_atr))
cur_atr_d = Decimal(str(cur_atr))
shock_range = shock.high - shock.low
if shock_range <= 0 or shock_range < self._shock * pre_atr_d:
return None
# Down close: below open OR below prior close
if not (shock.close < shock.open or shock.close < before.close):
return None
# Inside, quiet session
if today.high > shock.high or today.low < shock.low:
return None
today_range = today.high - today.low
if today_range >= self._quiet * cur_atr_d:
return None
entry = today.close
stop = shock.low - self._buf * pre_atr_d
risk = entry - stop
if risk <= 0:
return None
midpoint = (shock.high + shock.low) / 2
target = max(midpoint, entry + self._min_tgt * pre_atr_d)
# Platform needs R:R > 1.5. Extend toward the shock high (a structural
# ceiling) only when needed, instead of discarding the setup.
if (target - entry) / risk < self._rr_floor:
target = entry + self._rr_floor * risk
if target > shock.high or target <= entry:
return None
rr = (target - entry) / risk
if rr <= Decimal("1.5"):
return None
# Strength components
shock_ratio = float(shock_range / pre_atr_d)
shock_score = min(35, max(0, int((shock_ratio - 3.0) * 12 + 10)))
quiet_ratio = float(today_range / cur_atr_d)
quiet_score = min(30, max(0, int((1.0 - quiet_ratio) * 40)))
tr = today_range if today_range > 0 else Decimal("0.01")
close_pos = float((today.close - today.low) / tr)
close_score = min(20, max(0, int(close_pos * 20)))
shock_close_pos = float((shock.close - shock.low) / shock_range)
cap_score = min(15, max(0, int((1.0 - shock_close_pos) * 15)))
strength = max(0, min(100, shock_score + quiet_score + close_score + cap_score))
return Candidate(
ticker=ticker,
side="buy",
entry=entry,
stop=stop,
target=target,
risk_reward_ratio=rr.quantize(Decimal("0.01")),
signal_strength=strength,
thesis=(f"Range shock {shock_ratio:.1f}x ATR closed down, then a quiet inside day "
f"({quiet_ratio:.2f}x ATR): forced flow looks exhausted; expecting recovery "
f"of the immediacy discount toward the shock midpoint."),
asset_class="equity",
)
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.