How Does the Parabolic SAR work?

The Parabolic SAR (hereafter SAR)  is a trend indicator.   It was one of the indicators published by Welles Wilder in New Concepts in Technical Trading Systems.  It plots a dot above or below the price action to indicate the existence of a trend.  If the dot is plotted above the price, then a bearish trend is indicated.  A dot below the price action indicates a bullish trend.

The SAR indicates a trend reversal when the high/low move below the value of the dot plotted.  These trend changes are designed to detect reversals.    Hence the name, “Stop and Reverse.”     Here is an example:

Before we go deeper into the data, I will just state that this indicator performs poorly at various points on the backtest.  Perhaps that is all you may want to know.  If it is, then it still shows the importance of backtesting an idea before trading with it.  Sometimes the best information you can get from a backtest is <em>not</em> to use it.

Additionally, as I’ve said before, an indicator is not a stand alone system.  So, if people have some interesting ideas on using the SAR in other ways, then I will do my best to integrate some new ideas.

Now that we have a bit of an introduction to the SAR let’s see how it does on historical BTC prices.  We will start with a simple backtest that  assumes 1 BTC  per trade (no slippage and commissions) and merely enter when the SAR indicates a reversal long or short.  The backtest will run from 1/1/2012 until 7/1/2014.  The indicator gives 52 trades, a $472 net profit, a 59% peak-to-valley drawdown and a profit factor of 1.61.

One thing to point out is that all the losses came from the short side of the signals.   The long part of the strategy had a net profit of $564.00  and a drawdown of 46%.

We can contrast can see that this underperforms a buy/hold strategy.  A buy/hold strategy with 1 BTC has a profit of $670 and a peak-to-valley drawdown of 73%.

Much of this underperformance is due to whipsaws and early exits on long trends.  Each of these features is undesirable from the perspective of a trend following indicator.   Here is a replay of the results so you can get a feel for the SAR signals.

Here are some observations from the backtest:

1. The indicator has many whipsaws when prices are moving sideways.  This suggests that its usage in a system would benefit from a trend filter.  In fairness, Wilder suggested that it be used with the ADX to indicate trend following.

2. The indicator exits a trend early.  Generally, “letting your profits run” is the motto of trend following, so this is undesirable from that perspective.  (You can see from the backtest that the exit at $600 was far from the end of the trend).

3. Could it be used as a trailing stop (i.e., a stop that continually moves up to capture profit before the trend reverses)?  Perhaps, IMO there are better methods for finding a trailing stop for each particular strategy.

I will post the code below.  (Note: if you want to use it only to enter/exit long then just bracket (//) out the short signals)

ParabolicSAR

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s