Contributions of shocks to endogenous variables

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.

Contributions of shocks to endogenous variables

Postby pburriel » Tue Mar 27, 2007 8:50 am

Dear all,

I would like to calculate the contributions of estimated shocks to endogenous variables.

I have estimated a DSGE model with Bayesian techniques and have retrieved the shocks (my model has 4 shocks), but now I want to calculate the contribution of each shock to the historical growth of an endogenous variable, eg. output, so that I can say how they explain the historical behaviour of this variable.

How can I do that with Dynare?

What I thought is that if I include the 4 shocks as exogenous deterministic shocks and run a forecast, I should get the historical behaviour of this variable. Then if I do this for one shock at a time, I would get the behaviour of output if only that shock was present, and from that I can calculate the contributions.

The problem is that dynare only allows to do this if we have at least one stochastic shock, but then my contributions will be wrong since they will mix the impact of the deterministic exogenous shock and of the stochastic shock.

Should I trick dynare by including a stochastic shock that is irrelevant for the solution? Should I use "simul" instead?
Any other ideas?

Thanks,

Pablo
pburriel
 
Posts: 23
Joined: Wed Jun 29, 2005 4:42 am

Postby iacoviel » Tue Mar 27, 2007 2:15 pm

Hi Pablo,

There might be better ways of doing this, but this should work.

You have to replace the simult file in the dynare directory with the attached file, declare the EPSILON variable as a global variable in your mod file (see first lines of the mod example attached), and simulate your economy using stoch_simul. In the mod file, you have to set the EPSILON variable equal to your estimated innovations (it should have rows equal to the number of periods, and columns equal to the number of shocks). When you simulate your model, if the EPSILON variable exists, the innovations are taken from your estimated shocks. Then, if you want to shut off some shocks, simply set to zero the corresponding columns of the matrix EPSILON.

Let me know if this works. The attached example should give you an idea.

Matteo
Attachments
dnk1.zip
simult
(1.43 KiB) Downloaded 675 times
iacoviel
 
Posts: 38
Joined: Wed Feb 01, 2006 6:25 pm

Re: Contributions of shocks to endogenous variables

Postby jpfeifer » Wed Jun 10, 2015 8:26 am

The modern answer would be: use the
Code: Select all
shock_decomposition

command.
------------
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: Contributions of shocks to endogenous variables

Postby fernandocorrales » Tue May 16, 2017 4:45 pm

How can I combine deterministic and stochastic shocks with shock_decomposition comand?
fernandocorrales
 
Posts: 5
Joined: Fri May 12, 2017 4:26 pm

Re: Contributions of shocks to endogenous variables

Postby jpfeifer » Thu May 18, 2017 9:51 am

Unfortunately, that is not yet supported.
------------
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: Contributions of shocks to endogenous variables

Postby fernandocorrales » Thu May 18, 2017 9:43 pm

Is there any second best solution? Something like declare the deterministic shock as stochastic and determine some process the simulates a deterministic path?

Thank you for your help
fernandocorrales
 
Posts: 5
Joined: Fri May 12, 2017 4:26 pm

Re: Contributions of shocks to endogenous variables

Postby jpfeifer » Mon May 22, 2017 6:03 pm

You should be able to make use of the equivalence of deterministic shocks and news shocks at first order. Define news shocks of the required anticipation horizon. Then define an auxiliary endogenous variable equal to that exogenous shock and make it observed. That should do the trick.
------------
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: Contributions of shocks to endogenous variables

Postby fernandocorrales » Thu May 25, 2017 2:25 pm

Thank you very much!!!
fernandocorrales
 
Posts: 5
Joined: Fri May 12, 2017 4:26 pm

Re: Contributions of shocks to endogenous variables

Postby fernandocorrales » Thu May 25, 2017 9:36 pm

Where can I consult the equivalence between deterministic and news shocks at first order?
fernandocorrales
 
Posts: 5
Joined: Fri May 12, 2017 4:26 pm

Re: Contributions of shocks to endogenous variables

Postby jpfeifer » Fri May 26, 2017 7:25 am

This seems to be a bit like the folk theorem: common knowledge without a proper source to refer to. I can only point you to an example:
Code: Select all
https://github.com/DynareTeam/dynare/blob/master/tests/forecast/Hansen_exo_det_forecast.mod
------------
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 10 guests