moments of simulated variables

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

moments of simulated variables

Postby iacoviel » Wed Feb 18, 2009 11:25 pm

The Dynare online manual states that (version 3)

"Currently, the HP filter is only available when computing theoretical moments, not for for moments of simulated variables. "
http://www.dynare.org/manual/re26.html *

I was wondering whether this has been fixed - it does not seem so browsing through disp_moments.m -, and if not, why. It would seem to me that one just needs to add a few lines of command to disp_moments after the line that says:
y = y(ivar,options_.drop+ykmin_+1:end)';

something like...

if options_.hp_filter > 1
for i=1:size(y,2)
[y(:,i) t(:,i)]=hpfast(y(:,i));
end
end

is it true?

NB: * new url
iacoviel
 
Posts: 38
Joined: Wed Feb 01, 2006 6:25 pm

Re: moments of simulated variables

Postby SébastienVillemot » Tue Feb 24, 2009 8:58 am

Hi,

This limitation of Dynare is still present: HP filter can only be applied on theoretical moments, not for moments of simulated variables.

There is no good reason for that, except lack of time for adding it.

Where does the "hpfast" function in your code come from? I can't see it in Matlab nor Dynare.

Best,

Sébastien
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: moments of simulated variables

Postby iacoviel » Wed Feb 25, 2009 2:01 pm

The function hpfast was available under Dynare 3 (it is still available in the repository, just google hpfast dynare to find it). Essentially, it HP filters a series into a trend and a cycle. The fix I suggested in the post below should be all that is needed.
iacoviel
 
Posts: 38
Joined: Wed Feb 01, 2006 6:25 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 11 guests