Trade Gold Using Moving Average Crossovers

Introduction to moving average crossovers

Moving averages are the most widely used indicators in technical analysis, and help smoothing out short-term fluctuations (or volatility) in order to highlight a longer-term trend. Traders classically use the past daily (or intraday) prices to compute their time series, applying different variations of moving averages. In this article, we are going to look at a basic momentum strategy looking at a simple moving average (SMA) crossovers as our signal to buy or sell the underlying asset, gold. In this strategy, traders build a trading signal based on moving average crossovers, by taking a long position if the shorter (faster) moving average is above the longer (slower) moving average, and a short position if the shorter moving average is below the longer moving average (see more here).

For instance, the famous terms ’Golden Cross’ and ’Death Cross’ result from crossovers of the 50 SMA and the 200 SMA. ’Death Cross’ is when the 50 SMA crosses the 200 SMA to the downside, signalling a potential long-term bear market on gold (figure 1).

Figure 1

Source Eikon Reuters

Which parameters should we use to build a SMA crossover strategy?

Even though the 50 and 200 SMAs are probably the most popular moving averages that investors tend to watch carefully, we first have to check if there have been different combinations in the past that have generated ‘enhanced’ returns. Therefore, using daily prices on gold, we look at different combinations of SMA crossovers, with the short SMA ranging from 2 to 50 and the long SMA ranging from 5 to 200. We then compute the Sharpe ratio of each of the combination, which we define as the ratio of the annualized returns over the annualized volatility of the entire sample:

As there are many different combinations, we decide to use a heatmap to detect if there are some ‘hot’ and ‘cold’ areas. How to read a heatmap is pretty straightforward:

  • The red areas are ‘hot’ areas, which implies that the SMA combinations have been working well in the past few years.
  • The green area are the ‘cold’ areas, which are the combination to avoid if you want to build a systematic strategy on gold using SMA crossovers.

In our first backtest, we look at the daily price of gold since 2016; results are shown in Heatmap 1A and 1B. It is important to know that the parameter of the short SMA cannot be bigger than the parameter of the long SMA (blue shaded area).

The ‘Death Cross’ strategy stands at the bottom right of the entire heatmap (Heatmap 1B) and has generated a Sharpe ratio of 0.75 over the past four years, which is less than the ‘long-only’ strategy (long GLD) with a Sharpe ratio of 0.87. The combination that has generated the highest performance is the (35,37) SMA crossovers, with a Sharpe ratio of 1.36.

Figure 2 (left frame) shows the equity curve of the long-only (GLD) versus the traditional ‘Death Cross’ and the (35,37) SMA crossovers. The (35,37) SMA crossover strategy shows that investors would have captured the late declining by going short GLD in the past few months. Figure 2 (right frame) shows the changes in signal for the two strategies; while the Death Cross strategy is very slow and has changed signals only 5 times in the past 5 years (currently sending a buying signal as 50D SMA is trading above the 200D SMA), the (35,37) has a higher frequency and has been sending a sell signal since mid-September to the exception of a few days. As we look at daily prices, we assume that the transaction costs are negligible for a commodity such as gold.

Heatmap 1. Sharpe ratios of SMA crossovers strategy using daily prices of gold since 2016

Heatmap 1A (Long SMA from 5 to 105)

Source: Eikon Reuters, RR calculations

Heatmap 1B (Long SMA from 105 to 200)

Source: Eikon Reuters. RR calculations

Figure 2

Source: Eikon Reuters, RR calculations

In our second backtest, we look at the daily price of gold since 2010 in order to capture the bearish momentum in gold prices that occurred in the first half of the last decade; results are shown in Heatmap 2A and 1B. First, we can notice that the Sharpe ratio are significantly lower, which is not surprising as gold consolidated sharply after reaching its previous high of in September 2011. The ‘Death Cross’ strategy has generated a Sharpe ratio of 0.29, which is again much lower than the ‘long-only’ strategy with a Sharpe ratio of 0.37.

The winner combination this is the (27,53) SMA crossover generating a Sharpe ratio of 0.64.

Figure 3 shows the equity curve of the long-only (GLD) versus the traditional ‘Death Cross’ and the (27,53) SMA crossovers. We can notice again that the Death Cross strategy have barely changed signals in the past decade.

Heatmap 2. Sharpe ratios of SMA crossovers strategy using daily prices of gold since 2010

Heatmap 2A (Long SMA from 5 to 105)

Source: Eikon Reuters, RR calculations

Heatmap 2B (Long SMA from 105 to 200)

Figure 3

Source: Eikon Reuters, RR calculations

Closing thoughts

Even though a lot of investors tend to focus significantly on the Death Cross 50/200 signal when defining bullish or bearish trends coming from momentum strategies, we have seen that this strategy has performed poorly in either the past 5 years or since 2010. We know that past performance does not guarantee future returns, but it is important to add the most powerful ‘quantitative tool’ to your fundamental analysis. At the moment, fundamentals signals on the GLD are mixed; on one hand, the weak USD and the large amount of negative-yielding debt are pricing in stronger GLD, but rising yields in the US could weigh on the pressure metal in the short run. As we saw in the article, the best combinations are also sending bearish signals on GLD.

V-shape equity recovery: a killer for momentum crossover strategies

Even though the financial markets recently experienced a variety of interesting events, the most surprising one was the fast recovery in equities since they hit their low on March 23rd. Figure 1 shows that the SP500 has pulled back to its 50% Fibo retracement of its yearly high-low range, experiencing one of its fastest rally after plunging by 35%. In addition, we saw that one popular technical indicator, the 50D-200D simple moving average crossover, has been forming a ‘death cross’ in the past, which traditionally indicates a bearish signal to market.

Figure 1

SP500

Source: Eikon Reuters

There are many popular momentum strategies based on MA crossovers (both simple and exponential), but the death cross vs. golden cross is a very known one for all asset classes and is closely followed by many market participants. It is a simple systematic strategy, that sends a positive signal when the short-term moving average (50D) trades above the LT MA (200D), which is also called a ‘Golden Cross Formation’, and sends a bearish when the ST MA trades below the LT MA (‘Death Cross Formation’).

Looking at 25 years of daily data, we compute the performance of the Long/Short strategy on the SP500 and compare it to the performance of the SP500 index. Figure 2 shows that the 50/200 crossover strategy generally performs well in periods of slowly trending market (either bull or bear markets), but experiences severe drawdowns in periods of choppy markets. Figure 2 also compares the performance of the L/S strategy with the buy-and-hold one. For a similar volatility, the L/S strategy enhances our annual return by 1.4% to 8.5% for a Shape ratio of 0.44 (vs. 0.37). In addition, drawdowns are significantly reduced as investors are shorting the SP500 in periods of bear equity markets.

Figure 2

Crossover

Source: Eikon Reuters, RR calculations

Based on these results, it seems very tempting for buy-and-hold investors to change their strategy to the systematic one and therefore avoid severe losses in periods of selloff. However, we think that equities will experience frequent V-shape forms with central banks trying to prevent the stock market from falling by 50%+ in the future, which will be devastating for momentum strategies such as MA crossovers. In other words, it will be the death of the ‘Death Cross’ crossover strategy.

 

FX Technical Analysis

This page aims to provide the major technical indicators used in Finance, and especially in the Foreign Exchange market. In addition to define the several steps to compute each specific indicator, we describe a potential systematic (and tactical) strategy applied to currencies and also provide an Excel File (with VBA macros). Hence, readers are able to see how those technical indicators are built, and then can backtest a few strategies on exchange rates using their own parameters.

We chose to first start with the major indicators used by market participants: there are the Moving Average (Simple and Exponential), the Relative Strength Index (RSI), the Moving Average Convergence Divergence (MACD) and the Bollinger Bands.

  1. Link to Momentum Indicators ===> TA_Momentum
  2. Link to Reversal Indicators ===> TA_Reversals
  3. Link to Excel File ===> TechnicalAnalysis_Indicators

Figure 1. Performance of a L/S Portfolio using EMA(5,20) on USD/AUD

Performance.PNG