PureBytes Links
Trading Reference Links
|
Alex and Bob, would you guys provide a technical analysis and critique of
this XMA function using the filter concepts in your previous posts? How
does it compare to the functions you've posted? Do you see anyway to make
it "better" in terms of lag and overshoot? How would you improve it
according to your ways of thinking?
Inputs: Price(NumericSeries),Leng(NumericSimple);
Vars: EMA(0),n(leng),K(2/(n+1)),x((n-1)/2);
EMA = K*(2*Price - Price[x])+(1-K)*EMA[1];
XAverage_ZeroLag = EMA;
thanks,
bobra
----- Original Message -----
From: "Alex Matulich" <alex@xxxxxxxxxxxxxx>
To: <omega-list@xxxxxxxxxx>
Sent: Friday, June 11, 2004 9:51 PM
Subject: Re: _SMA3: A steep roll-off lowpass filter
> Dennis,
>
> > The time domain response actually looks similar to a Cauer elliptical
> > filter, the way it rolls off steeply and then goes fairly flat with some
> > ripple in the stopband. I've never tried coding a Cauer in TS but I've
> > seen them used in speaker crossovers. Conceptually, it would be a 4-pole
> > IIR filter with a notch filter about an octave above Fc. In a passive
> > crossover, it's just one extra cap in parallel with the second coil to
> > create the notch.
>
> Interesting... It's an elliptical filter, which means it would have ripple
> in both the passband and stopband. My _SMA3 doesn't ripple in the
> passband, but it's likely not as "brick-wall"-ish as this Cauer filter.
> Also, I know that Cauer filters don't have good phase linearity, which
> implies (I'm guessing) that they might overshoot some signals.
>
> At first glance, this might be tough to implement. I know enough that an
> RC lowpass filter is identical to an exponential moving average (actually
> any RC filter can be implemented as a pile of EMAs). I know the time
> constant of an RC filter is RC, the time constant of an RL filter is L/R,
> but what's the time constant for an LC filter having no R? sqrt(LC)?
>
> This Cauer filter also has 5 degrees of freedom (3 caps and 2 coils) to
> adjust. It would take a lot of fiddling to get it working right.
>
> All I did with _SMA3, I just tuned the natural notches in three simple
> moving averages so that the sidelobes canceled out. I thought of this
> while falling asleep last night, and when I tried it today, I was
> surprised how well it worked. The most recent code I posted executes very
> fast, too.
>
> Trouble is, my _SMA3 is an FIR filter. Doing something similar with an
> IIR filter would be nice, because I have another application that requires
> using the previous value as an input. I'm pretty close to coming up with
> something that behaves like Jurik's JMA -- I can already reproduce his
> older version, Jurik's AMA, exactly. Jurik's AMA has a lot of overshoot
> compared to JMA, though.
>
> I'll think about it a bit.
>
> -Alex
>
>
>
|