13 — Trend & Momentum

Parabolic SAR#

Debated1 min read
◆ The PatternA trailing stop that speeds up as the trend runs on, patient early and tighter as the move matures

The Parabolic Stop and Reverse — Wilder's trend-following trailing stop system.

SAR = Prior SAR + AF × (EP − Prior SAR)
AF starts at 0.02, increments by 0.02 each new EP, max 0.20
EP = Extreme Point (highest high or lowest low in current trend)
Visual: Dots below price = uptrend. Dots above = downtrend. When price touches the SAR dot, flip direction.
Best for: Trending markets. In sideways markets, SAR generates frequent whipsaws.
Worked example

The acceleration factor starts at 0.02 and rises by 0.02 with each new high, up to 0.20. During the rally the SAR climbs from 99 to 102.56 by day 9. On day 10 the low of 102 breaks below it: the position flips short and the SAR jumps to the rally’s extreme, 110, then trails down to 108.02 by day 15.

The example data: 15 days, used in every indicator here
DayHighLowCloseVolume
11019910050,000
210310010262,000
310310010148,000
410510110470,000
510810410785,000
610810510660,000
711010610990,000
811010710872,000
910810410580,000
1010510210366,000
1110510210455,000
1210410110275,000
13102989995,000
141029910164,000
1510510110471,000
Where it misleads
  • It is always in the market, long or short, so in a range it flips back and forth and loses on each flip.
  • Late in a long trend the acceleration factor is at its cap and the stop hugs the price; an ordinary pullback stops you out.
  • At a flip the stop jumps to the last extreme, which can be far from the price just after a reversal.
In code
af0, step, af_max = 0.02, 0.02, 0.20
high, low = df['high'].values, df['low'].values
sar = np.zeros(len(df)); up = True; af = af0
ep, sar[0] = high[0], low[0]
for i in range(1, len(df)):
    sar[i] = sar[i-1] + af * (ep - sar[i-1])
    if up:
        sar[i] = min(sar[i], low[i-1], low[max(i-2, 0)])   # never above the last two lows
        if low[i] < sar[i]:                                 # stop hit: flip short
            up, sar[i], ep, af = False, ep, low[i], af0
        elif high[i] > ep:
            ep, af = high[i], min(af + step, af_max)
    else:
        sar[i] = max(sar[i], high[i-1], high[max(i-2, 0)])
        if high[i] > sar[i]:                                # stop hit: flip long
            up, sar[i], ep, af = True, ep, high[i], af0
        elif low[i] < ep:
            ep, af = low[i], min(af + step, af_max)
df['sar'] = sar
Python, in your browser — edit the code and run it again

Assumes import numpy as np, import pandas as pd, and a DataFrame df with columns high, low, close and volume — the 15 days above.

Sources
  • New Concepts in Technical Trading Systems, J. W. Wilder, Trend Research, 1978
  • Technical Analysis from A to Z (2nd ed.), S. B. Achelis, McGraw-Hill, 2000
  • C.-H. Park & S. H. Irwin, “What Do We Know About the Profitability of Technical Analysis?”, Journal of Economic Surveys 21(4), 2007 — a review of the evidence across studies

Last reviewed October 2026 · How this site checks its content · Report a mistake

Pattern bridge: SAR’s acceleration factor increases with each new extreme — the same momentum accumulation used in gradient descent.
Linked from 1
← Previous
Average Directional Index
Open in the full reader, with the topic sidebar