Skip to content
The Casebook · An idea an AI invented

Quiet pullback to last week's high in an uptrend

Condition: close within 1.5% above the prior week's high (highest high of trading days 6 to 10 ago), the last 3 sessions each had volume below the 50-day average volume and a down or flat close, and 50-day SMA is rising. Entry long at close. Stop 1.0x ATR(14) below the prior week's high. Target 2.0x ATR(14) above close.
Why the AI thought it might work

In established uptrends, institutional accumulators are patient and avoid chasing; they buy retracements to the prior week's breakout area when selling volume dries up, because their order sizes require quiet tape. Low-volume pullbacks indicate absence of distribution, so the buy programs resume at known reference prices (prior weekly highs).

VerdictTested Nov 22, 2026

Too rare to judge

Too few trades in 15 years to tell anything either way.

  • 29 trades on the laggard stocks in 15 years; 30 are needed to judge.
Trades on the laggards
29

42 large US stocks, 15 years

Per trade, after costs
−0.176R

Before costs −0.055R

Bar to clear
t > 2.95

By trade and by day, sized to 362 rules

What the numbers say

On the laggard stocks the idea produced only 29 trades in 15 years, one short of the 30 needed, and averaged −0.176R per trade after costs. In bull markets (27 trades) the result was −0.221R, and it beat 30% of random-date draws; flat markets had just 2 trades and bear markets none. With too few trades to judge, no verdict is given.

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.

MarketTradesPer tradet, by tradet, by dayRandom datesWinners, per trade
Bull27−0.221R−0.84−0.84 · 27d−0.063R · beats 30%+0.251R
Flat2+0.429R0.290.29 · 2d+0.075R · beats 85%+0.353R
Bear0—————
All29−0.176R−0.053R+0.262R

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.1 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 code
from decimal import Decimal

from core.domain import Bar
from strategies.indicators import atr, sma
from scanners.base import Candidate


class LowVolumePullbackWeeklyHighLong:
    name = "low_volume_pullback_to_weekly_high_support_long"
    description = "Uptrend pullback on 3 quiet down/flat sessions closing within 1.5% above the prior week's high."

    def __init__(self, max_above_pct: float = 0.015, quiet_days: int = 3, vol_len: int = 50,
                 sma_len: int = 50, slope_lookback: int = 10, stop_atr: float = 1.0,
                 target_atr: float = 2.0, min_rr: float = 1.5) -> None:
        self._max_above = Decimal(str(max_above_pct))
        self._quiet = quiet_days
        self._vol_len = vol_len
        self._sma_len = sma_len
        self._slope_lb = slope_lookback
        self._stop_atr = Decimal(str(stop_atr))
        self._target_atr = Decimal(str(target_atr))
        self._min_rr = Decimal(str(min_rr))

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        if len(bars) < 220:
            return None
        cur = bars[-1]
        closes = [float(b.close) for b in bars]

        # Prior week = trading days 6-10 ago (today = day 1)
        prior_week = bars[-10:-5]
        pwh = max(b.high for b in prior_week)
        if pwh <= 0:
            return None
        close = cur.close
        if close < pwh or close > pwh * (Decimal("1") + self._max_above):
            return None

        # Current week must have traded above the prior weekly high (it was broken out)
        recent_high = max(b.high for b in bars[-5:])
        if recent_high <= pwh:
            return None

        # 50-SMA rising, price above it and above 200-SMA
        sma_now = sma(closes, self._sma_len)
        sma_prev = sma(closes[:-self._slope_lb], self._sma_len)
        sma_200 = sma(closes, 200)
        if sma_now is None or sma_prev is None or sma_200 is None:
            return None
        if sma_now <= sma_prev:
            return None
        if float(close) < sma_now or float(close) < sma_200:
            return None

        # Volume baseline excludes the quiet sessions
        base = bars[-(self._vol_len + self._quiet):-self._quiet]
        if len(base) < self._vol_len:
            return None
        avg_vol = sum(float(b.volume) for b in base) / len(base)
        if avg_vol <= 0:
            return None
        ratios = []
        for k in range(1, self._quiet + 1):
            b = bars[-k]
            prev = bars[-k - 1]
            if float(b.volume) >= avg_vol:
                return None
            if b.close > prev.close:
                return None
            ratios.append(float(b.volume) / avg_vol)

        atr_val = atr(bars, 14)
        if atr_val is None or atr_val <= 0:
            return None
        atr_dec = Decimal(str(atr_val))

        entry = close
        stop = pwh - self._stop_atr * atr_dec
        target = entry + self._target_atr * atr_dec
        risk = entry - stop
        reward = target - entry
        if risk <= 0 or reward <= 0 or stop <= 0:
            return None
        rr = reward / risk
        if rr < self._min_rr:
            return None

        # Strength: volume dryness, proximity to support, trend slope
        avg_ratio = sum(ratios) / len(ratios)
        vol_score = max(0.0, min(40.0, (1.0 - avg_ratio) * 80.0))
        dist_pct = float((close - pwh) / pwh)
        prox_score = max(0.0, min(30.0, (1.0 - dist_pct / float(self._max_above)) * 30.0))
        slope_pct = (sma_now - sma_prev) / sma_prev if sma_prev > 0 else 0.0
        slope_score = max(0.0, min(30.0, slope_pct * 1000.0))
        strength = int(max(0, min(100, vol_score + prox_score + slope_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"Rising 50-SMA uptrend; price pulled back on {self._quiet} quiet down/flat sessions "
                f"(avg {avg_ratio:.2f}x 50d volume) to {dist_pct*100:.2f}% above prior-week high {pwh}. "
                "Absence of distribution suggests accumulators will defend the weekly breakout level."
            ),
        )

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.

Have an idea of your own?

Describe it in plain words and get the same honest test in about a minute.

Run the Gauntlet
Quiet pullback to last week's high in an uptrend: Too rare to judge · EdgeProven