|
Hello,
I am trying to loop the Hodrick Prescott Filter in order to see its performance in a dynamic environent. Unfortunately I have the "Subscripted assignment dimension mismatch" error and I can't figure it out.
If I replace the HP filter by something else like the mean or median, the loop works perfectly...
MALength =
750
length =
10001
HPresearch(4,MALength:end) = PriceActionsMatrix(1,MALength:end)-PriceActionsMatrix(2,MALength:end);
size( HPresearch(4,MALength:end))
ans =
1 9252
for i=MALength:length;
HPresearch(6,i) = hpfilter(HPresearch(4,i-500:i),5);
end
Your help help be greatly appreciated. Thanks a lot in advance!
Charles
|