##### Dual Moving Average Crossover (DMAC) Trading Strategy

Merrill Liechty

Lance Stover

Murray Spence

Part 1: Dual Moving Average Crossover

# Part 1: Dual Moving Average Crossover

The concept of a dual moving average crossover is fairly straightforward.  Calculate two moving averages of the price of a security, or in this case exchange rates of a currency.  One average would be the short term (ST) (strictly relative to the other moving average) and the other long term (LT).  Mathematically speaking, the long term moving average (LTMA) will have a lower variance and will move in the same direction as the short term moving average but at a different rate.  The different rates of direction, induces points where the values of the two moving averages may equal and or cross one another.  These points are called the crossover points.

In the dual moving average crossover trading strategy, these crossovers are points of decision to buy or sell the currencies.  What these crossover points imply depends on the approach the investor has in their strategy.  There are two schools of thought: Technical and Value.

The Technical Approach suggests that when the Short Term Moving Average (STMA) moves above the LTMA, that represents a Buy (or Long) signal.  (Conversely, when the STMA moves below the LTMA, the Technical Approach indicates a Sell (or Short) signal.)  The intuition behind this strategy can be explained in terms of momentum.  Basically, the principle of momentum states that a price that is moving up (or down) during period t is likely to continue to move up (or down) in period t+1 unless evidence exists to the contrary.  When the STMA moves above the LTMA, this provides a lagged indicator that the price is moving upward relative to the historical price.  Buy high, sell higher.

The Value Approach offers the opposite trading signals to the Technical Approach.  The Value Approach claims that when the STMA crosses from below to above the LTMA, that the investment is now overvalued, and should be sold.  Conversely when the currency STMA moves below the LTMA then the currency is undervalued it should be bought.  The intuition behind the Value Approach can be thought simply as a mean reversion approach.  Buy low (value), sell high (overvalued).

Both strategies try to achieve the same goal, but do it in opposing ways to one another.  In this paper, we will analyze both the technical and value strategies as applied to the Euro/USD currency exchange rates.

The following graph shows how the dual moving crossover trading strategy produces buy and sell signals.  Note that the gains and losses are calculated by taking the difference between the price (not the moving average value) at signal points.  So, the actual price traded will, with great probability not equal the corresponding moving average values.

# Part 2: Data and Methodology

Below is a table that summarizes the data that we used for this assignment:

 Type of Data Interval Start Date End Date # Total Observations # Observations (excluding weekends) Out of Sample “Hold Out” Observations Euro/USD  FX 5 minute January 3, 1999 February 6, 2002 328,000 228,000 75000

Microsoft Excel was unable to handle the number of observations that we were able to obtain.  It was therefore necessary to use a different software package to do the calculations or write software ourselves.  We decided that C++ was an appropriate language to use.

Methodology:

We wrote C++ code to do the following functions with the data:

1.      Clean data, including filtering out weekends, holidays, and stale periods.

2.      Breakout the specified long and short term moving averages.

a.       Used Fibonacci Series as a starting point for short term and Long term (first 12 – 5,8,13,21,34,55,89,144,233,377,610,987 – examined. Results not different from below).

b.      Calculate all combinations of 10 period increments up to 1000.
e.g. 10,50; 230, 740 (runtime of approximately 30 minutes, 5050 possible combinations)

3.      Calculate the crossover points,

4.      Identify crossover as a Buy or Sell

5.      Calculate results: (with and without slippage of 0.0003)

a.       Profit

b.      # wins/losses/

d.      Max win/loss

e.       Average win/loss

f.        # periods below initial investment

g.       Max portfolio value

h.       Min portfolio value

6.      Determine which moving averages to use in out of sample testing.

7.      Perform out of sample analysis.

8.      Compare in sample with out of sample.

# Part 3: In Sample Results Analysis

The table below summarizes the in sample trial results that were conducted.

The following are three key analyses from the in sample calculations:

1. The dual moving average crossover strategy can provide steady profits when no slippage is assumed.   Furthermore, one does not need to be discerning or selective in the determining the parameters for the short and long term moving averages to be successful.
2. When slippage is accounted for in the profit calculations, the results are far different from the conclusion above.  In fact, over 65% of the possible DMAC combinations are not profitable, and there is considerable downside risk employing a “blind” DMAC strategy.
3. When comparing the technical vs. value approach in sample, it is clear that technical approach out performs the value approach significantly, as evidenced by the average total return.  Compare –4.0% (technical) with –11.4% (value).  Somewhat interestingly, the short term and long term moving average parameters that create the most profitable returns are much more closely grouped in the technical approach than the value approach.  This suggests that the technical approach might be able to be taken out of sample more easily.

# Part 4: Parameter Selection for Out-of-Sample Analysis

At this point in the process we developed a selection methodology for determining what range of STMA and LTMA parameters we would recommend for out of sample analysis.  The process follows:

• Calculated 4,950 combinations of ST/LT portfolios for the outputs listed in Part 3.
• Sorted by Profitability
• Selected those with returns >10%
• Sorted by ST value
• Most profitable ST values grouped between 50-130 (See chart below)

• Sorted by LT value (repeated methodology for ST in the LT)

•  Most profitable LT values grouped between 740-810 (See chart below)

• If it were necessary to pick a single combination of DMAC, we would recommend the 100 (ST), 770 (LT) as the final combination selection
• Please note that this did not represent the single best performer of the 1746 profitable combinations; rather, it represents one of the best candidates based on the described distributions above.

# Part 5: Out-of-Sample Forecasts

The table below summarizes the out-of-sample trial results that were conducted.

From the out-of-sample analysis, we discovered that by utilizing a well-conceived parameter selection process, it appears that we did indeed succeed in selecting profitable DMAC combinations.  The out-of-sample combinations showed considerable improvement over the in-sample combinations.  Compare 89% profitability (screened, out-of-sample) versus 35% (all possible combinations, in-sample).  Also, compare 2.5% average return (screened, out-of-sample) versus –4.0% average return (all possible combinations, in sample).  Perhaps even more importantly, the screened, out-of-sample results showed a far lower standard deviation and downside risk.  In fact, the worse return among the out-of-sample results was a –2.7% return.

# Part 6: Potential Issues

There are portions of our analysis that must be analyzed to determine where there may be underlying hazards (i.e. risks) that may not be readily apparent:

1)      Data – Clean and unbiased data is vital to good analysis.  Given the reliability in the source of the data, we feel fairly confident that the data is indeed accurate; however, our analysis only examined a single currency for a 2 ½ year period.  Although our approach was purely technical in nature, this single data set does not justify generalization across other currencies or asset classes (e.g. futures, equities).

2)      Methodology – A fine line exists between good optimization and data mining.  By examining all possible combinations of DMAC with STMA and LTMA parameters between 10 and 990, we opened ourselves to the temptation of data mining to generate favorable results; however, by employing a well-conceived parameter selection methodology, we felt confident taking the recommended range of parameter values out-of-sample.  Considering that nearly 90% of the selected DMAC combinations were indeed profitable out-of-sample, it is rather unlikely that we could achieve these results through a data mining or “over-optimized” parameter selection methodology.

3)      Risk – Besides taking a rather cursory look at the standard deviation of the expected return and the minimum total return, we did not complete a thorough evaluation of the risks involved.  Investors would also be interested in metrics such as maximum drawdown at any period in time.  (This information would also be relevant to the incentive structure for hedge fund managers.)  In sum, a more thorough examination of risks should be explored.  Perhaps this analysis could yield a “filter” approach to buy and sell signals.  As a result, we would not need to adopt an “always in (excluding weekends)” strategy.

.

# Part 7: Where Do We Go From Here?

It is clear from our results from both the in sample and out of sample analyses, that there must be even smarter ways capture the available profits with the DMAC trading strategy.

Capture more profit through better timing strategies

We can see from the DMAC graph (see Section 1) that much of the potential profit is lost when the trading signal is provided.  This is because the moving average is a trend-following, lagged indicator that only reflects past price action.  As we have shown in our analysis and results, most of the profit potential is lost at that point to trading costs (i.e. the banks get it in the foreign exchange market).  In order to capture more of the available profits, we recommend investigating the following ideas and strategies.

• Price vs. SMA Crossover Strategy.  We recommend exploring an analysis of a Price vs. SMA crossover.  In this way, one of the moving average lags is removed from the analysis.  In effect, this makes the buy/sell signals more timely in nature.  The potential problems with this strategy include:
• Increased transactions and therefore costs.
• Action upon bad signals (i.e. more “whipsaws”).
• Technical analysis research tends to suggest that DMAC trading strategies outperform SMA trading strategies.
• Model Trending vs. Trading Periods.  There are cycles in the data that show periods of time where the prices have very small variations around a similar price or in other words they are in a trading period.  Also, there are periods where the prices are making fundamental moves from one range to another, or trending periods.  Investigating different trading rules into the software that would help identify when these periods begin and end could be very powerful.  Among the possible approaches are traditional technical indicators such as ADX (+DI and – DI), oscillators for trading periods (i.e. RSI, CCI).  Alternatively, more advanced statistical approaches such as hidden Markov models could be examined.
• Additional Trading Rules: Slope Change Analysis.  It is possible that an analysis of the direction of the slope may be helpful in capturing some of the lost profits.  In this scenario, the absolute direction of the slope could determine the trade decision along with the relative slope analysis of the dual moving average.  Although this type of analysis is also lagging and borders on a momentum strategy, there may be some value to the investigation of whether the model could become more robust through inclusion.
• Additional Trading Rules:  Standard deviation from the LTMA.  In this strategy, an exit decision could be made when the current price moves greater than a prescribed standard deviation away from the long term moving average.  This type of trading rule could help capture the profits that otherwise would be lost when a spike comes back down (or goes back up) before the moving averages cross again.  Potential risks of this strategy include:
• Does not allow for “riding the profit wave” by inducing early exits from profit earning trades

Selection of Asset Classes (Currencies, Securities, Futures)

In our analysis, we used data that was provided to us by Professor Campbell Harvey.  It is reasonable to assume that it is possible to go through an analysis to select more profitable currencies and securities.  Some possible methods for selection include

• Various attribute screens of pools of securities and currencies including univariate and bivariate screens could yield more profitable outcomes.
• Predictive regressions of the desirable attributes including liquidity and volatility etc. for currencies, securities, and futures.

Catastrophic Event Analysis

In the wake of multiple major or catastrophic events in the last 3 years including: August 1998 (Russian default); March 2000 (fall in US stock market); September 11, 2000 (Terrorist Attack).  Although we have included two of these three events in our data, we still feel that an analysis should be done to plan for such events (i.e. exit strategies), and their impact to our positions.