Supertrend Indicator Strategy – (Backtest, Settings, Formula, And Performance)

In this article, we will discuss an indicator called SuperTrend, which has a very promising name. So, what is the SuperTrend indicator exactly?

The SuperTrend indicator is a type of trend following indicator that was created by trader Oliver Seban. It signals the direction of a trend, its continuation, or changes in direction. Our backtest reveals that the indicator can catch most of the returns while avoiding the worst drawdowns, thus giving acceptable risk-adjusted returns.

In the rest of this article, we will test its effectiveness and explain how it works.

What is the Supertrend Indicator?

Oliver Seban has given us a great tool for highlighting the direction in which an instrument’s price is moving. However, as we will see, the SuperTrend Indicator is useful not only for chartists but also for those who want to do algorithmic trading.

The SuperTrend indicator appears as a line superimposed on the price chart. If the price increases, it will be above the Supertrend indicator, which will be green. Vice versa, if the price is decreasing, it will be below the indicator, which will be red.

If the price of a bar closes by crossing the previous period’s SuperTrend indicator value, the SuperTrend indicator will reverse direction, indicating a trend change. We observe this feature in the image:

In the chart above, the close of the candle at 4397.94 determines the inversion of the Supertrend indicator because this value is lower than the value of 4401.58203 that the indicator had in the previous period.

Another important feature that we can see in the image above is that the Supertrend indicator is always increasing when it is below the closing price and always decreasing when it is above it.

We can therefore say that the Supertrend indicator alternates between two phases: a phase in which it is increasing, signaling an upward trend, and a phase in which it is decreasing, indicating a downward trend.

How accurate is the Supertrend indicator?

At this point, we might ask ourselves: How accurate is the Supertrend indicator?

The answer cannot ignore the objective for which the Supertrend indicator was invented: To highlight trends, as its name implies. As we will see later in our backtest, the Supertrend indicator can be a very accurate tool as long as it is applied to financial instruments that tend to maintain a direction in the price. So it may not be suitable for analyzing any random financial instrument.

Which time frame is best for the Supertrend indicator?

The Supertrend indicator has no specific time frame. It can be applied intraday, daily, or weekly charts. But in order to allow the Supertrend indicator to be accurate and do its job well, it is essential to choose a time frame in which the financial instrument is in a trend for long periods.

Which time frame is the most suitable for you can only be found out by backtesting. Later, in our backtest, we use a weekly time frame, and you’ll discover that the Supertrend indicator works well for stocks in that time frame.

How to avoid false signals?

Every quantitative trader aims to improve the historical performance of his trading system. To do this, he or she can optimize by using different inputs into the parameters while (hopefully) avoiding overfitting and curve fitting.

If the historical performance improves, it is possible to avoid false signals that would have generated unprofitable trades. How can we achieve this with the Supertrend Indicator? The indicator has two input parameters that must be established to avoid false signals.

The Supertrend indicator formula

The Supertrend indicator is based on the median price of a candle – calculated like this:

MedianPrice = ( H + L ) / 2;

….and on the very famous volatility indicator called Average True Range indicator presented by Welles Wilder in the 1970s, in his famous book called New Concepts in Technical Trading Systems, published in 1978. If you want to know more about ATR, please read Average True Range Trading Strategy (ATR Indicator and System – How To Use It).

The formula of the Supertrend Indicator uses the median price and the ATR to construct the two bands of a channel as follows:

UpBand = MedianPrice + Multiplier * ATR( Periods );

DnBand = MedianPrice – Multiplier * ATR( Periods );

We have thus two inputs into the formula:

  • The number of bars in which to calculate the ATR, and
  • The multiplier – the coefficient which establishes the ATR above and below the median price.

Oliver Seban proposed using the Supertrend indicator with periods of 10 and a multiplier of 3.

A question arises: if there are two bands and, therefore, there is a channel in which the price moves, how is it possible that the Supertrend indicator appears as a single line?

To understand what happens “behind the scenes”, please observe the following image which shows both the bands and the single line indicator:

Supertrend indicator example

The Supertrend indicator takes on the values of both the lower and upper bands alternatively, but with the condition that the lower band cannot decrease and the upper band cannot increase. If this happens, the Supertrend indicator takes on the value of the relative band of the previous period. When the closing price of a candle crosses the value of the Supertrend indicator from the previous period, the indicator begins to follow the opposite band, leading to a reversal in trend.

The Supertrend indicator trading rules

Let’s establish the trading rules of the trading system we will backtest. We set ourselves the goal of capturing the upswings of the stock market while minimizing the downturns. With this intention, the rules are:

•Buy when the close of a bar crosses above the previous value of the Supertrend indicator;

•Sell when the close of a bar crosses below the previous value of the Supertrend indicator;

In the image below you can see a trade example following the rules stated above:

Supertrend indicator trading rules

The buy signal is triggered on 05/29/2020 at 3044.31, and the sell signal is triggered on 01/21/2022 at 4397.94, resulting in a gain of 1353.63 points which equals a profit of 44.46%.

The supertrend indicator backtest and performance

Let’s backtest over a long period of time.

The instrument we will backtest is the S&P500 index over the last 60 years. Given the long-term rising trend of the index, it makes sense only to go long.

The time frame is weekly, and we use the default parameters of the Supertrend indicator originally proposed by the inventor Oliver Seban: 10 for the calculation of the ATR and 3 (for the band). We reinvest all capital without considering commission and slippage, not including reinvested dividends.

Our backtest returned the following equity curve:

Supertrend indicator backtest

It looks great. But let’s analyze the trading statistics and performance metrics.

  • 38 trades since 1960
  • Annual Return: 5.92% (buy and hold is 6.91%) – not including dividends
  • Average gain per trade is 11.07%
  • 65.79% of the trades are winners
  • You are invested 62.67% of the time
  • Max drawdown is 24.6% (buy and hold 56.24%)
  • Risk-adjusted return is 9.44% (5.92% divided by 0.6267) (buy and hold 6.91%)

The probability of entering a winning trade is 65.79%. A high win rate is good to get confidence in the trading system.

The risk-adjusted return summarizes the strategy’s accuracy because it considers how much you get from the market compared to how long you stay in the market. For the buy & hold strategy, this value coincides with the Annual Return because the denominator, in this case, is equal to 1 (you are invested in the market 100% of the time). The accuracy of the Supertrend indicator is also confirmed by the “small” max drawdown of 24.6%, which is less than half of the buy & hold (56.24%).

Here is the complete trade list with all 38 trades:

Supertrend indicator performance

We end the backtest by showing the complete list of the annual returns:

Supertrend indicator annual returns

The Supertrend indicator – conclusions

At the end of this article, we would like to express our opinion based on the statistical analysis of historical performance. We believe the Supertrend indicator is highly accurate in enabling you to track market upswings while avoiding downswings. Moreover, it is worth noting that the Supertrend indicator was developed in the 90s; therefore, around 40 years of performance are out-of-sample.

Similar Posts