Smoothed Moving Average (Wilder’s) – Trading Strategy Backtest (Does it work?)
Last Updated on April 18, 2023
Smoothed moving average (Wilder’s) strategy backtest
The smoothed moving average is not as common as other moving average indicators, but you will come across it in your trading journey. So, it’s good to know what it means. Can a smoother moving average be used profitably in the stock market?
Yes, smoothed moving average strategies do work. Our backtests show that a smoothed moving average strategy can be used profitably for both mean-reversion and trend-following strategies on stocks.
The smoothed moving average (SMMA) is simply a moving average that assigns weight to price data points over a long period. The indicator takes all prices into account and uses a long lookback period. Although old prices are never removed from the calculation, they have only a minimal impact on the moving average because they are assigned low weight.
Smoothed moving average strategy backtest and best settings
Now that you know the theory behind the smoothed moving average, it’s time to backtest and put the theory to the test:
Does a smoothed moving average strategy work? Can you develop profitable smoothed moving average strategies?
We look at the most traded instrument in the world: the S&P 500. We test on SPDR S&P 500 Trust ETF which has the ticker code SPY.
All in all, we do four different backtests:
- Strategy 1: When the close of SPY crosses BELOW the N-day moving average, we buy SPY at the close. We sell when SPY’s closes ABOVE the same average. We use CAGR as the performance metric.
- Strategy 2: Opposite, when the close of SPY crosses ABOVE the N-day moving average, we buy SPY at the close. We sell when SPY’s closes BELOW the same average. We use CAGR as the performance metric.
- Strategy 3: When the close of SPY crosses BELOW the N-day moving average, we sell after N-days. We use average gain per trade in percent to evaluate performance, not CAGR.
- Strategy 4: When the close of SPY crosses ABOVE the N-day moving average, we sell after N-days. We use average gain per trade in percent to evaluate performance, not CAGR.
The results of the first two backtests look like this:
Strategy 1
Period |
5 |
10 |
25 |
50 |
100 |
200 |
CAR |
7.35 |
4.81 |
3.63 |
3.09 |
1.71 |
0.62 |
MDD |
-34.53 |
-39 |
-45.67 |
-50.71 |
-51.34 |
-59.82 |
Strategy 2
Period |
5 |
10 |
25 |
50 |
100 |
200 |
CAR |
2.2 |
4.71 |
5.9 |
6.42 |
7.86 |
8.89 |
MDD |
-55.21 |
-43.64 |
-31.78 |
-42.5 |
-26.1 |
-23.74 |
The results from the backtests are pretty revealing: in the short run, the stock market shows tendencies to mean-reversion. In the long run, it is better to use trend-following strategies.
Why do we reach that conclusion?
Because if we use a short moving average, the best strategy is to buy when stocks drop below the average and sell when it turns around and closes above the moving average (buy on weakness and sell on strength). This can clearly be seen in the first test above for the 5-day moving average. The 5-day moving average returns a CAGR of 7.35%, which is almost as good as buy and hold even though the time spent in the market is substantially lower.
When we buy on strength and sell on weakness, in the second test in the table above, the best strategy is to use many days in the average. The longer the average is, the better. The 200-day moving average returns 8.89%, which is pretty decent. Worth noting is that the max drawdown is less than half of buy and hold (23.74 vs 56%). Drawdown matters. You can read more about trading strategy and system performance metrics.
The results from backtest 3 and 4 looks like this (the results are not CAGR, but average gains per trade):
Strategy 3
Period |
5 |
10 |
25 |
50 |
100 |
200 |
5 |
0.13 |
0.34 |
1 |
2.14 |
4.17 |
8.76 |
10 |
0.2 |
0.56 |
1.05 |
1.84 |
3.85 |
9.36 |
25 |
0.38 |
0.48 |
1.21 |
2.58 |
4.87 |
10.17 |
50 |
0.48 |
0.95 |
2.12 |
3.22 |
5.59 |
9.82 |
100 |
0.56 |
0.51 |
1.04 |
3.37 |
4.75 |
6.03 |
200 |
0.55 |
0.71 |
1.7 |
4.3 |
6.01 |
10.8 |
Strategy 4
Period |
5 |
10 |
25 |
50 |
100 |
200 |
5 |
0.14 |
0.19 |
0.99 |
1.6 |
3.97 |
8.87 |
10 |
0.18 |
0.28 |
0.94 |
2.26 |
3.87 |
9.47 |
25 |
0.23 |
0.26 |
0.78 |
1.14 |
3.62 |
8.48 |
50 |
0.46 |
0.4 |
1.66 |
2.31 |
5.13 |
9.12 |
100 |
0.34 |
0.12 |
0.32 |
2.67 |
5.62 |
7.32 |
200 |
0.36 |
0.98 |
1.43 |
2.84 |
4.7 |
10.07 |
As expected, the longer you are in the stock market, the better returns you get. This is because of the tailwind in the form of inflation and productivity gains. The backtests reveal that it doesn’t matter much if you buy on a break above or below the moving average if your holding time is long.
However, be aware that this is just one method of testing a moving average. There are basically unlimited ways you can use a moving average and your imagination is probably the most restricting factor!
What is a smoothed moving average (SMMA)?
The smoothed moving average is simply a moving average that assigns weight to price data points over a long period. The calculation does not refer to a fixed period but, rather, takes all available data series into account. This is achieved by subtracting yesterday’s Smoothed Moving Average from today’s price. Adding this result to yesterday’s smoothed moving average results in today’s moving average value.
The indicator is similar to the exponential moving average (EMA), but it uses a long lookback period. Old prices are never removed from the calculation, but they have only a minimal impact on the moving average due to low assigned weight. Think of the SMMA as a hybrid of the EMA and SMA.
The smoothed moving average provides a broader view of things by ‘smoothing out’ short-term market fluctuations. By reducing the noise, it removes fluctuations and plots the prevailing trend. The SMMA can be used to confirm trends and define areas of support and resistance. It is often used in combination with other signals and analysis techniques.
How to calculate SMMA
The formula for calculating the smoothed moving average seems a bit complex, as the indication is a combination of the EMA and SMA. But it is something you can learn and calculate by yourself, since the SMMA indicator may not be readily available on all trading platforms.
The formula for calculating the smoothed moving average is given as follows:
SMMA = (SMMA# – SMMA* + CLOSE)/N
Where:
SMMA_{α} = the smoothed sum of the previous bar
SMMA_{β }= the previous smoothed moving average bar
CLOSE = the closing price at the time of calculation
N = the number of smoothing periods
Note that the value for the first period is an SMA. The SMMA indicator may be available by default on many trading platforms. In that case, you don’t have to worry about the actual formula or calculation; you can just set it up on your charts with one click.
Wilder’s smoothed moving average
The idea behind the smoothed moving average came from the innovative trader Welles Wilder. In 1978, Wilder published a book called New Concepts In Technical Trading Systems where he introduced many indicators, among them the smoothed moving average,e but false the more famous RSI and ADX.
Why use an SMMA?
The smoothed moving average use a long period and considers all the price data. By smoothing out the data over a given period, traders and analysts have a more comprehensive overview of the trend minus the deviations attributed to short-term volatility. In other words, it can help you to reduce noise so that you can clearly see what the price is doing.
You can use it to see the trend: when the price is above the SMMA, and the indicator is sloping upward, there is likely an uptrend, but if the price is below the SMMA and the indicator is pointed down, there is likely a downtrend. Since it reacts slowly to price changes, it could serve as support and resistance areas. In an uptrend, it serves as an ascending support level, and in a downtrend, it could serve as a descending resistance level.
The SMMA can also help you to spot a change in trend: when the price crosses the SMMA that could signal a trend change. For example, if the price is below the indicator and then rises above it, there may be a shift from a downtrend to an uptrend, while the opposite is true for a shift to a downtrend.
How to use an SMMA
Not all trading platforms have a built-in SMMA indicator. If you have it on your trading platform, you simply attach the indicator to the chart and adjust the settings to what you want. But if you don’t have it, you can use the formula above to code a script for the indicator or pay a coder to create it for you.
When using the indicator, the longer the period you set it, the smoother it is, and the more slowly it reacts to price. So, if you want it to show the long-term trend, set a high number, say 100 or 200, for the period.
How can you use an SMMA?
Here are three common ways you can use the SMMA:
- To determine the trend: When the SMMA is rising, you may want to look for only buying opportunities. On the other hand, when the indicator is declining, you may have to look for short-selling opportunities. Support and resistance levels: The SMMA can serve as a support in an uptrend and as a resistance in a downtrend. So, look to buy when the price is around a rising SMMA. When the SMMA is descending, look for selling opportunities when the price rallies to the indicator.
- SMMA indicators crossover: You can use two SMMAs: a long-period SMMA and a short-period SMMA. When short-period SMMA crosses above the long-period SMMA (golden cross), it could mean a buy signal, and when the short-period SMMA crosses below the long-period SMMA (a dead cross), you may have a sell signal.
We have written a more comprehensive article about how you can use moving articles a few years back: Are moving averages good or bad?
Drawbacks with an SMMA
Some of the limitations of SMMA include:
- The lag factor: The SMMA lags a lot, as it reacts slowly to price changes.
- Ranging markets: In a ranging market, the indicator stays flat, and the price oscillates around it, giving multiple false signals. A false signal is when the price crosses the SMMA but then fails to move in the direction expected, resulting in bad trades. This happens a lot when the market is in a range for a long time.
Relevant articles about moving averages strategies and backtests
Moving averages have been around in the trading markets for a long time. Most likely, moving average strategies were the start of the systematic and automated trading strategies developed in the 1970s, for example by Ed Seykota. We believe it’s safe to assume moving averages were a much better trading indicator before the 1990s due to the rise of the personal computer. The most low-hanging fruit has been “arbed away”.
That said, our backtests clearly show that you can develop profitable trading strategies based on moving averages but mainly based on short-term mean-reversion and longer trend-following. Furthermore, there exist many different moving averages and you can use a moving average differently/creatively, or you can combine moving averages with other parameters.
For your convenience, we have covered all moving averages with both detailed descriptions and backtests. This is our list:
- Moving average trading strategies
- Simple moving average (backtest strategy)
- Exponential moving average (backtest strategy)
- Hull moving average (backtest strategy)
- Linear-weighted moving average (backtest strategy)
- Adaptive moving average (backtest strategy)
- Variable moving average (backtest strategy)
- Weighted moving average (backtest strategy)
- Zero lag exponential moving average (backtest strategy)
- Volume weighted moving average (backtest strategy)
- Triple exponential moving average TEMA (backtest strategy)
- Variable Index Dynamic Average (backtest strategy)
- Triangular moving average (backtest strategy)
- Guppy multiple moving average (backtest strategy)
- McGinley Dynamic (backtest strategy)
- Geometric moving average GMA (backtest strategy)
- Fractal adaptive moving average FRAMA (backtest strategy)
- Fibonacci moving averages (backtest strategy)
- Double exponential moving average (backtest strategy)
- Moving average slope (backtest strategy)
We have also published relevant trading moving average strategies:
- The 200-day moving average strategy
- Trend-following system/strategy in gold (12-month moving average)
- Trend following strategies Treasuries
- Is Meb Faber’s momentum/trend-following strategy in gold, stocks, and bonds still working?
- Trend following strategies and systems explained (including strategies)
- Does trend following work? Why does it work?
- A simple trend-following system/strategy on the S&P 500 (By Meb Faber and Paul Tudor Jones)
- Conclusions about trend-following the S&P 500
- Why arithmetic and geometric averages differ in trading and investing
FAQ smoothed moving average
Let’s end the article with a few frequently asked questions about the smoothed moving average:
What is a smoothed moving average?
A smoothed moving average is a type of moving average that takes into account the average of the last few data points and uses them to create a slightly smoothed graph or line. This presumably allows for a more accurate representation of a given data set, as it takes into account recent trends and information to create a more accurate picture.
When should I use a smoothed moving average?
A smoothed moving average can be used to identify trends and predict future movements in the market. It can be used to identify support and resistance levels, as well as find entry and exit points for trades. It can also be used to identify changes in momentum and identify potential turning points in the market.
However, you need to backtest every moving average to find the best average. The best moving average might vary according to the asset you are trading.
What are the advantages of using a smoothed moving average?
The advantages of using a smoothed moving average include the ability to identify changes in momentum and trend direction, as well as providing smoother lines for analysis. Additionally, it is easier to identify support and resistance levels, as well as entry and exit points for trades. This is the theory. But as we have written earlier, you must backtest to find the best moving average yourself.
What are the disadvantages of using a smoothed moving average?
The main disadvantage of using a smoothed moving average is that it can be slow to react to sudden changes in the market. Additionally, it is prone to false signals, as the smoothing process can create a false sense of momentum.
What is the difference between a simple moving average and a smoothed moving average?
The main difference between a simple moving average and a smoothed moving average is that a simple moving average takes into account only the most recent data points, while a smoothed moving average takes into account the average of the last few data points.
Smoothed moving average (Wilder’s) – takeaways
Our takeaway from the backtests is that a smoothed moving average strategy works well if you buy on weakness (a close below the moving average) and sell on strength when you use a short number of days. However, if you hold for at least 100 days, it doesn’t matter if you buy on strength or weakness.