Zero Lag Exponential Moving Average Trading Strategy: Backtest and Evaluation

Zero-lag exponential moving average strategy backtest

The moving average is no doubt one of the most widely used technical indicators. While there are different traditional types, many variations are being created all the time to improve on the old versions. The zero-lag exponential moving average is one of the improved versions of the exponential moving average. But do you know what it is? Can we make profitable zero-lag exponential moving average strategies in the markets?

Yes, zero-lag exponential moving average strategies do work. Our backtests show that a zero-lag exponential moving average can be used profitably for both mean-reversion and trend-following strategies on stocks.

The zero-lag exponential moving average (ZLEMA) is a type of exponential moving average that seeks to reduce the inherent lag seen in a typical moving average. It was designed to track the price more closely and give a clearer view of the trend with no lags.

Zero-lag exponential moving average strategy backtest and best settings

Before we go on to explain what a zero-lag exponential 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 zero-lag exponential moving average strategy work? Can you make money by using zero-lag exponential 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.

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