Dual Moving Average Crossover (DMAC) Trading Strategy

FINANCE 453, GLOBAL ASSET ALLOCATION

Captain Carnage Asset Management

Dual Moving Average Crossover (DMAC) Trading Strategy

Merrill Liechty
Lance Stover
Murray Spence

TABLE OF CONTENTS

Part 1: Dual Moving Average Crossover

Part 2: Data and Methodology

Part 3: In Sample Results Analysis

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

Part 5: Out-of-Sample Forecasts

Part 6: Potential Issues

Part 7: Where Do We Go From Here?

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 DataIntervalStart DateEnd Date# Total Observations# Observations (excluding weekends)Out of Sample �Hold Out� Observations
Euro/USD FX5 minuteJanuary 3, 1999February 6, 2002328,000228,00075000

 

Note about Software:

 

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.
  3. 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).
  4. Calculate all combinations of 10 period increments up to 1000.
    e.g. 10,50; 230, 740 (runtime of approximately 30 minutes, 5050 possible combinations)
  5. Calculate the crossover points,
  6. Identify crossover as a Buy or Sell
  7. Calculate results: (with and without slippage of 0.0003)
  8. Profit
  9. # wins/losses/
  10. #trades
  11. Max win/loss
  12. Average win/loss
  13. # periods below initial investment
  14. Max portfolio value
  15. Min portfolio value
  16. Determine which moving averages to use in out of sample testing.
  17. Perform out of sample analysis.
  18. 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 IssuesThere 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
      • Increased trading costs

     

    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.�