PureBytes Links
Trading Reference Links
|
There are two caveats to observe when using MAs as digital filters,
especially when taking a difference between two MAs to yield a band-pass
filter:
The MAs should be CENTERED. This is VERY important. If centered MAs are
used, there should be no phase problems nor any need to invert the
difference (long minus short, as opposed to the correct short minus long).
Second, because of the errors inherent in a MA as a digital filter, the two
MAs used in the difference should not be close in value. For example, use
32 bars and 16 bars to reveal a 32-bar cycle, not 36 and 28. If MA spans
which are too close are used, the error lobes of the two MAs can combine to
give completely spurious results.
One final observation: the final value from a difference between 32-bar and
16-bar MAs (both centered) will correspond to time = T minus16, where "T" is
the time of the latest bar included in both averages. (The value 16 is the
mid-point of the span of the 32-bar MA, not the span of the 16-bar even
though in this example that happens to be the same.)
Carroll S.
----- Original Message -----
From: "DH" <catapult@xxxxxxxxxxx>
To: "Omega List" <omega-list@xxxxxxxxxx>
Sent: Sunday, October 01, 2000 2:41 PM
Subject: Re: Exponential moving average
> > and then displaying the difference - short period
> > MA minus long period MA. This gives you a rough band-pass filter.
>
> Really gotta be careful with phase shifting when you do that. The gif
> (hope it's small enough to get through) shows
>
> yellow = 32 bar sine wave
> red = average(c,32) which outputs zero
> green = average(c,37) - average(c,28) = rough bandpass
>
> Note the bandpass is perfectly in phase with the original signal. Only
> problem is the averages are BACKWARDS -- long minus short. This phase
> stuff is why MA crosses and MACD calcs can kill you if you pick the
> wrong numbers in a cycling market.
>
> --
> Dennis
|