S&C - Adapting Moving Averages To Market Volatility PDF
S&C - Adapting Moving Averages To Market Volatility PDF
If a market is active, it has volatility: that cannot be avoided. And because the market is continuously
changing, an indicator that attempts to predict market activity must itself adapt and change. How?
Tushar Chande presents a dynamicnot staticindicators: a variable-length moving average, which
adapts to the volatility in question by exponentially smoothing data based on standard deviation.
echnicians can be trend followers or contrarians. Trend followers use price-based indicators, such as
moving averages, while contrarians prefer oscillators such as overbought-oversold indicators. But the
market never does quite the same thing twice, and so no indicator works all the time. The market is
dynamic, adjusting rapidly to information: a continuous tug of war between greed and fear, fact and
fiction. Technical indicators, on the other hand, are static, mechanically applying the same formula to the
relevant data. What is needed is a combination, dynamic indicators that will automatically adapt to the
changing nature of markets, a new class of dynamic indicators that combine exponential moving averages
with other technical indicators to adapt automatically to changing price behavior. What is needed is an
exponential moving average with a continuously variable smoothing index that adjusts rapidly to changes
in price behavior. The smoothing index can be tied to any market variable. It is the continuous, not
discrete, changes in the smoothing index that increases the sensitivity of these moving averages to
changes in price behavior. These new dynamic exponential averages can be referred to a variable index
dynamic average (VIDYA ).
Let us first examine exponential moving averages and how they can be modified to obtain VIDYA , and in
turn compare VIDYA with conventional indicators to illustrate its dynamism. Then we will combine
dynamic averages to derive other indicators and then illustrate their effectiveness.
BUT FIRST, THE BACKGROUND
Exponential moving averages give greater weight to more recent data. An exponential moving average
Article Text
Stocks & Commodities V. 10:3 (108-114): Adapting Moving Averages To Market Volatility by Tushar S. Chande, Ph.D.
Article Text
Stocks & Commodities V. 10:3 (108-114): Adapting Moving Averages To Market Volatility by Tushar S. Chande, Ph.D.
VIDYAd = k n Cd + 1 k n VIDYAd -1
ref
ref
Here, the subscripts d and d-1 denote the new and old time period, C is the closing price at the end of
period d, (sigma) is the standard deviation of the market's prices over the past n periods, is a
reference standard deviation of the market over some period of time longer than n, and k is a numerical
constant. The reference standard deviation could also be an arbitrary value to obtain the desired degree of
smoothing.
From an investor's viewpoint, a "long" VIDYA can be defined with k=0.078, corresponding roughly to a
25-week exponential moving average. A 13-week standard deviation is used to adapt to market volatility.
A reference standard deviation of 6 is used, which represents a 10-year average for weekly Standard &
Poor's 500 data. More precisely, the long V IDYA is given by
(4) VIDYA Ld = 0.078 13 / 6 Cd + (1 - 0.078 13/6) VIDYA Ld-1
A "short" dynamic average is also defined with k = 0.15, roughly equal to a 12-week exponential moving
average. The standard deviation of closing prices is calculated over 10 weeks. The value of the reference
standard deviation is set at 4.
(5) VIDYA Sd = 0.15 10/4 Cd + (1-0.15 10/4) VIDYA Sd-1
To clarify the dynamism of these averages, I tabulated the 13-week standard deviation of the S&P 500
weekly close during three market periods. Also shown is the effective smoothing index using equation 4.
Then I estimated the effective length of the equivalent simple moving average using the well-known
formula for the smoothing constant of an exponential moving average (2/(n+1)), where n is the length of
the equivalent simple moving average.
The dynamic range of VIDYA L is about a factor of 10 (i.e.,30.75 3.18), since it adjusts all the way from a
rather long to a very short moving average based on market volatility. As market volatility increases, the
effective length decreases. Even greater dynamic range is possible, as long as the factor (1-t) is positive.
Clearly, V IDYA L is superbly responsive to the market. VIDYA S also exhibits a similar dynamism.
Now, we define the rapid adaptive variance indicator (R AVI ), defined as
(6) RAVI d = VIDYA Sd - VIDYA Ld
where the long and short dynamic averages are as defined in equations 4 and 5.
Article Text
Stocks & Commodities V. 10:3 (108-114): Adapting Moving Averages To Market Volatility by Tushar S. Chande, Ph.D.
he responsiveness of VIDYA and its vulnerability to instabilities was severely tested during the severe
Article Text
Stocks & Commodities V. 10:3 (108-114): Adapting Moving Averages To Market Volatility by Tushar S. Chande, Ph.D.
FIGURE 1: The S&P 500 weekly closes (A) are plotted along with both the long variable index dynamic
moving average (B) and with the equivalent exponential moving average (C). Note how quickly the
indexed moving average responds to the decline by the S&P 500 in August 1990.
FIGURE 2: The S&P 500 weekly closes (A) are plotted along with both the short variable index dynamic
moving average (B) and with the equivalent exponential moving average (C). The short version of the
indexed moving average follows the market closely.
Stocks & Commodities V. 10:3 (108-114): Adapting Moving Averages To Market Volatility by Tushar S. Chande, Ph.D.
FIGURE 3: The S&P 500 weekly closes (A) are plotted this time with the long variable index dynamic
moving average (B) and with the short exponential moving average (C). The long version of the indexed
moving average still follows the market more close/y than a short exponential moving average.
FIGURE 4: The S&P 500 weekly closes (A) are plotted this time with the long (B) and short (C) variable
index dynamic moving average and with the equivalent long exponential moving average (D). The
narrowing of the difference between the two indexed moving averages indicates a possible trend
reversal
Stocks & Commodities V. 10:3 (108-114): Adapting Moving Averages To Market Volatility by Tushar S. Chande, Ph.D.
FIGURE 5: Using the difference between the short (A) and long (B) versions of the varriable index
dynamic moving average produces the rapid adaptive variance indicator, creating a crossover method
for trading signals.
Stocks & Commodities V. 10:3 (108-114): Adapting Moving Averages To Market Volatility by Tushar S. Chande, Ph.D.
market correction of October 1987 (Figure 4). The narrowing of the variance between the two dynamic
averages signaled a possible market top in September, confirmed in early November as the two averages
crossed over. The lightly smoothed V IDYA S tracks the market tightly and the heavily smoothed VIDYA L
responds rapidly as well. In comparison, the equivalent long exponential average glances over the
extreme price changes. Note the slight instability caused by the market volatility when the short average
dipped below the market low in early December.
The quantitative results are now easier to interpret, as we have a good feel for the smoothing behavior of
these dynamic averages. Now look at RAVI . A buy is signaled when RAVI turns positive from negative
territory and a sell occurs when RAVI goes negative from positive ground, which is the same as the short
VIDYA crosses over or under the long VIDYA (Figure 5).
The results of long trades using RAVI over a test period of January 1980 to July 1991 are in Figure 6.The
total point gain is approximately 207 points (with one open trade) using this strategy. If trade 9 were
closed on July 12, 1991, the gain would be approximately 265 S&P 500 points. For comparison, the same
moving average crossover strategy using the equivalent exponential moving averages with smoothing
constants of 0.15 and 0.078 (same as the k values for VIDYA S and VIDYA L) produced a gain of just 122
S&P 500 points with five long trades (see Figure 7). If the currently open trade for the exponential
averages were closed on July 12, 1991, the gain would be 159 S&P 500 points.
The MACD indicator is composed of the difference between two exponential moving averages with
smoothing constants of 0.15 and 0.077. A moving average of the difference with a smoothing constant of
0.2 is used as a trigger line. I tested the profitability of MACD over the same test period using MetaStock
software. The MACD indicator produced 20 trades and a gain of 205 S&P 500 points (Figure 8).
Currently, there are no open trades with M ACD, since it issued a sell signal on May 17, 1991. Trades with
TurboM ACD over the same period are summarized in Figure 9. In total, there were 25 long trades, with a
gain of approximately 218 points in all.
comparison of each of the four methods discussed is found in Figure 10. Clearly, R AVI beat both the
simple crossover of exponential averages and MACD over the past 11 years. RAVI produced more trades
than did the simple crossover model but less than half as many as did the MACD. A look at the detailed
trades shows that TMACD signaled key turning points two to three weeks before MACD. Its greater
sensitivity produced more trades, which is a key limitation of the MACD approach from an investor's
perspective. RAVI can also be used as an overbought-oversold indicator, since its values peak at over
+10 or -10.
TO SUMMARIZE
Overall, the back testing results show that VIDYA tracks the market (as measured by the S&P 500 index)
better than exponential moving averages do using a fixed smoothing constant. Trading strategies based
on VIDYA seem to perform better than those based on exponential moving averages, as summarized in
Figure 5.
Article Text
Stocks & Commodities V. 10:3 (92108-114): Adapting Moving Averages To Market Volatility by Tushar S. Chande
FIGURE 6
FIGURE 8
R A VI - LONG POSITIONS ON
5/30/80 to 7/12/91
D A TE
TRADE
LY
S&P500
5/30/80
9/11/81
9/30/82
3/9/84
8/17/84
BUY
SELL
BUY
SELL
BUY
111.24
121.61
120.97
154.35
164.14
9/26/86
10/31/86
10/16/87
12/18/87
SELL
BUY
SELL
BUY
232.33
243.98
282.70
249.16
12/25/87
1/1/88
1/8/88
1/15/88
SELL
BUY
SELL
BUY
252.02
247.08
243.40
252.06
1/26/90
5/11/90
8/10/90
11/30/90
SELL
BUY
SELL
BUY
325.80
352.00
335.52
322.22
7/12/90
SELL **
380.25
GAIN/LOSS
TO TAL
POINTS
POINTS
10.37
10.37
33.38
43.75
Biggest gain
:
Successive gains :
70.760
1
Biggest loss
: -15.230
Successive losses : 1
68.19
11.94
Total gain/loss
: 204.560
Total gain/loss ($) : 1,344.96
38.72
150.66
2.86
153.52
-3.68
149.84
73.74
223.58
-16.48
207.10
58.03
265.13
73.74
The results of long positions only are presented. The sell signal on July
12, 1991, is the open profit on that date.
FIGURE 7
Biggest gain
:
Successive gains :
84.080
1
Biggest loss
: -40.490
Successive losses : 1
Total gain/loss
: 122.170
Total gain/loss ($) : 1,004.77
Using only long positions in a crossover trading strategy based on the equivalent short and long exponential moving averages produced a gain of 122.17
points in the S&P 500. If the current open trade had been closed on July 12,
1991, the total gain would have been 159 points.
Stocks & Commodities V. 10:3 (92108-114): Adapting Moving Averages To Market Volatility by Tushar S. Chande
FIGURE 9
FIGURE 10
TRADE
S&P500
5/30/80
1/16/81
11/27/81
1/15/82
BUY
SELL
BUY
SELL
111.24
134.77
125.09
116.33
4/16/82
6/18/82
8/20/82
12/10/82
BUY
SELL
BUY
SELL
116.81
107.28
113.02
139.57
1/14/83
6/17/83
3/8/84
11/30/84
BUY
SELL
BUY
SELL
146.65
169.13
162.35
163.58
1/18/85
3/22/85
5/17/85
8/2/85
BUY
SELL
BUY
SELL
171.32
179.04
187.42
191.48
11/8/85
1/17/86
2/21/86
4/11/86
BUY
SELL
BUY
SELL
193.72
208.43
224.62
235.97
6/27/86
7/11/86
8/29/86
9/12/86
BUY
SELL
BUY
SELL
249.6
242.22
252.93
230.67
10/31/86
3/13/87
6/19/87
9/4/87
BUY
SELL
BUY
SELL
243.98
289.89
306.97
316.7
11/20/87
12/4/87
12/11/87
4/15/88
BUY
SELL
BUY
SELL
242
223.92
235.32
259.77
6/10/88
7/22/88
9/30/88
11/18/88
BUY
SELL
BUY
SELL
271.26
263.5
271.91
266.47
12/23/88
3/3/89
4/14/89
6/16/89
BUY
SELL
BUY
SELL
277.87
291.18
301.36
321.35
7/28/89
9/15/89
12/8/89
1/12/90
BUY
SELL
BUY
SELL
342.15
345.06
348.69
339.93
3/16/90
4/27/90
5/4/90
7/13/90
BUY
SELL
BUY
SELL
341.91
329.11
338.39
367.31
10/5/90
3/15/91
BUY
SELL
311.5
373.59
EXP MA *
CROSSOVER
GAIN/LOSS
TO TAL
POINTS
POINTS
23.53
23.53
-8.76
14.77
-9.53
5.24
26.55
31.79
22.48
54.27
1.23
55.5
7.72
63.22
4.06
67.28
14.71
81.99
11.35
93.34
-7.38
85.96
-22.26
63.7
45.91
109.61
9.73
119.34
-18.08
101.26
24.45
125.71
-7.76
117.95
-5.44
112.51
13.31
125.82
19.99
145.81
2.91
148.72
-8.76
139.96
-12.8
127.16
28.92
156.08
62.09
218.17
6
4 (67%)
84.08
-40.49
26.56
159.37
MACD
20
11 (55%)
70.76
-15.23
10.23
204.56
R A VI *
9
7 (78%)
73.74
-16.48
29.45
265.13
TURBO
MACD
25
16 (64%)
62.09
-22.96
8.73
218.17
NOTES:
* Assumes last open trade closed on 7/12/91; no sell signal from these
models at 7/12/91
Comparing the four different methods highlights the strengths of using moving
averages that respond to changes in the market volatility.
Stocks & Commodities V. 10:3 (92108-114): Adapting Moving Averages To Market Volatility by Tushar S. Chande
FIGURE 11
The basic formulas for each column are presented in a Lotus spreadsheet. Column
F is the weekly close for the S&P 500, while column G is the exponential moving
average using a 0.078 smoothing constant. Column H is the EMA using a 0.15
smoothing constant, and column I is the Lotus formula for the long VIDYA. STD is
the standard deviation formula in Lotus for the cell range stated within the
parenthesis. Column J is the short version formula. Column K is the difference
between column J and I.
Stocks & Commodities V. 10:3 (108-114): Adapting Moving Averages To Market Volatility by Tushar S. Chande, Ph.D.
REFERENCES
Arrington, George R. [1991] . "Building a variable-length moving average," Technical Analysis of STOCKS
& COMMODITIES, Volume 9: June.
Chande, Tushar S. [1991]. "The midpoint oscillator," Technical Analysis of STOCKS & COMMODITIES:
Volume 9: September.
Pindyck, Robert S., and Daniel L. Rubinfeld [ 1981 ] . Econometric Models and Economic Forecasts,
McGraw-Hill Inc.
Figures