PureBytes Links
Trading Reference Links
|
Hello List,
Someone suggested to me that Theil's U statistic could be used
to measure how closely a filter fit past data. U is a value between 0
and 1, where 0 is a perfect fit and 1 is a worst fit. Theil's U is
actually used to measure forecasting errors, but it seems that it would
work for filters as well. What I'm looking for is a way to measure
filters in order to determine if one filter is better than another. Any
comments/help on this idea are greatly appreciated. So far here's the
Easylanguage code that I've come up with, but I'm not sure if it's
correct;
Input: Price(numericseries), Len(numericsimple), ss(numericsimple);
Vars: num(0), den(0), ustat(1);
{TheilU is measuring the past fit of a filter, so any filter can be used
here}
value1 = Average(Price,Len);
num = squareroot(summation(power(value1-C,2),ss)/ss);
den = squareroot(summation(power(value1,2),ss)/ss) +
squareroot(summation(power(C,2),ss)/ss);
ustat = (num/den);
TheilU = ustat;
Thanks,
Trey
|