Skip to content
The Casebook · An idea an AI invented

Friday strong close above 50-day average, 1.3x ATR stop

Entry at latest close if it is Friday, close is above the 50-day SMA, close is in the top 35% of the day's range, and the 5-day return is positive but below 1.5x ATR(14) in magnitude. Stop = entry minus 1.3x ATR(14). Target = entry plus 1.3x ATR(14).
Why the AI thought it might work

Institutions and risk-managed accounts de-risk before weekends, creating a Friday-close discount for holding weekend gap risk; stocks that close strongly on Friday in uptrends see Monday-Wednesday positive drift as the risk premium is collected. Day-of-week is visible in the dates and a trend-and-strength condition keeps the signal stock-specific.

VerdictTested Nov 22, 2026

Loses money

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

  • −0.136R a trade after costs on the laggard stocks.
Trades on the laggards
1,531

42 large US stocks, 15 years

Per trade, after costs
−0.136R

Before costs +0.009R

Bar to clear
t > 2.95

By trade and by day, sized to 362 rules

What the numbers say

On the laggard stocks it averaged −0.136R a trade after costs over 1531 trades, against 0.009R before costs, so costs account for the loss. It lost in bull markets (−0.138R) and flat markets (−0.193R); bear markets showed 0.062R on 92 trades (t 0.43). The winners averaged 0.05R.

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
Bull1,164−0.138R−3.23−1.60 · 390d−0.116R · beats 25%+0.040R
Flat275−0.193R−2.24−1.08 · 85d−0.071R · beats 5%+0.038R
Bear92+0.062R0.430.53 · 34d−0.082R · beats 70%+0.273R
All1,531−0.136R−0.106R+0.050R

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 FridayStrengthWeekendPremiumLong:
    name = "friday_strength_weekend_risk_premium_long"
    description = "Strong up-Friday close above the 50-SMA with modest 5-day gain; short-horizon long to collect the weekend risk premium."

    def __init__(self, sma_len: int = 50, atr_len: int = 14, close_pos_min: float = 0.65,
                 ret5_atr_max: float = 1.5, stop_buffer_atr: float = 0.2,
                 min_risk_atr: float = 0.5, max_risk_atr: float = 1.3,
                 rr_target: float = 1.6) -> None:
        self._sma_len = sma_len
        self._atr_len = atr_len
        self._close_pos_min = close_pos_min
        self._ret5_atr_max = ret5_atr_max
        self._stop_buffer_atr = stop_buffer_atr
        self._min_risk_atr = min_risk_atr
        self._max_risk_atr = max_risk_atr
        self._rr_target = rr_target

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        need = max(self._sma_len + 10, 70)
        if len(bars) < need:
            return None
        cur = bars[-1]
        prev = bars[-2]
        try:
            ts = cur.timestamp
            pts = prev.timestamp
        except Exception:
            return None
        if ts.weekday() != 4:
            return None
        gap_days = (ts.date() - pts.date()).days
        if gap_days <= 0 or gap_days > 4:
            return None

        close = float(cur.close)
        high = float(cur.high)
        low = float(cur.low)
        prev_close = float(prev.close)
        if close <= 0 or high <= low:
            return None

        closes = [float(b.close) for b in bars]
        sma_now = sma(closes, self._sma_len)
        if sma_now is None or close <= float(sma_now):
            return None

        close_pos = (close - low) / (high - low)
        if close_pos < self._close_pos_min:
            return None
        if close <= prev_close:
            return None

        atr_val = atr(bars, self._atr_len)
        if atr_val is None:
            return None
        a = float(atr_val)
        if a <= 0:
            return None

        ret5 = close - closes[-6]
        if ret5 <= 0 or ret5 >= self._ret5_atr_max * a:
            return None

        # Structural stop: just under Friday's low, clamped to a sane ATR band
        risk = close - (low - self._stop_buffer_atr * a)
        risk = max(self._min_risk_atr * a, min(self._max_risk_atr * a, risk))
        if risk <= 0:
            return None
        entry = cur.close
        risk_d = Decimal(str(round(risk, 6)))
        stop = entry - risk_d
        target = entry + Decimal(str(self._rr_target)) * risk_d
        if not (stop < entry < target) or stop <= 0:
            return None
        rr = (target - entry) / (entry - stop)
        if rr < Decimal("1.5"):
            return None

        # Strength: close quality, trend alignment, volume, move moderation
        close_score = int(min(30, max(0, (close_pos - self._close_pos_min) / (1 - self._close_pos_min) * 30)))
        sma_prev = sma(closes[:-10], self._sma_len)
        trend_score = 0
        if sma_prev is not None and float(sma_prev) > 0:
            slope = (float(sma_now) - float(sma_prev)) / float(sma_prev)
            trend_score += int(min(15, max(0, slope * 500)))
        ext = (close - float(sma_now)) / a
        trend_score += int(min(15, max(0, 15 - abs(ext - 1.5) * 5)))
        vols = [float(b.volume) for b in bars[-21:-1]]
        avg_vol = sum(vols) / max(len(vols), 1)
        vr = float(cur.volume) / avg_vol if avg_vol > 0 else 0.0
        vol_score = int(min(20, max(0, (vr - 0.7) * 25)))
        mod = ret5 / (self._ret5_atr_max * a)
        mod_score = int(min(20, max(0, 20 - abs(mod - 0.4) * 30)))
        strength = max(0, min(100, close_score + trend_score + vol_score + mod_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"Up Friday closing at {close_pos:.0%} of range above the 50-SMA with a modest 5-day gain "
                f"({ret5 / a:.2f} ATR): held through weekend de-risking, expect Mon-Wed premium drift; "
                f"stop under Friday low, short-horizon target {self._rr_target}R."
            ),
            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 strong close above 50-day average, 1.3x ATR stop: Loses money · EdgeProven