Buy below lower Bollinger band, sell at middle band
Buy when the price closes below the lower Bollinger band (20, 2) and sell at the middle band.
Survivorship mirage
It clears the bar on today's winners, the stocks everyone wishes they had bought, but not on the laggards, which is where hindsight can't help.
- It clears the bar on today's winners but not on the laggards: the winners' own rise did the work.
42 large US stocks, 15 years
Before costs +0.029R
By trade and by day, sized to a first try
What the numbers say
On the 22 laggards the idea averaged −0.046R per trade after costs across 4452 trades, against 0.096 on today's winners. Bull markets were −0.071 (t −4.88), flat −0.006 and bear −0.013. The edge showed only where stocks had already risen, so the verdict is a survivorship mirage.
How it was tested
Buy at the close when price closes below the lower Bollinger band (20, 2) and exit when the close reaches the middle band (20-day SMA).
- 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.01, by trade and by day, sized to a first try (one idea, tested once)
- Prices
- 15 years of daily bars through 2026-11-20; judged 2026-11-22
- Bollinger bands use a 20-day simple moving average and 2 population standard deviations of closing prices
- Signal is evaluated at the close and entry is at that same close
- Stop of 3 x ATR(14) and target of 6 x ATR(14) were chosen as wide protective levels since the idea names none
- The middle band is recomputed daily, so the exit level moves with the SMA
- Maximum hold of 30 trading days chosen as a time limit since the idea names none
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 | 2,692 | −0.071R | −4.88 | −5.80 · 1,243d | −0.074R · beats 65% | +0.116R |
| Flat | 1,078 | −0.006R | −0.24 | −1.80 · 354d | −0.062R · beats 100% | +0.056R |
| Bear | 682 | −0.013R | −0.45 | 0.00 · 163d | −0.021R · beats 65% | +0.097R |
| All | 4,452 | −0.046R | −0.064R | +0.096R |
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.4 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 BollingerLowerBandCloseToMiddleBand:
name = "bollinger_lower_band_close_to_middle_band"
description = "Long when close is below the lower Bollinger band (20, 2); exit when close reaches the 20-day SMA."
def __init__(self, period: int = 20, num_std: float = 2.0, atr_period: int = 14, stop_mult: float = 3.0, target_mult: float = 6.0) -> None:
self._period = period
self._num_std = num_std
self._atr_period = atr_period
self._stop_mult = stop_mult
self._target_mult = target_mult
def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
need = max(self._period, self._atr_period + 1)
if len(bars) < need:
return None
closes = [float(b.close) for b in bars[-self._period:]]
mean = sum(closes) / self._period
var = sum((c - mean) ** 2 for c in closes) / self._period
sd = math.sqrt(var)
lower = mean - self._num_std * sd
current = bars[-1]
if not (float(current.close) < lower):
return None
atr_val = atr(bars, self._atr_period)
if atr_val is None or atr_val <= 0:
return None
atr_dec = Decimal(str(atr_val))
entry = current.close
stop = entry - Decimal(str(self._stop_mult)) * atr_dec
target = entry + Decimal(str(self._target_mult)) * atr_dec
risk = entry - stop
if risk <= 0 or stop <= 0:
return None
rr = (target - entry) / risk
return Candidate(
ticker=ticker,
side="buy",
entry=entry,
stop=stop,
target=target,
risk_reward_ratio=rr.quantize(Decimal("0.01")),
signal_strength=50,
thesis="Close below the lower Bollinger band (20, 2); exit when close reaches the 20-day SMA.",
)
def exit_now(self, ticker: str, bars: list[Bar], entry: Decimal, side: str, bars_held: int) -> bool:
if len(bars) < self._period:
return False
closes = [float(b.close) for b in bars[-self._period:]]
mid = sum(closes) / self._period
return float(bars[-1].close) >= mid
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.