Parabolic SAR flip: buy below price, sell above
Parabolic SAR: buy when the SAR flips below the price and sell when it flips above.
Loses money
After costs it lost money on the stocks that decide the verdict.
- −0.039R a trade after costs on the laggard stocks.
42 large US stocks, 15 years
Before costs +0.037R
By trade and by day, sized to a first try
What the numbers say
On the laggard stocks, 3394 trades averaged −0.039R after costs, though +0.0375R before costs. Winners averaged 0.054R. Bull markets (−0.042R) and flat markets (−0.078R) were negative, with only bear markets positive (0.061R). The after-cost result on laggards is what sets the verdict.
How it was tested
Buy at the close when the Parabolic SAR flips from above the price to below it, and exit at the close when it flips back above the price.
- Side
- Long
- Its own exit
- At each close after entry, exit at that close if the Parabolic SAR (0.02, 0.20) is above the close, i.e. it has flipped back above the price., checked at each close
- 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
- Parabolic SAR uses the standard Wilder settings: step 0.02, maximum 0.20
- The SAR is seeded and computed from the available daily history up to the signal day, with no look-ahead
- Flip below means SAR was above the close the prior day and is below the close on the signal day
- The sell signal is treated as the exit of the long trade; the idea is tested as long-only
- Entry is at the close of the flip day
- Stop and target are protective (3 x ATR and 6 x ATR) because the SAR flip is the intended exit
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 | 2,470 | −0.042R | −2.57 | −2.25 · 1,360d | −0.071R · beats 100% | +0.058R |
| Flat | 603 | −0.078R | −2.40 | −1.37 · 320d | −0.056R · beats 20% | +0.033R |
| Bear | 321 | +0.061R | 1.40 | 1.59 · 145d | −0.005R · beats 95% | +0.060R |
| All | 3,394 | −0.039R | −0.062R | +0.054R |
R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 13.7 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 ParabolicSarFlipLong:
name = "parabolic_sar_flip_long"
description = "Long when Parabolic SAR flips from above to below the close; exits when SAR flips back above."
def __init__(self, step: float = 0.02, max_af: float = 0.20, atr_period: int = 14,
stop_mult: float = 3.0, target_mult: float = 6.0, min_bars: int = 30) -> None:
self._step = step
self._max_af = max_af
self._atr_period = atr_period
self._stop_mult = stop_mult
self._target_mult = target_mult
self._min_bars = min_bars
def _sar_series(self, bars):
n = len(bars)
if n < 3:
return None
highs = [float(b.high) for b in bars]
lows = [float(b.low) for b in bars]
closes = [float(b.close) for b in bars]
up = closes[1] >= closes[0]
sar = [0.0] * n
if up:
sar[0] = lows[0]
ep = highs[0]
else:
sar[0] = highs[0]
ep = lows[0]
af = self._step
for i in range(1, n):
prev = sar[i - 1]
new = prev + af * (ep - prev)
if up:
new = min(new, lows[i - 1])
if i >= 2:
new = min(new, lows[i - 2])
if lows[i] < new:
up = False
new = ep
ep = lows[i]
af = self._step
else:
if highs[i] > ep:
ep = highs[i]
af = min(af + self._step, self._max_af)
else:
new = max(new, highs[i - 1])
if i >= 2:
new = max(new, highs[i - 2])
if highs[i] > new:
up = True
new = ep
ep = highs[i]
af = self._step
else:
if lows[i] < ep:
ep = lows[i]
af = min(af + self._step, self._max_af)
sar[i] = new
return sar, closes
def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
if len(bars) < max(self._min_bars, self._atr_period + 2):
return None
res = self._sar_series(bars)
if res is None:
return None
sar, closes = res
if not (sar[-1] < closes[-1] and sar[-2] > closes[-2]):
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 = bars[-1].close
stop = entry - Decimal(str(self._stop_mult)) * atr_dec
target = entry + Decimal(str(self._target_mult)) * atr_dec
if stop <= 0 or not (stop < entry < target):
return None
rr = (target - entry) / (entry - stop)
return Candidate(
ticker=ticker,
side="buy",
entry=entry,
stop=stop,
target=target,
risk_reward_ratio=rr.quantize(Decimal("0.01")),
signal_strength=50,
thesis="Parabolic SAR (0.02/0.20) flipped from above to below the close.",
)
def exit_now(self, ticker: str, bars: list[Bar], entry: Decimal,
side: str, bars_held: int) -> bool:
if side != "buy":
return False
res = self._sar_series(bars)
if res is None:
return False
sar, closes = res
return sar[-1] > closes[-1]
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.