Covariance of exogenous shocks

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.

Covariance of exogenous shocks

Postby marlenemaya » Thu Dec 08, 2016 12:15 pm

Hi,
we are simulating the asset market model by Bansal and Yaron. Results seems to be correct, but in the output the covariance matrix of shocks shows values equal to 0 for the covariance between each shock and itself. How can it be possible?
Thank you
marlenemaya
 
Posts: 19
Joined: Mon Nov 21, 2016 3:56 pm

Re: Covariance of exogenous shocks

Postby jpfeifer » Thu Dec 08, 2016 12:40 pm

Can you please provide me with the files? Which Dynare version are you using?
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Covariance of exogenous shocks

Postby marlenemaya » Thu Dec 08, 2016 1:16 pm

I'm using the version 4.4.3.

this is the code I write in dynare.
Code: Select all
var x,c,d,v,w;
varexo epsc, epsd, epsx;
parameters mic, mid, lambda, rho, delta, theta, psi;

mic=0.0015;
mid=0.0015;
lambda=3;
rho=0.979;
delta=0.99;
theta=1;
psi=0.133;

phi= 0.1;

model;
v=(delta^theta)* exp(-(theta/psi)*(c(+1))+(theta-1))*log(((1+(v(+1)))*exp(c(+1))/v(+1)))*(1+v(+1))*exp(c(+1)) ;
w=(delta^theta)*exp(-(theta/psi)*(c(+1))+(theta-1))*log(((1+(v(+1)))*exp(c(+1))/v(+1)))*(1+w(+1))*exp(d(+1)) ;
c=mic+x(-1)+epsc;
d=mid+lambda*x(-1)+epsd;
x=rho*x(-1)+epsx;


end;


initval;
c= 0.0015;
d= 0.0015;
x=0;
v= 15 ; 
w= 15;
epsc=0;
epsx=0;
epsd=0;
end;

steady;
check; // CHECKING OF BLANCHARD-KAHN CONDITION

shocks;
var epsc; stderr 0.0078;
var epsx; stderr 0.0351;
var epsd; stderr 0.0003432;

end;


steady(solve_algo=0);
stoch_simul(dr_algo=0, order=1, periods=1000, irf=30, nograph);




Also, how can I compute the policy funcion by hand?

Thank you very much for your help
marlenemaya
 
Posts: 19
Joined: Mon Nov 21, 2016 3:56 pm

Re: Covariance of exogenous shocks

Postby jpfeifer » Fri Dec 09, 2016 9:50 am

1. What do you mean with
compute the policy funcion by hand?

2. The displayed correlations are for the exogenous variables, i.e.
Code: Select all
varexo

But you introduced the correlation manually via a VAR structure for your shocks. That correlation therefore affects endogenous variables, i.e.
Code: Select all
var

That's why the display is correct.
3. I can't help but notice that you are using Epstein-Zin preferences. That will not work at first order and their implementation in Dynare is not correct. See https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Caldara_et_al_2012/Caldara_et_al_2012.mod for an example.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Covariance of exogenous shocks

Postby marlenemaya » Fri Dec 09, 2016 2:07 pm

Thank you for your help :)
1. our preferences are crra.
the covariance matrix of the shocks that we get is shown in the pdf file attached below.
we think is just a strange result.

2. for the policy function: we have an assigment that ask us: "compute policy and transition functions on your own and check that they are the same as what dynare produces".
we used the code:
Code: Select all
PPSI = [(oo_.dr.ys)';(oo_.dr.ghx)';(oo_.dr.ghu)'];

and we got a matrix of coefficients identical to the policy function output produce by dynare but we cannot provide an explanation.
Attachments
Schermata 2016-12-09 alle 14.56.15.pdf
shocks' covariance matrix
(14.9 KiB) Downloaded 73 times
marlenemaya
 
Posts: 19
Joined: Mon Nov 21, 2016 3:56 pm

Re: Covariance of exogenous shocks

Postby jpfeifer » Sat Dec 10, 2016 8:15 am

1.) I still don't get why you think it's strange. You specified the covariance matrix to be
Code: Select all
shocks;
var epsc; stderr 0.0078;
var epsx; stderr 0.0351;
var epsd; stderr 0.0003432;
end;

These are all diagonal entries, which is exactly what you get. You did not specify any off-diagonal entries.
2.) I don't think the assignment asks you to read out the decision rules from Dynare, but rather wants you to compute them yourself, e.g. using the method of undetermined coefficients. And of course your code gives results identical to the one Dynare displays, because you are accessing the decision rule coefficients that Dynare computed and then displays. This is described in more detail in the manual
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

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