Triangular Simple Moving Average (TriS-MA)

The Triangular Simple Moving Average (TriS-MA) is almost identical to the Triangular Weighted Moving Average but is very different in how it is calculated.  Instead of weighting the data points directly it is a double smoothed simple moving average (a moving average of a moving average).  Because most of the weight ends up being placed on the data in the middle of a series the weighting looks like a triangle, hence the name.  Below you can see how the weighting is applied to a 50 period TriS-MA, EMA and SMA:

.

Triangular Simple MA vs SMA and EMA Weighting.

How To Calculate a Triangular Simple Moving Average

.

TriS-MA = SUM(MA1,L) / L

Where:

MA1 = SUM(CLOSE,L) / L

L = ceiling((n+1) / 2)

n = Number of Periods

Here is an example of a 3 period Triangular Weighted Moving Average:

.

How to Calculate a Triangular Simple Moving Average

.

Triangular Simple Moving Average Excel File

.

An Excel Spreadsheet containing a Triangular Weighted Moving Average is available for FREE download.  It contains the ‘basic’ version you can see above and a ‘fancy’ one that will automatically adjust to the length you specify.  Find it at the following link near the bottom of the page under Downloads – Technical Indicators: Triangular Weighted Moving Average (TriW-MA).  Please let us know if you find it useful.

.

Triangular Moving Average and a Simple Moving Average

.

50 Day Triangular Simple MA and Simple MA.

Test Results

.

We tested several different types of Moving Averages including the TriS-MA through 300 years of data across 16 global markets to reveal which is the best and if any of them are worth using in your trading – see the results.

.

Mixed Moving Averages – Test Results

In this round of testing we will be looking at a mix of different smoothing methods and averages:  The Moving Linear Regression or Time Series Forecast (TSF) and The Linear Regression Indicator (LRI) which aren’t actually moving averages but can be used in the same way.  Plus Wilder’s Smoothing AKA Smoothed MA (WS-MA) and the Triangular Simple MA (TriS-MA).  The aim is to identify if any of these indicators are worth using as a trading tool.

We tested each indicator going Long and Short, using Daily and Weekly data, taking End Of Day (EOD) and End Of Week (EOW) signals with smoothing periods varying from from 5 – 300 days or 60 weeks.~ These tests were carried out over a total of 300 years of data across 16 different global indexes (details here).

.

Annualized Return Mixed Moving Averages

.

Above you can see the annualized return statistics for each indicator.  The first thing that you will notice is that the LRI and TSF produce very similar results and neither of them are very good.  So for providing buy signals in this fashion the Time Series Forecast and The Linear Regression Indicator are knocked out cold in the first round.

The returns generated by the TriS-MA are reasonable but they are not good enough to out perform the EMA’s results so the Triangular Simple Moving Average is also knocked out of contention.  (Note – It didn’t dawn on us that the TriS-MA is almost identical to the Triangular Weighted Moving Average until after we had already tested it).

Wilder’s Smoothing produced some good returns when the smoothing period was less than 45 days but the performance dropped gradually to almost 7% as the length was extended.  The EMA exhibited similar behavior but bottomed out around 8% so while Wilder’s Smoothing is effective in this application, the Exponential Moving Average is still King.
.

Best Average of the Group – Long

.

We performed a total of 948 tests in this round; half of them on the long side and half on the short.  Rather than simply selecting the indicator with the greatest returns over the test period we identified the best for going long using the following criteria:

  • Annualized Return > 9%
  • Average Trade Duration > 29 Days
  • Annualized Return During Exposure > 15%
  • Annualized Return on Nikkei 225 > 3%

14/357 Averages made the final cut (see spreadsheet) but we selected the 30 Day Wilder’s Smoothing with End of Week Signals as the ultimate winner:
.

30 Day WS-MA, EWO Long.

Above you can see how the 30 Day WS-MA, EOW Long performed during the test period compared to the 75 Day EMA, EOW Long which was selected as the most effective Exponential Moving Average in a previous test.  The WS-MA with this particular smoothing period produced almost identical results to the EMA but didn’t offer any benefits.

Upon further testing we found that despite very different calculation the WS-MA and the EMA are actually the same indicator.  Simply double the WS-MA period and subtract one to find the equivalent EMA.  For instance a 38 period WS-MA is identical to a 75 period EMA.

.

  • ~ An entry signal to go long (or exit signal to cover a short) for each average tested was generated with a close above that average and an exit signal (or entry signal to go short) was generated on each close below that moving average. No interest was earned while in cash and no allowance has been made for transaction costs or slippage. Trades were tested using End Of Day (EOD) and End Of Week (EOW) signals for Daily data and EOW signals only for Weekly data. Eg. Daily data with an EOW signal would require the Week to finish above a Daily Moving Average to open a long or close a short and vice versa.
    .
  • – The average annualized return of the 16 markets during the testing period was 6.32%. The data used for these tests is included in the results spreadsheet and more details about our methodology can be found here.
  • Triangular Moving Average (TriW-MA)

    The Triangular Weighted Moving Average (TriW-MA) is included in the ‘Technical Indicator – Fight for Supremacy‘ so before we test it here is some information on how it is calculated.  If you would like to use the Triangular Moving Average in Excel then you can download a free spreadsheet HERE.

    The TriW-MA gets it name from the way it applies the weight to data; because the emphasis is on the values in the middle, the weighting takes the shape of a triangle.  Below you can see how the weighting is applied to a 50 period TriW-MA, EMA and SMA:

    .

    Weight - TriW-MA vs EMA vs SMA

    .

    How To Calculate a Triangular Weighted Moving Average

    .

    To calculate a Triangular Weighted Moving Average multiply each close price by the weight for that period, add it all up and divide the result by the sum of the weights.  The weighting multiplier starts at 1 and increases by 1 until it peaks half way through the set before decreasing symmetrically back down to finish at 1 again.

    Here is an example of a 3 period Triangular Weighted Moving Average:

    .

    Calculating a Triangular Weighted Moving Average

    .

    The same result can be achieved by using a double smoothed moving average AKA the Triangular Simple Moving Average.

    .

    Triangular Weighted Moving Average Excel File

    .

    An Excel Spreadsheet containing a Triangular Weighted Moving Average is available for FREE download.  It contains the ‘basic’ version you can see above and a ‘fancy’ one that will automatically adjust to the length you specify.  Find it at the following link near the bottom of the page under Downloads – Technical Indicators: Triangular Weighted Moving Average (TriW-MA).  Please let us know if you find it useful.

    .

    Triangular Moving Average and a Simple Moving Average

    .

    Triangular Weighted Moving Average and a Simple MA

    .

    Test Results

    .

    We tested several different types of Weighted Moving Averages including the TriW-MA through 300 years of data across 16 global markets to reveal which is the best and if any of them are worth using in your trading systems.  See the results – Weighted Moving Averages Put To The Test

    Weighted Moving Averages Put To The Test

    A Weighted Moving Average smooths data by setting a separate but specific weighting for each data set over the length of its smoothing period.  In this round of testing we will look at the standard Weighted Moving Average (W-MA), the Triangular Weighted Moving Average (TriW-MA) and the Sine Weighted Moving Average (SW-MA) in order to reveal which is the best and if any of them are worth including in your trading tool box.

    To evaluate these averages we tested Long and Short trades using Daily and Weekly data, taking End Of Day (EOD) and End Of Week (EOW) signals with Moving Average lengths varying from from 5 – 300 days or 60 weeks.~ These tests were carried out over a total of 300 years of data across 16 different global indexes (details here).

    .

    Weighted Moving Averages – Test Results:

    .

    Weighted Moving Average – Test Conclusion

    .

    Weighted Moving Average - Long and Short Annualized Return

    .

    Above you can see how the annualized return changes with the length of each Daily, EOD Moving Average for the Long and the Short side of the market.  The relative performance of each MA was similar when going Long or Short but the returns on the Short side were much lower.

    There is little difference in performance between the TriW-MA and the SW-MA while the W-MA was clearly superior.  The W-MA performed particularly well with a setting of 35 days or 110 days, peaking with a annualized return of over 10% on these settings.  As the smoothing period is extended beyond 110 days the returns gradually diminished.

    Return to Top

    .

    Weighted Moving Average - Long and Short Annualized Return During Exposure

    .

    Above you can see the performance of each average during the time that it was exposed to the market.  Across the board the efficiency of each average decreased as the length of each average is was increased.  The W-MA again proved the most effective.

    Return to Top

    .

    Best Weighted Moving Average – Long

    .

    We tested 357 averages on the Long side but rather than simply selecting the one with the greatest returns over the test period we looked for the following criteria:

    • Annualized Return > 9%
    • Average Trade Duration > 29 Days
    • Annualized Return During Exposure > 15%
    • Annualized Return on Nikkei 225 > 3%
    • Annualized Return on NASDAQ > 12.5%

    8/357 Averages made the final cut (see spreadsheet) but we selected the 90 Day Weighted Moving Average with End of Week Signals as the ultimate winner:
    .

    90 Day W-MA, EOW Long

    .
    Above you can see how the 90 Day W-MA, EOW Long performed during the test period compared to the 75 Day EMA, EOW Long which was selected as the most effective Exponential Moving Average in a previous test.  The Weighted MA produced very similar results to the EMA but didn’t offer any benefits.

    Return to Top

    .

    Weighted Moving Average – Test Conclusion

    .

    The Triangular and Sine Weighted Moving Averages proved to be inferior to the W-MA while the standard Weighted Moving Average did produce reasonable returns.  Those returns however, were similar (if slightly inferior) to those of an Exponential Moving Average while not offering any notable benefits.  Therefore it can be concluded that none of the Weighted Moving Averages we tested are worth perusing further.

    Return to Top

    .

  • ~ An entry signal to go long (or exit signal to cover a short) for each average tested was generated with a close above that average and an exit signal (or entry signal to go short) was generated on each close below that moving average.  No interest was earned while in cash and no allowance has been made for transaction costs or slippage.  Trades were tested using End Of Day (EOD) and End Of Week (EOW) signals for Daily data and EOW signals only for Weekly data.  Eg. Daily data with an EOW signal would require the Week to finish above a Daily Moving Average to open a long or close a short and vice versa.
    .
  • – The average annualized return of the 16 markets during the testing period was 6.32%.  The data used for these tests is included in the results spreadsheet and more details about our methodology can be found here.