Moving averages are one of the key tools used to analyse financial time series. In a

nutshell, moving average is simple weighted sum (mean) calculated over selected historical price range.

Most popular moving averages (simple, exponential, weighted, sinus weighted, Spencers, median, Tilson, Hull, double exponential, TRIX/triple exponential, Ehlers, zero lag, Butterworth, Mesa, Savitzky-Golay, Kaufman, geometric, quadratic and harmonic moving average).

**Simple moving average (SMA)**is well known and widespread. It gives equal weights to all past prices and by definition is just average of them. Although very simple, it can solve serious problems. It will be used as a benchmark to compare against other averages.

**Exponential moving average (EMA)**gives exponentially diminishing weights to all past prices. This moving average is very well known and used, therefore formula is not included.

**Weighted moving average (WMA)**gives arithmetically diminishing weights for past prices, depending on length of the average.

**Sinus weighted moving average (SWMA)**is a weighted average, based on motivation, that price fluctuates following some unknown wave. As model, Sine wave is used to adjust price weights. SWMA is calculated using formula:

Where m is period of moving average, X is list of prices with X0 the most recent one.

**Spencers 15 point moving average (SpMA)**is another version of WMA used by

actuaries. It is fixed 15 position mean with weights 3, -6, -5, 3, 21, 46, 67, 74, 67, 46,

21, 3, -5, -6, -3. The problem with this average is high lag.

**Double exponential moving average (DEMA)**is whole different from described above. It is composite moving average and uses other moving averages to get the result [11]. In case of DEMA, the EMA is used. Also, DEMA is adaptive - it employs some mechanism to adapt to price swings dynamically. DEMA uses trick to get better smoothness by running moving average on itself. But this operation increases lag, so to counter this technique called twicing is used. It takes difference between price and moving average to adjust itself, making DEMA adaptive. Formula:

where n is length of moving average and X is the prices.

**Triple exponential moving average (TRIX)**is similar to DEMA but uses exponential

moving average three times:

**Zero lag moving average (ZMA)**sounds like a perfect moving average [9]. But the only thing without lag is the price, which this adaptive and composite moving average uses to correct itself. In a nutshell, ZMA ads portion of price to EMA to counter lag, while giving up some smoothness. Formula (n – period, X – prices

**Tilson moving average (TMA)**is also known as T3. It is both composite and adaptive. It is build using EMA [11]. To make notion more readable, formula is decomposed. First one describes generalized DEMA average introducing parameters n and v. For Tilson moving average, v is 0,7. If v would be 1, then GD would be DEMA. To improve smoothness of TMA, moving average is applied over again.

Hull moving average (HMA) is composite moving average made from composing WMA of various period lengths [12]. Formula:

Exponential Hull moving average (EHMA) is exactly the same as Hull MA but Exponential MA is used instead of Weighted MA:

Ehlers moving average (EhMA) is another adaptive moving average [8]. To use it, data must be first detrended subtracting SMA (of the same period as EhMA) from the price. Then EhMA coefficients are recalculated for each position, based on quadratic distance. This makes EhMA computational expensive with large periods over bigger datasets. Formula (X – detrended prices, n – period of EhMA) is gives for detrended prices, after applying EhMA result is obtained adding SMA back to it:

Butterworth moving average (BMA) came from analogue circuits’ era [8]. Very well known there, works for trading as well. Formula (n – period, X - prices, i – current bar) to calculate current bar BMA(i):

**Mesa moving average (MAMA)**uses Hilbert transform to make EMA adaptive. Because of Hilbert transform this moving average has complex formula, only main parts will be given. By definition MAMA is EMA with variable alpha: MAMA(i) = alpha * Price + (1 – alpha) * MAMA(i-1), where alpha = FastLimit/DeltaPhase. FastLimit is the upper bound of a and DeltaPhase is the rate of change of the Hilbert

Transform homodyne discriminator. The alpha value is kept within the range of FastLimit and SlowLimit.

**Savitzky-Golay moving average (SGMA**) is polynomial smoother [15]. Given last n prices, i tries to fit k level polynomial over them using MSE. Then polynomial value is used as filtered value. SGMA has two parameters: n – period, and k –level of

polynomial to fit.

**Kaufman moving average (KAMA)**is adaptive one, which alters alpha of EMA using smoothing constant C to achieve addictiveness [3 p.731]. Formula (n –period, X – prices, Xi – past price i bars back):

KAMA adjust alpha using efficiency ratio of the market. It is ratio between direction and volatility. Constants 0,6667 and 0,0645 represent adaptivness range from 2 to 30 bars of EMA alpha value. These constants are suggested by author, so we will keep them.

**Chande’s variable index dynamic average (VIDYA)**follows same concept as KAMA. VIDYA, however, uses relative volatility to adjust smoothing constant Formula (s – constant, representing 9 bar EMA smoothing constant, C – closing prices, i – current time, Cn – prices of recent n bars, Cm – prices of longer historic period m>n):

Other types of moving averages

Most popular moving averages
Reviewed by Money99
on
10:18:00
Rating:

## No comments:

Post a Comment