Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • dynare dynare
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 108
    • Issues 108
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Dynare
  • dynaredynare
  • Issues
  • #825
Closed
Open
Created Dec 13, 2014 by Johannes Pfeifer@JohannesPfeiferDeveloper

Fix using steady state operator on exogenous variables

The mod-file

var c, h, pi, w, R, r_e, y, gdp, gdp_hat, k, g, w_tilde, w_eq, w_min;
varexo d, z, eta; 

parameters beta, sigma, gamma, theta, ni, tau_w, phi_p, phi_y, rho, alpha;

beta  = 0.997;
sigma = 1;
gamma = 458.4;
theta = 6.1;
tau_w = 0.2;
ni    = 0.28;
phi_p = 1.5;
phi_y = 0.125;
rho   = 0.3;
alpha = 0.064;

model;

w_tilde=rho/(1+pi)*w(-1)+(1-rho)*w_eq;
w_eq   =(1-alpha)*steady_state(z)*steady_state(h)^(-alpha);
w_min  =w(-1)/(1+pi);

//mrs=c^sigma*h^ni/(1-tau_w);

gdp_hat =log(gdp)-log(steady_state(gdp));

r_e=1/(beta*d(+1))-1;

//FOC labor
c^sigma*h^ni=max(w_tilde,w_min)*(1-tau_w);

//Euler equation 1
1=beta*d(+1)*(1+R)/(1+pi(+1))*(c/c(+1))^sigma;

//Euler equation 2
0=(1/(1-alpha))*max(w_tilde,w_min)/z*h^alpha-1-gamma/theta*pi*(1+pi)+beta*d(+1)*(c/c(+1))^sigma * y(+1)/y*gamma/theta*pi(+1)*(1+pi(+1));

// Taylor rule with ZLB
R=max(0,r_e+phi_p*pi+phi_y*gdp_hat);

//output
y=z*h^(1-alpha);

//aggregate resource constraint
c=(1-k-eta)*y;

// resource cost of price adjustment
k=(gamma/2)*(pi^2);

//government purchases
g=eta*y;

// GDP
gdp=(1-k)*y;

//utility
//u=(c^(1-sigma))/(1-sigma)-(h^(1+ni))/(1+ni);
end;

initval;
z=1;
d=1;
pi=0;
k=(gamma/2)*(pi^2);
r_e=1/(beta*d)-1;
h=1;
y=z*h^(1-alpha);
g=eta*y;
c=(1-k-eta)*y;
//w=z;
//w=(1-alpha)/(h^alpha);
gdp=(1-k)*y;
R=r_e;
eta=0.2;
end;

steady;
check;

uses steady_state(z) where z is an exogenous variable. In the _dynamic file, the preprocessor translates this to oo_.exo_steady_state(2) which does not exist in the _dynamic file, leading to a crash. We should either disallow using the steady state operator on exogenous variables or simply enforce that the steady state of exogenous variables is 0. I would prefer the first one as the second would only be viable for stochastic simulations.

Assignee
Assign to
Time tracking