George Arrington in the June 1991 STOCKS & COMMODITIES discussed a variable-length simple moving
average in which the number of days changed by discrete integers. The length is increased or decreased
by an integral number of days based on the magnitude of price changes. He argued that this approach
does not work well with exponential moving averages. A closer look at the smoothing constant t suggests
that it could be a continuous variable (index), thus allowing the use of fractional time periods. For
example, we can write t as
(2) t = k ? V
where k is a numerical constant such as 0.15 and V is a dimensionless market-related variable, such as a
ratio of the standard deviation of the market's closing prices over two different periods.
The smoothing constant is simply a mechanism for incrementing the old value of the moving average to a
new value, and a fractional value of t less than 1 prevents instability. Varying the smoothing index
corresponds to taking larger or smaller portions of the latest data to update the moving average.
Any indicator may be used to connect the index t to the nature of the market's price changes. For
example, the midpoint oscillator, %M, may be used as a measure of the market and inserted as V in
equation 2. By design, the moving average will move faster as prices approach an overbought or oversold
condition. Alternately, market momentum indicators (say, the 26-week price rate of change) may be used
so that changes occur more quickly as prices change rapidly, slowing down as prices stabilize. This
ability to quicken or slow down gives these variable-index exponential averages their dynamism.
DEFINING VIDYA AND RAVI
Specifically, I constructed a variable-index dynamic moving average (VIDYA) connecting the smoothing
index to the market's volatility as follows:
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, s (sigma) is the standard deviation of the market's prices over the past n periods, s 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 VIDYA is given by
(4) VIDYALd = 0.078 ? s13 / 6 ? Cd + (1 - 0.078 ? s13/6) ? VIDYALd-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) VIDYASd = 0.15 ? s10/4 ? Cd + (1-0.15 ? s10/4) ? VIDYASd-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 VIDYAL 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, VIDYAL is superbly responsive to the market. VIDYAS also exhibits a similar dynamism.
Now, we define the rapid adaptive variance indicator (RAVI ), defined as
(6) RAVId = VIDYASd - VIDYALd
where the long and short dynamic averages are as defined in equations 4 and 5.
Go to Beginning >>> Stocks & Commodities
|