Internal bar strength: buy low in the day's range, sell high
Internal bar strength: buy when the close is in the bottom 20% of the day's range and sell when it is in the top 20%.
Killed by costs
There is something there before trading costs; after them, too little is left to count (under 0.04R a trade).
- +0.041R a trade before costs, −0.050R after the spread and the selection haircut.
42 large US stocks, 15 years
Before costs +0.041R
By trade and by day, sized to a first try
What the numbers say
Across 16137 laggard trades the idea made +0.041R before costs but −0.050R after the spread and the selection haircut. Bull, flat and bear markets all came out negative (−0.053R, −0.049R, −0.034R), with the bear result not far from random dates. Costs erase the small edge, hence the verdict.
How it was tested
Buy at the close when internal bar strength (close position within the day's range) is in the bottom 20%, and exit when a later close lands in the top 20% of its range.
- Side
- Long
- Its own exit
- At each close after entry, exit at that close if IBS >= 0.80 (close in the top 20% of that day's range)., checked at each close
- Time limit
- Exit at the close after 10 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
- Bottom 20% of range means IBS <= 0.20; top 20% means IBS >= 0.80, where IBS = (close - low) / (high - low).
- 'Buy' is the entry and 'sell' is the exit of a long trade; the idea is tested as long-only, not as a long/short pair.
- Days with zero range (high equals low) are ignored for both entry and exit signals.
- No stop or target was given, so a 2 x ATR(14) stop and a 4 x ATR(14) target are used as protective levels.
- No time limit was given, so the trade is capped at 10 trading days.
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 | 11,277 | −0.053R | −8.30 | −7.24 · 2,255d | −0.078R · beats 85% | +0.004R |
| Flat | 3,180 | −0.049R | −4.01 | −2.81 · 530d | −0.058R · beats 65% | +0.002R |
| Bear | 1,680 | −0.034R | −2.07 | −0.89 · 254d | −0.021R · beats 45% | +0.065R |
| All | 16,137 | −0.050R | −0.068R | +0.010R |
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.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 codeHide
from decimal import Decimal
from core.domain import Bar
from strategies.indicators import atr
from scanners.base import Candidate
class IbsMeanReversionLong:
name = "ibs_mean_reversion_long"
description = "Long when IBS <= 0.20 at the close; exit when a later close has IBS >= 0.80."
def __init__(self, entry_ibs: float = 0.20, exit_ibs: float = 0.80, atr_period: int = 14, stop_mult: float = 2.0, target_mult: float = 4.0) -> None:
self._entry_ibs = entry_ibs
self._exit_ibs = exit_ibs
self._atr_period = atr_period
self._stop_mult = stop_mult
self._target_mult = target_mult
@staticmethod
def _ibs(bar):
rng = bar.high - bar.low
if rng <= 0:
return None
return float((bar.close - bar.low) / rng)
def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
if len(bars) < self._atr_period + 2:
return None
current = bars[-1]
ibs = self._ibs(current)
if ibs is None or ibs > self._entry_ibs:
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=f"IBS {ibs:.2f} <= {self._entry_ibs:.2f}: close in bottom of day's range; mean reversion long.",
)
def exit_now(self, ticker: str, bars: list[Bar], entry: Decimal, side: str, bars_held: int) -> bool:
if not bars:
return False
ibs = self._ibs(bars[-1])
if ibs is None:
return False
return ibs >= self._exit_ibs
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.