Moving Average Crossover Systems

Moving average crossovers are one of the most well known strategies.  Unfortunately, they have the reputation of being great in theory, but bad in practice.  There are two problems with most moving average crossover signals.  First, they present a signal too late. . Traders refer to this as “lag.”  Second, they give too many false signals that lead to quickly entering and exiting a market (or whipsaws).   Traders refer to this as “noise”.

Let’s try three different moving average crossover strategies and see how they do.

Simple Moving Average (SMA) Crossover

If you were to backtest the most profitable daily simple moving average crossover (16/22).  You would get a net profit of $881  with a 71% winning percentage, but a 17% drawdown.   The strategy was profitable, but had quite a few whipsaws. See below;

Exponential Moving Average (EMA) Crossovers

If you were to backtest the most profitable exponential daily moving average crossover (24/41).  You would get a net profit of $755  with a 75% winning percentage and only a 5% drawdown.  In other words, the longer EMA actually reduced the whipsaws, but it introduced more lag.

See below

Double Exponential Moving Average (DEMA) Cross0ver

Let’s see what happens when we introduce a more adaptive double exponential crossover.  The backtested results for the most profitable combination of the DEMA crossover (18/33).   You would get 8 trades with a net profit of $937 with  87.50% of winning trades and only an  8% drawdown.

see below

Here is what we learn from this research.  Double Exponential Moving Averages introduce less noise and lag because they are more adaptive.  More adaptive moving averages decrease noise and lag.    In later posts, I can go over Kaufman and Mesa adaptive moving averages.  Each is included in the NinjaTrader suite.

If you want to test these systems yourself, then the code is below.  To import it into NinjaTrader just select File → Utilities →Import NinjaScript

SMACrossover EMACrossover DEMACrossover

 

 

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s