Page 1 of 1

I don't get the gamma_y variable

PostPosted: Tue Jul 16, 2013 4:27 pm
by lucianojcampos
Hi,
I'm not able to see the gamma_y variable with the autocovariances matrices and the variance decomposition at oo_ variable. Here is the mode file I'm using:
Code: Select all
% Definite version: RBC Model with Cobb-Douglas preferences,
% quadratic adjustment costs and trend
% and fiscal shocks (open economy)
%----------------------------------------------------------------
% 0. Housekeeping (close all graphic windows)
%----------------------------------------------------------------

close all;

%----------------------------------------------------------------
% 1. Defining variables
%----------------------------------------------------------------

var y c k i l B nx T R g z theta;
varexo e_z e_theta e_g;

parameters beta delta alpha sigma gamma phi psi mu r b tauc tauy
Tbar m1 m2 Omega omega rhoz eta rhotheta;

%----------------------------------------------------------------
% 2. Calibration
%----------------------------------------------------------------

alpha   = 0.25;
beta    = 0.98;
delta   = 0.044;
gamma   = 0.36;
sigma   = 2;
phi     = 4;
psi     = 0.1;
b       = 0.6;
Tbar    = 0.03;
r       = 0.03;
tauc    = 0.1;
tauy    = 0.02;
eta     = 0.24;
omega   = 0.04;
rhoz    = 0.76;
rhotheta = 0.3;
sigmaz  = 0.005;
sigmatheta  = 0.8;
sigmag  = 1.4;

m1=gamma*(1-sigma)-1;
m2=(1-gamma)*(1-sigma);
mu=(beta*(1+r))^(1/(-m1));
Omega=(r+delta)/((1-tauy)*alpha);

%----------------------------------------------------------------
% 3. Model
%----------------------------------------------------------------

model;
  c^(m1)*(1-l)^(m2)*(1+phi*(exp(theta(-1))*k/k(-1)-mu))*exp(-m1*theta)=
beta*c(+1)^(m1)*(1-l(+1))^(m2)*((1-tauy)*alpha*y(+1)/k+1-delta+
phi/2*(exp(2*theta)*(k(+1)/k)^2-mu^2));
  c/(1-l) = gamma/(1-gamma)*(1-alpha)*(1-tauy)/(1+tauc)*y/l;
  c^(m1)*(1-l)^(m2)*exp(-m1*theta)/(1+R) = beta*c(+1)^(m1)*(1-l(+1))^(m2);
  R = r+psi*(exp(B-b)-1);
  c+i+nx+g = y;
  nx = (1+R(-1))*B(-1)/exp(theta(-1))-B;
  y = exp(z)*(k(-1)/exp(theta(-1)))^(alpha)*(exp(theta)*l)^(1-alpha);
  i = k-(1-delta)*k(-1)/exp(theta(-1))+phi/2*(exp(theta(-1))*k/k(-1)-mu)^2
*k(-1)/exp(theta(-1));
  g= tauy*y+tauc*c+B-(1+R(-1))*B(-1)/(exp(theta(-1)))-T;
  z = rhoz*z(-1)+e_z;
  theta = (1-rhotheta)*ln(mu)+rhotheta*theta(-1) + e_theta;
  g = eta*y-omega*B(-1)+e_g;
end;

%----------------------------------------------------------------
% 4. Computation
%----------------------------------------------------------------

initval;
  k = gamma/(1-gamma)*(1-alpha)*(1-tauy)*Omega^(alpha/(alpha-1))
*mu^((1-2*alpha)/(1-alpha))/((1-tauy)*Omega*(1+gamma/(1-gamma)*(1-alpha))
-1+(1-delta)/mu+(1-(1+r)/mu)*b*Omega+Tbar*Omega);
  c = gamma/(1-gamma)*(1-alpha)*(1-tauy)/(1+tauc)*(Omega^(alpha/(alpha-1))
*mu^((1-2*alpha)/(1-alpha))-Omega*k);
  l = Omega^(1/(1-alpha))*mu^((2*alpha-1)/(1-alpha))*k;
  y = Omega*k;
  nx = ((1+r)/mu-1)*b*y;
  g = tauy-Tbar+(1-(1+r)/mu)*y+tauc*c;
  z = 0;
  theta = ln(mu);
  g = 0;
  e_z = 0;
  e_theta = 0;
  e_g = 0;
end;

shocks;
var e_z = sigmaz^2;
var e_theta = sigmatheta^2;
var e_g = sigmag^2;
end;

steady;

stoch_simul(periods=180, hp_filter = 1600, order = 1, replic = 500);



I'm using the Dynare version 4.3.3 for windows.

Thanks for your help

best,

Re: I don't get the gamma_y variable

PostPosted: Tue Jul 16, 2013 6:29 pm
by jpfeifer
Because you are requesting simulated moments, not theoretical ones. The manual is very explicit in saying that gamma_y is only created of the periods-option is not used.

Re: I don't get the gamma_y variable

PostPosted: Wed Jul 17, 2013 8:33 am
by lucianojcampos
Hi jpfeifer, thanks for your answer.

best,