[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Relative Strength Calculation



PureBytes Links

Trading Reference Links

> > 
> > I would like to use TS2K to perform the weekly ranking of funds and
> > maybe save a few dollars on the AIQ data.

As a follow-up - rather than just taking the most recent week's
precent gain, you cnn incorporate other past time periods by
pro-rating their changes by the square root of the look back
period.  Using random-walk assumptions, this will give the
effective one-week change.  The following function weights
based upon 1,4,8,12 week changes (assumes weekly data):

{ function wgain - weighted %-gain using weekly data }
inputs: P(numericseries);
vars: j(0), k(0), pchg(0);
wgain = 0;
for j = 0 to 3 begin
    k = iff(j = 0, 1, j * 4);   { k = 1, 4, 8, 12 }
    pchg = 100 * (P / P[k] - 1);
    wgain = wgain + pchg * SquareRoot(k);
end;