PureBytes Links
Trading Reference Links
|
so I tried plotting this function on the Five year note with Max =25 :
Inputs:Price(numeric),Max(numericsimple);
Vars:Len(5),Sum_Price_Chg(0),Min(100);
For Len = 5 to Max begin
Sum_Price_Chg = AbsValue(Summation(Price-Price[1],len));
If Sum_Price_Chg < Min then begin
Cyclelength = len;
Min = Sum_Price_Chg;
end;
end;
but I only get a static of 20 ??
----- Original Message -----
From: "Gary Funck" <gary@xxxxxxxxxxxx>
To: <omega-list@xxxxxxxxxx>
Sent: Thursday, January 08, 2004 10:23 AM
Subject: RE: Cycle Length
>
> Noting Gary Fritz's observation that we should be working with absolute
> values:
>
> For Len = 5 to Max begin
> Sum_Price_Chg = AbsValue(Summation(Price-Price[1],len));
> If Sum_Price_Chg < Min then begin
> Cyclelen = len;
> Min = Sum_Price_Chg;
> end;
> end;
>
> Gary's idea of using slope is interesting and worth a try.
>
> I'm wondering, in the following expression:
> LRS = LinearRegSlope(xaverage(Price,20)-xaverage(Price,15), 10);
> shouldn't the longert term average be subtracted from the shorter term
> average instead? Ie,
> LRS = LinearRegSlope(xaverage(Price,15)-xaverage(Price,20), 10);
> from a cycle length point of view they are likely equivalent, but this
> just seemed to be more reflective of the actual momentum.
> I'd also look at using just a simple bandpass filter:
> X = xaverage(Price, 3) - xaverage(Price, 100);
> where the lower cycle length (3) is approximately half the length of
> interest, and the upper cycle length (100) is approximately twice the
> max length of interest.
>
>
|