Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
dynare
dynare
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 115
    • Issues 115
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 6
    • Merge Requests 6
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Packages
    • Packages
    • Container Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Dynare
  • dynaredynare
  • Issues
  • #617

Closed
Open
Opened Feb 17, 2014 by Johannes Pfeifer @JohannesPfeifer
  • Report abuse
  • New issue
Report abuse New issue

Fix translation of histval to one-lag problem

For deterministic simulations with more than one lag, the translation to a problem with one lag for use in sim1 does not work.

The mod-file

var c k z_forward z_backward;
varexo x z_shock;

parameters alph gam delt bet aa;
alph=0.5;
gam=0.5;
delt=0.02;
bet=0.05;
aa=0.5;

model;
c + k - aa*x*k(-1)^alph - (1-delt)*k(-1); // Resource constraint
c^(-gam) - (1+bet)^(-1)*(aa*alph*x(+1)*k^(alph-1) + 1 - delt)*c(+1)^(-gam); // Euler equation
z_backward=0.1*1+0.3*z_backward(-1)+0.3*z_backward(-2)+0.3*z_backward(-3)+(x(-4)-1);
z_forward=0.1*1+0.45*z_forward(+1)+0.45*z_forward(+2)+(x(+4)-1);
end;

initval;
c = 1.2;
k = 12;
x = 1;
end;

histval;
x(-1)=1.30;
x(-2)=1.30;
end;

shocks;
var x;
periods 2;
values 0.9;
end;

simul(periods=200,maxit=100);

shows that the problem comes from M_.endo_histval, which is set to

M_.endo_histval = zeros(M_.endo_nbr,M_.maximum_lag);
oo_.exo_simul( M_.maximum_lag + -2, 1 ) = 1.30;
oo_.exo_simul( M_.maximum_lag + -1, 1 ) = 1.30;

and thus has more than one initial period.

Assignee
Assign to
4.5
Milestone
4.5
Assign milestone
Time tracking
None
Due date
None
2
Labels
bug preprocessor
Assign labels
  • View project labels
Reference: Dynare/dynare#617