Fibonacci Moving Averages – Trading Strategy Backtest (Does it work?)
Last Updated on August 22, 2022 by Oddmund Groette
Moving averages are one of the most useful technical indicators. This is because they are simple and flexible while offering useful information about the trend, as well as support and resistance zones. There are many types of moving average indicators, but in this post, we will be looking at the Fibonacci moving average. What it is? Can we make profitable Fibonacci moving average strategies in the markets?
Fibonacci moving averages are difficult to calculate, and we only find them valuable when using long-term moving averages.
The Fibonacci moving average (FMA) is a type of moving average that calculates many exponential moving averages using lookback periods from the Fibonacci sequence on both highs and lows to form a dynamic support/resistance zone. It works like a typical moving average but tends to provide more support/resistance reaction zones.
Table of contents:
Fibonacci moving average strategy backtest and best settings
Before we go on to explain what a Fibonacci moving average is and how you can calculate it, we go straight to the essence of what this website is all about: quantified backtests.
Our hypothesis is simple:
Does a Fibonacci moving average strategy work? Can you make money by using Fibonacci moving averages 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.
Because a Fibonacci moving average consists of 12 different moving averages, we added all of them and divided by 12.
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 at the close 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 at the close 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 strategies look like this:
Strategy 1
CAR |
3.5 |
MDD |
-50.61 |
Strategy 2
CAR |
5.73 |
MDD |
-42.37 |
Compared to most of the other moving averages, the Fibonacci moving average works best when you sell on strength and sell on weakness. However, the annual return of the crossover systems in strategies 1 and 2 are not impressive and not tradeable, in our opinion.
The results from backtests 3 and 4 looks like this (the results are not CAGR, but average gains per trade):
Strategy 3
Bars |
5 |
10 |
25 |
50 |
100 |
200 |
0.52 |
0.5 |
1.58 |
2.28 |
5.12 |
9.78 |
Strategy 4
Bars |
5 |
10 |
25 |
50 |
100 |
200 |
0.39 |
0.52 |
1.56 |
1.83 |
4.5 |
9.34 |
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 returns by holding for 200 days after a signal is competitive compared to buy and hold.
What is the Fibonacci moving average?
The Fibonacci moving average is a great indicator that uses the Fibonacci numbers as a lookback period in calculating many exponential moving averages on the ‘high’ and ‘low’ price data. It then uses the exponential moving averages to calculate the final moving averages of the ‘high’ and ‘low’ price data.
The choice of the ‘high’ and ‘low’ price data, instead of the ‘close’ price data, is because they are considered price rejection levels and, as such, can present more important support and resistance levels in the moving average indicator. The Fibonacci moving average tends to give a better view of the market, whether long term or short term, and it is very useful in spotting potential support and resistance zones. It is a powerful indicator that takes into account many underlying moving averages to give out an approximate short-term/long-term view of the markets.
The strength of this moving average lies in its dynamic support and resistance levels. Remember that the Fibonacci sequence is used to identify retracement levels in technical analysis. This ability to identify potential price reversal levels is what is leveraged in creating the Fibonacci moving average. Thus, the moving average not only shows the trend but also has a tendency to identify potential support and resistance zones.
How to calculate a Fibonacci moving average
To calculate the Fibonacci moving average, you first need to understand how the Fibonacci sequence is obtained and how the moving average is calculated. From there, you can now input this sequence into the parameters of your moving average.
The Fibonacci moving average uses exponential moving averages, whose formula is given as follows:
EMA = (K x (C – P)) + P
Where:
C = Current Price
P = Previous periods EMA (A SMA is used for the first period’s calculations)
K = Exponential smoothing constant
The Fibonacci sequence is as follows;
0,1,1,2,3,5,8,13, 21, 34, 55, 89…
This number is obtained by adding the two previous numbers. For example, 55 is gotten by adding 34 + 21. Thus, the formula for the Fibonacci sequence is given as:
Y = Y_{n – 1 }+ Y_{n – 2 }
Calculating the Fibonacci moving average
- Use the Fibonacci sequence of numbers as a lookback period to calculate many exponential moving averages on the ‘high’ price data.
- Do the same with the ‘low’ price data
- Then, uses the values of exponential moving averages so calculated to calculate the final moving averages of the ‘high’ price data and also for the ‘low’ price data
- You will have two Fibonacci indicator lines: one for the ‘high’ and another for the ‘low’
Source: TradingView, courtesy of Sofien Kaabar, CFA
Why use the Fibonacci moving average?
The Fibonacci moving average makes use of the Fibonacci sequence as its input, and this sequence has been known to identify potential areas of value on the price chart.
In addition to identifying key support and resistance areas on the chart, the indicator can help you to spot trends and reversals. It can also add strength to your oscillators since you know that the Fibonacci sequence acts as an area of value. For example, an oversold reading on your oscillator coupled with a pullback of price to the trend could be a confirmation that a reversal is likely.
How to use the Fibonacci moving average
On your trading platform, you can search for it in the indicator tab. For example, in TradingView, the indicator has already been added as a custom indicator, courtesy of Sofien Kaabar, CFA. You simply search for it and attach it to your chart.
However, if it is not available on your trading platform, you can pay someone to code it for you. Alternatively, you can manipulate an EMA to get a Fibonacci-based moving average by doing this:
- Add an exponential moving average to your chart
- Set its lookback period to any of the Fibonacci sequences
Note that this does not give you the actual Fibonacci moving average developed by Sofien Kaabar, CFA.
How can you use the Fibonacci moving average?
You can use the Fibonacci moving average in different ways. Let’s see a few examples.
As a single indicator, the Fibonacci moving average can be used to identify the trend and then trade pullback reversals from its support and resistance levels.
- First, identify the direction of the trend using the slope of the indicator: an upward slope implies an uptrend, while a downward slope implies a downtrend.
- Then wait for a pullback to the indicator
- Use a candlestick reversal pattern, like the engulfing pattern to know when the price is bouncing off from the indicator line.
A second method is to use two different Fibonacci moving averages to trade the crossover strategy. In the chart below, the 21-period Fibonacci moving average is paired with the 89-period Fibonacci moving average. A buy signal is generated whenever the 21-period average crosses above the long-term average as seen below.
The daily chart of the S&P 500 showing two Fibonacci moving averages (21/89 period)
Just as you do with the crossover strategy, it works well in a trending market. Adding more confirmation will increase the probability of your trades.
Drawbacks with Fibonacci moving averages
As with most moving averages, the Fibonacci moving average also manifests the lag factor because it uses past price data. In addition, it could also give false signals when the market is range-bound.
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
- Exponential moving average (backtest strategy)
- Hull moving average (backtest strategy)
- Linear-weighted moving average (backtest strategy)
- Adaptive moving average (backtest strategy)
- Smoothed 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)
- 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