Page 1 of 1

expression of time varying sample within formular

Posted: Mon Oct 26, 2020 7:45 pm
by merito
Hi Team,

I am trying to compute time varying correaltions between x and y series via formular @cor(x,y, sample), say @now-100 ,@now
however once the time periods has been set , the formular automatically expressed as @cor(x,y, "8/04/2020 10/27/2020"), and does no change anymore as workfile sample range changes.

I can't find out which expression is able to fix such problem, please help.

with many thanks !

Re: expression of time varying sample within formular

Posted: Mon Oct 26, 2020 8:11 pm
by EViews Gareth
I think what you're saying is that you want to create a formula object with contains a single, repeated, value, where that value is equal to the correlation between the last 100 observations, and every day when you open the workfile, that value will be re-calculated, since the number of observations will have increased by one?

I can't think of a way to do that. Formula objects update when the underlying data changes, they are not dynamic with respect to samples.

You'd be better off writing a quick program that re-calculated the scalar, and just run the program each time.

Re: expression of time varying sample within formular

Posted: Mon Oct 26, 2020 8:23 pm
by merito
thanks for resonding so quickly, as i read many blogs in this forum, i think the better solutions would be: @trend to control time varying sample , or directily apply SSpace Kalman filtering to realise time varying values.

Many thanks !