Bug in 4.2.2

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.

Bug in 4.2.2

Postby gbel » Thu Oct 06, 2011 3:35 pm

Hi,

There's a bug with 4.2.2 with calculating the steady state of auxiliary variables when leads are higher then 2. The bug does not appear on 4.2.1.

Here's a short model to test it. Change N to see with various leads.
Code: Select all
@#define N = 4
var A B;
varexo eB;
parameters Bss rho;

Bss=1;
rho=0.9;

model;
A = B(@{N});
B = (1-rho)*Bss +rho*B(-1) +eB;
end;

steady_state_model;
A = Bss;
B = Bss;
end;

resid;
steady;
check;

shocks;
var eB ; stderr 1 ;
end;

stoch_simul(order=1,periods=300,irf=20) ;


Thanks,
Gilles
gbel
 
Posts: 33
Joined: Thu Sep 04, 2008 8:34 pm
Location: Québec

Re: Bug in 4.2.2

Postby gbel » Thu Oct 06, 2011 4:35 pm

Additional info. The auxiliary variables in the steady state file generated by the 4.2.2 preprocessor comes from an inverted loop:
Code: Select all
function [ys_, check_] = test_steadystate(ys_orig_, exo_)
% Steady state generated by Dynare preprocessor
    ys_=zeros(5,1);
    global M_
    ys_(1)=M_.params(1);
    ys_(2)=M_.params(1);
    % Auxiliary equations
ys_(5)=ys_(4);
ys_(4)=ys_(3);
ys_(3)=ys_(2);
    check_=0;
end


ys_(5) and ys_(4) are defined in the wrong sequence.

Gilles
gbel
 
Posts: 33
Joined: Thu Sep 04, 2008 8:34 pm
Location: Québec

Re: Bug in 4.2.2

Postby SébastienVillemot » Wed Oct 19, 2011 8:44 am

Thanks for reporting this bug. I opened a ticket in our bug tracker: https://www.dynare.org/trac/ticket/219
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Bug in 4.2.2

Postby MichelJuillard » Wed Oct 19, 2011 12:11 pm

Thanks Gilles. The bug has been fixed and the correction will be available in tomorrow's unstable version (dated 2011-10-20 or later)

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 13 guests