Skip to content
The Casebook · An idea an AI invented

Friday 5%+ weekly surge on volume at a 120-day high, long

Entry at latest close if today is a Friday (by date), the 5-day return exceeds 5%, weekly volume exceeds 1.3x the average of the previous 10 weeks, and the close is at a 120-day high. Stop 1.8 ATR below. Target 3.5 ATR above.
Why the AI thought it might work

Weekly closes at multi-month highs on heavy volume attract momentum funds that rebalance weekly and chase with a lag. Underweight institutions rebuild positions over subsequent days as the stock appears on relative-strength screens. The effect is concentrated at the weekly close, shown in daily bars on Fridays.

VerdictTested Nov 22, 2026

Loses money

After costs it lost money on the stocks that decide the verdict.

  • −0.085R a trade after costs on the laggard stocks.
Trades on the laggards
115

42 large US stocks, 15 years

Per trade, after costs
−0.085R

Before costs −0.005R

Bar to clear
t > 2.95

By trade and by day, sized to 362 rules

What the numbers say

On the laggard stocks the 115 trades averaged −0.085R after costs, and −0.005R before costs. Bull markets, where most trades fell (93), came to −0.206R and beat only 20% of random-date draws. Flat (0.412R, 18 trades) and bear (0.478R, 4 trades) markets looked better but are thin samples. The winners showed 0.331R.

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
Bull93−0.206R−1.54−1.08 · 82d+0.004R · beats 20%+0.386R
Flat18+0.412R1.111.26 · 15d−0.028R · beats 95%+0.077R
Bear4+0.478R0.810.81 · 4d+0.082R · beats 80%−0.649R
All115−0.085R+0.002R+0.331R

R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 9.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 code
from decimal import Decimal
import math

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


class WeeklyHighVolumeUpWeekFollowThroughLong:
    name = "weekly_high_volume_up_week_follow_through_long"
    description = "Friday close at a 120-day closing high after a >5% week on >1.3x average weekly volume; long for lagged momentum and institutional follow-through."

    def __init__(self, ret_min: float = 0.05, vol_mult: float = 1.3, high_lookback: int = 120,
                 vol_weeks: int = 10, stop_atr: float = 1.8, target_atr: float = 3.5,
                 min_stop_atr: float = 1.2, max_stop_atr: float = 2.5, buffer_atr: float = 0.25) -> None:
        self._ret_min = ret_min
        self._vol_mult = vol_mult
        self._hl = high_lookback
        self._vw = vol_weeks
        self._stop_atr = stop_atr
        self._target_atr = target_atr
        self._min_stop = min_stop_atr
        self._max_stop = max_stop_atr
        self._buf = buffer_atr

    def _ts(self, bar):
        try:
            return bar.timestamp
        except AttributeError:
            return bar.date

    def _wk(self, bar):
        iso = self._ts(bar).isocalendar()
        return (iso[0], iso[1])

    def scan(self, ticker: str, bars: list) -> Candidate | None:
        if len(bars) < max(self._hl + 10, 140):
            return None
        cur = bars[-1]
        try:
            if self._ts(cur).weekday() != 4:
                return None
        except Exception:
            return None

        # 5-day return
        c0 = float(bars[-6].close)
        c1 = float(cur.close)
        if c0 <= 0:
            return None
        ret5 = c1 / c0 - 1.0
        if ret5 <= self._ret_min:
            return None

        # 120-day closing high
        window = bars[-self._hl:]
        if c1 < max(float(b.close) for b in window):
            return None

        # Weekly volume grouping (average daily volume per week, robust to holiday weeks)
        weeks = []  # list of [key, vol_sum, n_days]
        for b in reversed(bars[-90:]):
            k = self._wk(b)
            if weeks and weeks[-1][0] == k:
                weeks[-1][1] += float(b.volume)
                weeks[-1][2] += 1
            else:
                weeks.append([k, float(b.volume), 1])
        if len(weeks) < self._vw + 1:
            return None
        cur_week = weeks[0]
        cur_adv = cur_week[1] / cur_week[2]
        prev = weeks[1:self._vw + 1]
        prev_adv = sum(w[1] / w[2] for w in prev) / len(prev)
        if prev_adv <= 0:
            return None
        vol_ratio = cur_adv / prev_adv
        if vol_ratio <= self._vol_mult:
            return None

        atr_val = atr(bars, 14)
        if atr_val is None or float(atr_val) <= 0:
            return None
        a = float(atr_val)

        # Structural stop: below this week's low, clamped to sensible ATR band
        week_n = cur_week[2]
        week_low = min(float(b.low) for b in bars[-week_n:])
        week_high = max(float(b.high) for b in bars[-week_n:])
        struct_stop = week_low - self._buf * a
        dist = c1 - struct_stop
        dist = max(self._min_stop * a, min(self._max_stop * a, dist))
        # blend with operator's 1.8 ATR rule: use the tighter of structure and max band, default near 1.8
        if dist > self._stop_atr * a and (c1 - struct_stop) > self._max_stop * a:
            dist = self._stop_atr * a
        risk = dist
        rr_mult = self._target_atr / self._stop_atr
        entry = cur.close
        stop = Decimal(str(round(c1 - risk, 4)))
        target = Decimal(str(round(c1 + rr_mult * risk, 4)))
        if not (stop < entry < target) or stop <= 0:
            return None
        rr = (target - entry) / (entry - stop)
        if rr < Decimal("1.5"):
            return None

        # Strength
        vol_score = min(35.0, max(0.0, (vol_ratio - self._vol_mult) / 1.2 * 35.0))
        ret_score = min(25.0, max(0.0, (ret5 - self._ret_min) / 0.10 * 25.0))
        rng = week_high - week_low
        close_pos = (c1 - week_low) / rng if rng > 0 else 0.5
        close_score = min(20.0, max(0.0, close_pos * 20.0))
        sma200 = sma([b.close for b in bars], 200) if len(bars) >= 200 else None
        trend_score = 10.0
        if sma200 is not None:
            trend_score = 20.0 if c1 > float(sma200) else 5.0
        strength = int(max(0, min(100, round(vol_score + ret_score + close_score + trend_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"Friday weekly close at a {self._hl}-day high, +{ret5*100:.1f}% on the week with "
                    f"{vol_ratio:.2f}x average weekly volume; expect lagged momentum-fund and "
                    f"underweight-institution follow-through. Stop under the weekly low."),
            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.

Have an idea of your own?

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

Run the Gauntlet
Friday 5%+ weekly surge on volume at a 120-day high, long: Loses money · EdgeProven