Long near 15-day low, calm volatility, above 200-day SMA
Fire when the close is within 1 ATR(14) of the 15-day low, 5-day realized volatility is below 0.7x its 20-day value, the close is above the open, and the stock is above its 200-day SMA. Enter long at close. Stop 1x ATR below the 15-day low; target the 15-day range midpoint, at least 1.5x ATR above entry.
Stocks pinned at the bottom of a 15-day range with shrinking realized volatility show seller exhaustion; tax-loss and rebalance-related selling has been absorbed. Short-term traders who anchor to the range bottom as support add demand, and covering by shorts at the support boundary produces a bounce.
Loses money
After costs it lost money on the stocks that decide the verdict.
- −0.081R a trade after costs on the laggard stocks.
42 large US stocks, 15 years
Before costs −0.006R
By trade and by day, sized to 362 rules
What the numbers say
On the laggard stocks the rule averaged −0.081R a trade after costs over 36 trades, below the bar of t 2.95. In bull markets it lost −0.408R over 31 trades (t −1.93) and beat only 10% of random-date draws. Flat markets showed 1.947R, but on just 5 trades, and there were no bear trades, so the verdict is a loss.
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 | 31 | −0.408R | −1.93 | −1.93 · 31d | +0.024R · beats 10% | +0.363R |
| Flat | 5 | +1.947R | 10.09 | 10.09 · 5d | +0.083R · beats 100% | +1.654R |
| Bear | 0 | — | — | — | — | — |
| All | 36 | −0.081R | +0.032R | +0.409R |
R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 5.7 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
import math
from core.domain import Bar
from strategies.indicators import atr, sma
from scanners.base import Candidate
class FifteenDayRangeBottomVolCompressionBounce:
name = "fifteen_day_range_bottom_vol_compression_bounce_long"
description = "Up-close within 1 ATR of the 15-day low with 5d/20d realized vol < 0.7, above the 200-SMA, in a range wide enough for a midpoint target at R:R >= 1.5."
def __init__(self, range_lookback: int = 15, atr_period: int = 14, proximity_atr: float = 1.0,
rv_short: int = 5, rv_long: int = 20, rv_ratio_max: float = 0.7,
stop_atr: float = 1.0, min_target_atr: float = 1.5, min_rr: float = 1.5,
trend_period: int = 200) -> None:
self._lb = range_lookback
self._atr_p = atr_period
self._prox = proximity_atr
self._rvs = rv_short
self._rvl = rv_long
self._rv_max = rv_ratio_max
self._stop_atr = stop_atr
self._min_tgt = min_target_atr
self._min_rr = min_rr
self._trend = trend_period
@staticmethod
def _rv(closes, n):
if len(closes) < n + 1:
return None
seg = closes[-(n + 1):]
rets = []
for i in range(1, len(seg)):
if seg[i - 1] <= 0 or seg[i] <= 0:
return None
rets.append(math.log(seg[i] / seg[i - 1]))
if len(rets) < 2:
return None
m = sum(rets) / len(rets)
var = sum((r - m) ** 2 for r in rets) / (len(rets) - 1)
return math.sqrt(var)
def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
if len(bars) < max(self._trend + 20, 220):
return None
cur = bars[-1]
c = cur.close
if c <= cur.open:
return None
sma_t = sma([b.close for b in bars], self._trend)
if sma_t is None or c <= Decimal(str(sma_t)):
return None
atr_val = atr(bars, self._atr_p)
if atr_val is None or atr_val <= 0:
return None
a = Decimal(str(atr_val))
window = bars[-self._lb:]
low_n = min(b.low for b in window)
high_n = max(b.high for b in window)
d = c - low_n
if d < 0 or d > Decimal(str(self._prox)) * a:
return None
closes = [float(b.close) for b in bars]
rv_s = self._rv(closes, self._rvs)
rv_l = self._rv(closes, self._rvl)
if rv_s is None or rv_l is None or rv_l <= 0:
return None
rv_ratio = rv_s / rv_l
if rv_ratio >= self._rv_max:
return None
stop = low_n - Decimal(str(self._stop_atr)) * a
risk = c - stop
if risk <= 0:
return None
mid = (high_n + low_n) / 2
floor_tgt = c + Decimal(str(self._min_tgt)) * a
target = mid if mid > floor_tgt else floor_tgt
# Explicit range-width condition (equivalent to the R:R floor when the midpoint carries the target):
# midpoint - close >= min_rr * risk <=> width >= 2*(min_rr*(d + stop_atr*ATR) + d)
width = high_n - low_n
min_rr_d = Decimal(str(self._min_rr))
required_width = 2 * (min_rr_d * risk + d)
reward = target - c
if reward <= 0:
return None
rr = reward / risk
if rr <= min_rr_d:
return None
# Strength components
comp = max(0.0, min(1.0, (self._rv_max - rv_ratio) / self._rv_max))
comp_score = int(35 * comp)
prox = 1.0 - float(d / (Decimal(str(self._prox)) * a))
prox_score = int(20 * max(0.0, min(1.0, prox)))
rng = cur.high - cur.low
close_pos = float((c - cur.low) / rng) if rng > 0 else 0.5
body = float((c - cur.open) / a)
bar_score = int(15 * max(0.0, min(1.0, close_pos))) + int(10 * max(0.0, min(1.0, body / 0.6)))
surplus = float(width / required_width) - 1.0 if required_width > 0 else 0.0
width_score = int(20 * max(0.0, min(1.0, surplus)))
strength = max(0, min(100, comp_score + prox_score + bar_score + width_score))
thesis = (
f"Up-close {float(d / a):.2f} ATR above the {self._lb}-day low with 5d/20d realized vol ratio {rv_ratio:.2f}, "
f"above the {self._trend}-SMA: seller exhaustion at range support. Range width {float(width / a):.1f} ATR "
f"vs required {float(required_width / a):.1f} ATR; stop 1 ATR under the range low, target range midpoint."
)
return Candidate(
ticker=ticker,
side="buy",
entry=c,
stop=stop,
target=target,
risk_reward_ratio=rr.quantize(Decimal("0.01")),
signal_strength=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.