Skip to content
The Casebook · A classic strategy

Darvas box breakout, stop at the box bottom

Darvas box: buy when the price breaks above a box top that held for at least 3 weeks, with the stop at the box bottom.
VerdictTested Nov 22, 2026

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.
Trades on the laggards
6,278

42 large US stocks, 15 years

Per trade, after costs
−0.063R

Before costs +0.005R

Bar to clear
t > 2.01

By trade and by day, sized to a first try

What the numbers say

On the 22 laggards the idea averaged −0.063R per trade after costs across 6278 trades, against 0.103 on today's winners. Before costs it was only 0.005. It trailed random dates in bull (−0.057) and flat (−0.166) markets, so the winners' own rise accounts for the gain.

How it was tested

Buy at the close when price breaks above the top of a consolidation box that held for at least 3 weeks, with the stop at the box bottom.

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
Choices made where the idea was open
  • 3 weeks = 15 trading days
  • Box top = highest high and box bottom = lowest low over the prior 15 days, signal day excluded
  • The box is tall enough to be real (at least 1 x ATR(14)) and not a wide range (at most 25% of the top)
  • Breakout means the first close above the box top, confirmed on the close, not an intraday touch
  • Minimum stop distance of 1 x ATR(14) to avoid trivially tight stops
  • Target of 2R chosen because 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.

MarketTradesPer tradet, by tradet, by dayRandom datesWinners, per trade
Bull4,842−0.057R−4.30−1.69 · 1,801d−0.002R · beats 0%+0.106R
Flat1,036−0.166R−6.27−3.91 · 387d−0.027R · beats 0%+0.098R
Bear400+0.132R3.181.65 · 148d+0.121R · beats 55%+0.077R
All6,278−0.063R+0.002R+0.103R

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.0 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
from scanners.base import Candidate


class DarvasBoxBreakoutLong:
    name = "darvas_box_breakout_long"
    description = "First close above a 15-day box top (box height 1x ATR to 25% of top); stop at box bottom (min 1 ATR), 2R target"

    def __init__(self, box_days: int = 15, atr_period: int = 14, min_height_atr: float = 1.0, max_height_pct: float = 0.25, min_stop_atr: float = 1.0, reward_mult: float = 2.0) -> None:
        self._box_days = box_days
        self._atr_period = atr_period
        self._min_height_atr = Decimal(str(min_height_atr))
        self._max_height_pct = Decimal(str(max_height_pct))
        self._min_stop_atr = Decimal(str(min_stop_atr))
        self._reward_mult = Decimal(str(reward_mult))

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        n = self._box_days
        if len(bars) < max(n + 1, self._atr_period + 2):
            return None
        box = bars[-(n + 1):-1]
        box_top = max(b.high for b in box)
        box_bottom = min(b.low for b in box)
        if box_top <= 0 or box_bottom <= 0:
            return None
        current = bars[-1]
        prev = bars[-2]
        if not (current.close > box_top and prev.close <= box_top):
            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))

        height = box_top - box_bottom
        if height < self._min_height_atr * atr_dec:
            return None
        if height > self._max_height_pct * box_top:
            return None

        entry = current.close
        stop = box_bottom
        min_dist = self._min_stop_atr * atr_dec
        if entry - stop < min_dist:
            stop = entry - min_dist
        risk = entry - stop
        if risk <= 0 or stop <= 0:
            return None
        target = entry + self._reward_mult * risk
        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=f"First close above the {n}-day box top {box_top}; stop at box bottom (min 1 ATR), 2R target.",
        )

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