FINANCE 453 – Global Asset Allocation and Stock Selection
Final Project: The Dual Simple Moving Average Crossover
Submitted by: Emerging Investors
Javier Hazan
Sergio Kurlat
Felipe Monteiro
Eugen Nuri
The FuquaSchool of Business
DukeUniversity
February 28, 2005
Table of Contents
- Executive summary
- The use of MA in technical analysis
- One moving average
- Multiple moving averages
- The Dual Simple Moving Average Crossover
- Data and Methodology
- Results
- Conclusions
1. Executive Summary
Moving Averages are widely used technical indicators. In principle they are easy to use due to its mathematical simplicity. But implementation issues such asestablishing the optimal length of the MAs, telling the difference between crossovers that have some “momentum” (either up or down) and those that will quickly revert, and knowing the universe of stocks where this method will be more profitable, are all arduous tasks in practice.
For this paper we designed and tested four different approaches to DMAC, and applied them to the S&P 500 over 10 years using Factset. Among other topics, we explore here issues such as trading on expected crossover versus trading afterwards, normalization of price movements, and optimal time intervals between measurements.
Our results suggest that there might be some momentum after crossover occurs, so the traditional approach (trading only after crossover instead of anticipating it) leads to better results. We also suggest some possible improvements to our tests.
2. The use of Moving Averages in Technical Analysis
Moving Averages are the most versatile and widely used technical indicator. A moving average is an average of a fixed number of consecutive prices, updated each time a new price is posted. It is designed to smooth out temporary price fluctuations and reveal the true path of the underlying trend.
Moving averages are most often used in combination. That is, two or three moving averages of different length are employed. A common combination is the 4-day, 9-day and 18-day moving average. When the 4-day MA crosses above the 9-day, you've got a "fast" buy signal. If it crosses below the 9-day, you've got a fast sell signal. And if the 9-day crosses the 18-day, you've got a "slow" signal, but it's even stronger confirmation of a trend change or an acceleration of an existing trend. That's why many traders wait for a "slow" moving average signal to enter a trade, but will exit the trade on a "fast" signal to protect profits or limit losses.
By their nature, even "fast" moving average signals lag the market and thus cannot get you in or out of a market at precisely the best time. But they are very helpful in keeping you from overreacting to minor, temporary price aberrations.
While chart analysis is largely subjective, moving averages are mathematically precise and objective. One of the reasons moving averages are so popular is that they embody some of the most common stipulations of successful futures trading. They keep investors from responding to every little zigzag in the market because it either takes a huge single day move or several days' trade counter to the trend before a moving average will tell you to buy or sell. That's why they work best in broad, trending markets, although they can performed poorly in the presence of jagged price series.
By utilizing moving averages, investorsattempt to smooth out or eliminate the random day-to-day price fluctuations. However, the DMAC does not predict market action in the same sense that standard chart analysis attempts to do. As noted earlier, moving averages never anticipate, they only react.
Simple moving averages (or arithmetic means) are probably the most widely used, predominately because of its ease of computation. Two criticisms are usually directed at the usage of simple moving averages. First, only the period of the average is considered. The second criticism is that simple moving averages give equal weighting to each day. Some analysts believe, however, that the more recent data should receive a heavier weighting.
Weighted averages place gradually greater emphasis on more recent data. The advantage of weighting is that this type of average reverses direction more quickly than a simple moving average. To calculate a 10-day average, today's closing (high, low, midpoint or average) price would be multiplied by ten, yesterday's close would be multiplied by nine, and so forth. This total is then divided by 10.
Exponential averages use a smoothing constant, referred to as alpha. Exponents are calculated by dividing 2 by the desired time span. Example: The alpha for a 10-day Exponential Moving average would divide 2 by 10.
3. One moving average
Employed by a number of traders to determine the trend of the market. The average is plotted on the bar chart in its appropriate trading day along with that day's price action. When the closing price moves above the moving average, a buy signal is given; and when it closes below the moving average, a sell signal is generated. For added confirmation, some technicians like to also see the moving average turn in the direction of the trade.
If a shortterm average is utilized, the average tracks closing prices very closely and several crossings can occur in a short period of time. This has its advantages and drawbacks. The use of very sensitive moving averages signals more trades (with higher commission costs) and picks up many false signals. If the average is too sensitive, some of the short-term random price moves (noise) activates trend signals during non-trending periods.
While shorter averages generate more false signals, they have the advantage of giving trend signals earlier in the move. We are trying to find an average that is sensitive enough to generate early signals, yet steady enough to avoid random noise is a difficult task. The process is often called "optimization" because you are seeking the combination of averages that would have produced optimum trading results in the past. (however, just because the system would have produced optimal results in the past, it does not implythat it will deliver optimal results in the future.) The best alternative is to employ another indicator as a filter. The following is a list of some of those filters.
1. Besides requiring that the prices close beyond a moving average line, some technicians require that the entire day's price range clear the average.
2. Another variation requires that the closing price go beyond the moving average by a predetermined amount. This amount can either be based on a percentage or a minimum fluctuation.
3. Other technicians also require that a moving average signal be confirmed by a breakout on the chart as well. This renders even a stronger signal and helps eliminate whipsaw.
4. Time filters are also employed by some traders. In these cases one or more days may be needed beyond the moving average to signal an entry. Because most bad signals reverse quickly, the requirement that the signal remain in force for a predefined period of time helps detect weak or false signals.
5. Utilizing percentage envelopes, or volatility bands is another popular filter. Here, parallel lines aredrawn at percentage points above and below the moving average. Buy signals are given when the market closes above the upper band. Conversely, a sell signal is given when the market closes below the lower band. Exit signals are given when the market closes through the basic moving average.
6. High-low bands can also be used. These are constructed using the highs and lows instead of the close to calculate their placement. A close above the moving average of the high is used for buy orders, a close below the lower moving average is used for sell orders.
4. Multiple moving averages
Using a single moving average has advantages as well as disadvantages. At times shorter moving averages work better than longer averages. The use of a single moving average, however, also generates a number of unprofitable trades -- referred to as whipsaws -- that require the use of filters. To improve effectiveness and dependability, many technicians elect to use two or three moving averages together.
When two moving averages are used together, the longer term moving average is used to help identify the trend, and the shorter one for timing purposes. It is the interplay of the two averages and price itself that produce buy or sell signals.
Typically dual moving averages utilize a crossover method. Buy signals are given when the faster moving average moves above the slower moving average. Sell signals are given when the faster moving average falls below the slower moving average. Popular combinations are 4 and 9, 5 and 20 and 10 and 40 day averages.
A triple moving average crossover is yet another variation. The most widely used crossover method is the 4, 9, and 18-day moving average. Here, buy signals are given when the 4-day average moves above the 9-day and 18-day average. Sell signals are given when the 4-day average falls below the 9-day and 18-day average. Some traders take the initial crossover as an indicator to start liquidating any positions, and wait until the 9-day average crosses the 18-day average to take any new positions.Dual Simple Moving Average Crossover is used to limit the amount of false signals generated by the Simple Moving Average Price Crossover. The Dual SMA crossover generates far fewer trading signals than SMA Price Crossover systems, and increases the profitability of the trading system used.
5. The Dual Simple Moving Average Crossover
Typically, the Moving Averages used in the Dual Simple Moving Average Crossover system are related on an 8 to 1 ratio. This means if the first Simple Moving Average used is a 5 day SMA, then the second should be a 40 day Simple Moving Average.
The buy and sell signals are generated when the faster Simple Moving Average crosses a slower Simple Moving Average. The faster Simple Moving Average is the one with a lower day period. The slower Simple Moving Average is the one with a higher day period. For example, in the trading system with 50 and 200 days Simple Moving Averages the Faster simple moving averages is the 50 days SMA, and the Slower simple moving average is the 200 days SMA.
The BUY and SELL signal generation:When the faster Simple Moving Average has been below the slower Simple Moving Average and crosses above the Slower SMA, a BUY signal is generated. When the faster Simple Moving Average has been above the slower Simple Moving Average and crosses below the Slower SMA, a SELL signal is generated.
6. Data and Methodology
We designed four separate experiments in order to test the DMAC hypothesis. We ran these experimentsin Factset. Our dataset was the S&P 500 for the period January 1995- January 2005.In each test, the dataset was split into a “short below long MA” and “short above long MA” parts, assigned a sorting factor, and rebalanced once a month. The four tests can be briefly described as follows:
(a)“Ratio before crossover”:After selecting only those stocks whose short MA was below its long MA, we calculated the ratio ofthe distance between MAs at t=0, and divided by the distance between MAs at t-1. Therefore, the lower the ratio, the closer we are to the crossover point, and the stronger the signal to buy.
Conversely, we selected a second sample for the same t=0; in this new sample we only have points whose short MA was above its long MA. We also calculated the ratio between distance at t=0 and distance at t-1. In this case, the lower the ratio, the closer we are to the crossover point, and the stronger the signal to sell.
We are aware that, as we are just guessing when a crossover is likely to occur, our system will pick up false signals (i.e. movements of the short MA approaching the long MA, but ultimately reversing this trend and getting farther from the long MA after we trade). However, there is also a tradeoff that makes this test worthwhile: if we are –on average-- successful at trading before the crossover occurs, we will benefit from a larger proportion of the upward movement. In other words, a trader who waitedto buy until the crossover occurred, has already lost a part of the stock appreciation (and he is not immune to a quick reversal either).
(b)“Unit Ratio”:With this method, wecalculate ratio of the differences between the two MAs (short minus long) at t=0 ant t=t-1. Then,we calculate the difference between this ratio and one, and square the result (we want to make the difference between this ratio and one artificially big, for fractile sorting purposes). Just as before, we run the experiment twice: first, for short MA < long MA, and then the opposite.
The reasoning behind this method is that, if the stock price has gone through approximately a half-cycle, then this ratio will be equal to one. In the extreme case, we know that, if the stock price has stayed in a peak or a trough between t-1 and t, then the ratio will be one and we will benefit from ALL the upward (if we go long) or downward (if we short) movement.
(c)“Ratio after crossover”: In this test, weuse the more traditional approach of waiting after the crossover has occurred, and then running our calculations. Specifically, we obtain our BUY signals from those stock prices whose short MA is currently above the long MA, but were in the opposite situation at t-1. The magnitude of the distance between MAs (one after the crossover, one before) is the sorting mechanism for the fractiles. Then, we conduct the same experiment, for stocks whose short MA crossed the long MA from above (i.e. going down). The magnitude of the ratio of distances will generate the fractile that we will short.
(d)“Product after crossover”: This procedure is similar to the previous one, except that we product of the distances instead of the ratio as the sorting mechanism.
7. Results
“Ratio before crossover”:As we explained above, the sorting factor was the following:
,
where:
- subscripts indicate period (t=0 is the day when the return is calculated, while the specific time interval between t and t-1 varies depending on the model)
- superscripts indicate the number of months over which the average price was calculated
In this case, the lag between t and t-1 is 15 days (so, for example, p12(t-1) is the average price between 380 and 15 days ago).
The graphs below show the deciles for the ‘long’ (i.e. short MA below long MA) and ‘short’ (short MA above long MA) parts of the experiment. We decided to use deciles in order to strictly capture only those stocks that were moving clearly towards a crossover.
Small factor magnitude (i.e. points very close to crossover from below) were placed in the first fractile.
In this graph, small factor magnitude (i.e. points very close to crossover from above) was placed in the 10thdecile.
Therefore, it is useful to compare both the first and last deciles of each test, and the first decile of the ‘long’ (or BUY) part, versus the last decile of the ‘short’ (or SELL) part.
We do not notice differences in returns so large that would justify a long-short strategy. Furthermore, the slight differences in returns that we see in the ‘long’ chart are overridden by large standard deviations (see data in excel appendices).
“Unit Ratio”:Here, the sorting factor was the following:
The first fractile corresponds to small factor magnitudes. In other words, we’ll see in the first fractile those stocks whose rayio is close to one, so we expect there is strong reason to either buy (if short MA is below long MA) or sell (if short MA is above long MA).
A long-short strategy would be supported by:
- First decile larger than any other in ‘long’ chart (i.e. if we are in a trough, we then experience the largest return)
- First decile smaller than any other in ‘short’ chart (i.e. if we are in a peak, we then experience the smallestreturn)
- Significant difference between first decile of ‘long’ (gains from buying in a trough) and first decile of ‘short’ (gains from buying in a peak)
As we can see, the results do not support a long-short strategy based on this test.
“Ratio after crossover”:The sorting factor was:
,
where:
- the numerator and the denominator were on opposite sides of the crossover point (for the ‘long’ part of the test, t-1 is before the crossover and t is afterthe crossover; the reverse is true for the ‘short’ part of the test)
- in this experiment, we used a 5-day lag between t-1 and t in order to account for sudden changes around the crossover point
- returns coming from a big magnitude sorting factor were placed in the first fractile. Therefore, a big first fractile in the ‘long’ part would imply good performance for stocks for which an accelerating upward movement is taking place. A small first fractile in the ‘short’ part means poor returns when an accelerating fall in stock price is taking place.