simult_ and nonzero IRFs in higher-order approximations

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.

simult_ and nonzero IRFs in higher-order approximations

Postby ripatti » Mon Mar 02, 2015 10:05 am

Dear Musketeers,

I am trying to use simult_ function to simulate model that is solved using order=2 (and order=3). I start the simulation from the steady-state (oo_.dr.ys), input shocks that has value zero.

For order=1, everything works as expected: the deviation from oo_.dr.ys is zero.

For order=2, and order=3, the deviation is not anymore zero (in the attached example of magnitude 10^-3).

What is wrong? The attached code builds on jermann98.mod file using the instructions I found the forum.

Best regards,

Antti
Attachments
non0irf.mod
(3.49 KiB) Downloaded 127 times
ripatti
 
Posts: 59
Joined: Mon Jan 16, 2006 6:28 am
Location: Helsinki

Re: simult_ and nonzero IRFs in higher-order approximations

Postby jpfeifer » Mon Mar 02, 2015 10:18 am

Your model transitions from the deterministic steady state to the stochastic steady state. The latter is defined as the fixed point of the model in the absence of shocks, but where agents take into account that shocks might happen. At second order, you get an additional term g_sigma_sigma in your policy rules that depend on uncertainty. Because of that, the fixed point is not the deterministic steady state anymore. See e.g. the Appendix to Born/Pfeifer (2014): "Risk Matters: A comment" at https://www.aeaweb.org/articles.php?doi=10.1257/aer.104.12.4231
------------
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: simult_ and nonzero IRFs in higher-order approximations

Postby ripatti » Mon Mar 02, 2015 11:10 am

Thank you Johannes!

I have couple of couple of clarifying questions (let's limit to second order case for simplicity):
1) If I read the manual correctly the (higher order) approximation is still done around the deterministic steady-state?
2) Assuming the above is correct, then simulated path (of y^h = y-y^s) is affected by the additional constant term 0.5\Delta^2, and the second order term (y^h kronecker y^h) results the "hump-shaped" (non-constant) path?
3) It seems that dynare++ (that results a zero line in a similar exercise) does NOT take the approximation around the deterministic steady-state but around the point that takes into account this additional term. Its' manual says "The approximation takes into account deterministic effects of future volatility".
4) Is there way to do the same in the standard dynare?

The ultimate goal is to have more control over the impulse responses the model produces. (This is the reason for using simult_) For example, to see the impulse responses of a shock of certain size (different from standard error).

So, thanks again for your reply!

Cheers,

Antti
ripatti
 
Posts: 59
Joined: Mon Jan 16, 2006 6:28 am
Location: Helsinki

Re: simult_ and nonzero IRFs in higher-order approximations

Postby jpfeifer » Mon Mar 02, 2015 12:26 pm

1.) Correct. Dynare always approximates around the steady state. There is some unfinished risky steady state implementation
2.) Exactly.
3.) Dynare++ by default recenters the approximation point following Juillard/Kamenik (2005) unless you use the
Code: Select all
--no-centralize

option
4.) No, there isn't. At higher order, there are two common ways for computing GIRFs: the one of Fernandez-Villaverde et al 2011 that computes IRFs around the stochastic steady state and the one of Andreasen et al . (2012) that computes IRFs around the ergodic mean. I don't see why you would want to change the approximation point. The question rather is where to start your IRFs. In the replication code to Born/Pfeifer (2014): "Risk Matters: A comment" you can find code that uses the simult_ function to compute IRFs around the stochastic steady state. There, the hump would be absent.
------------
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: simult_ and nonzero IRFs in higher-order approximations

Postby ripatti » Mon Mar 02, 2015 12:57 pm

Thanks again Johannes! This is really beyond the call of duty!

I quickly skimmed your code. Is the following interpretation right
1) You simulate looonnngg sequence with zero shocks and take the last value to of the path to get what you call "ergodicmean_no_shocks".
2) You simulate the shocked path starting from this "ergodicmean_no_shocks" and calculate the impulse responses as the deviation from the above mentioned "ergodic mean".

Cheers,

Antti
ripatti
 
Posts: 59
Joined: Mon Jan 16, 2006 6:28 am
Location: Helsinki

Re: simult_ and nonzero IRFs in higher-order approximations

Postby ripatti » Mon Mar 02, 2015 1:03 pm

It seems to work. The code is attached (modified version of the code in my first post).

Antti
Attachments
non0irf.mod
(3.65 KiB) Downloaded 175 times
ripatti
 
Posts: 59
Joined: Mon Jan 16, 2006 6:28 am
Location: Helsinki

Re: simult_ and nonzero IRFs in higher-order approximations

Postby jpfeifer » Mon Mar 02, 2015 1:20 pm

Exactly. You start at the stochastic steady state and, given that there is only a one-time shock, you will converge back to it. The IRF is thus the difference. But you really should not call it ergodic mean. Either call it "ergodic mean in the absence of shocks" or "stochastic steady state". Ergodic mean would be the mean of the simulation with shocks.

Finally, when using these IRFs at an order higher than 2, you should be aware of their advantages and limitation. See Section "IV. IRFs at the Ergodic Mean" of the Appendix to the comment references above.
------------
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: simult_ and nonzero IRFs in higher-order approximations

Postby hec » Mon Aug 24, 2015 2:56 pm

If I may pick up on this disscusion. Actually, if one use the pruning option with third order approximation in stoch_simul command then the response to the zero shock is no longer zero as in the example posted by Anti where the pruning was not used. So in general one will get different impulse responses (starting from the "ergodic mean in the absence of shocks" and using simult_) to shocks with and without pruning used in the stoch_simul command. Hence my question is: if one uses the pruning option should the impulse responses to some shock in the model be computed as a difference between (I assume there is only one exogenous shock in the model):

IRFs = simult_(initial_condition_states,oo_.dr, ex_1, 3) - simult_(initial_condition_states,oo_.dr, ex_0, 3) where ex_0 is just a vector of zeros and where ex_1(1,1) = 1, and initial_condition_states is the "ergodic mean in the absence of shocks".
hec
 
Posts: 6
Joined: Sun Feb 16, 2014 1:07 pm

Re: simult_ and nonzero IRFs in higher-order approximations

Postby jpfeifer » Wed Aug 26, 2015 3:25 pm

Sorry, but I don't understand what you mean. Even with pruning the IRF to a 0 shock will be 0. See our replication code for Born/Pfeifer (2014) "Risk Matters: A comment" where we use pruning.
------------
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: simult_ and nonzero IRFs in higher-order approximations

Postby hec » Wed Aug 26, 2015 5:04 pm

It appears there is a short transition period after the zero shock when the pruning is used. The system starts from the stochastic steady state but it deviates for few periods and then returns back to the stochastic steady-state. I agree it should be zero but it seems that it is not. Maybe I did something wrong. I will check again and post the code when I get to my laptop.
Last edited by hec on Thu Aug 27, 2015 7:17 am, edited 1 time in total.
hec
 
Posts: 6
Joined: Sun Feb 16, 2014 1:07 pm

Re: simult_ and nonzero IRFs in higher-order approximations

Postby hec » Thu Aug 27, 2015 7:16 am

Here is an example. I modified the code from Anti and used Dynare 4.4.3 version.
Attachments
non0irf_3order.mod
(5.09 KiB) Downloaded 149 times
hec
 
Posts: 6
Joined: Sun Feb 16, 2014 1:07 pm

Re: simult_ and nonzero IRFs in higher-order approximations

Postby jpfeifer » Sun Aug 30, 2015 2:14 pm

The problem is the particular pruning scheme. As shown in Andreasen et al., pruning enlarges the state-space. In this case, the EMAS is characterized by three initial states instead of just one as in the Fernandez-Villaverde et al (2011) pruning. But you are currently initializing the pruned system with only one element of the enlarged state-space.
------------
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: simult_ and nonzero IRFs in higher-order approximations

Postby hec » Sun Aug 30, 2015 4:15 pm

Ok. I get your point. So what is your opinion on taking care of this when constructing the IRFs to nonzero shock by simply substracting the zero shock IRFs? My intuition is that this should work at least as an approximation.
hec
 
Posts: 6
Joined: Sun Feb 16, 2014 1:07 pm


Return to Dynare help

Who is online

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