mixing shocks & forecast: question

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.

mixing shocks & forecast: question

Postby cel » Tue Jan 18, 2011 11:37 am

Dear all,
I am trying to mix deterministic and stochastic shocks and use the forecast command, as suggested in the user guide.

I have one question:
To understand exactly what happens, I set the deterministic shock to zero (and order 1 approximation):


% stochatic shock
var eps_gamma = 0.1^2;

% deterministic shock
var eps_em;
periods 1:1;
values 0;

steady;
resid(1);
check;
stoch_simul(dr_algo=0, ar=0, nocorr, order=1, nograph, drop=0);
forecast(periods=130);



Then, the forecast of the variable is the steady-state value of the variable all the time (it seems that's not the case anymore for the 2nd order approximation). I would expect the value of the IRF (since I only have a stochastic shock).
In this case, dynare uses forecst and simult_ (instead of forecast and simultxdet), but I do not see the exact difference between the two sets of codes.

So, my question is: what does the command forecast do? How to interpret the output?

I attach the codes.

Thanks a lot,
Céline
Attachments
temp.zip
(7.14 KiB) Downloaded 103 times
cel
 
Posts: 17
Joined: Tue Sep 15, 2009 9:25 am

Re: mixing shocks & forecast: question

Postby SébastienVillemot » Mon Jan 24, 2011 5:58 pm

Hi,

I think it is because you simply don’t trigger the shock. You put the value zero for “eps_em” in the “shocks” block. And since you did not mention this variable in the “initval” block, this is also the steady state value of that variable. So I’m not surprised you don’t get any action. Try to put a different value for the shock to see if you get something.

Best,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

forecast: clarification question on the dynare codes

Postby cel » Wed Jan 26, 2011 1:28 pm

Hi Sebastien,
thanks a lot for your time.

I still have one clarification question... I do not understand exactly what "forecast" does. I mean: I thought that it computes the path of the variables in response to the stochastic shock (varexo), conditional to the deterministic path of one particular variable that we set (varexo_det).

I checked more precisely the dynare codes:
- For order=1, I saw that the forecast path of the variables is identical, whatever the nature of the shock and its size. This is due to the fact that in simultxdet.m, the vector of stochastic shock is always zero (ex(i-ykmin,:)') in

y_(dr.order_var,i) = dr.ys(dr.order_var)+dr.ghx*tempx+dr.ghu*ex(i-ykmin,:)';

- For order=2, the forecast path depends on the volatility of the shock through dr.ghs2/2 in
y_(dr.order_var,i) = dr.ys(dr.order_var)+dr.ghs2/2+dr.ghx*tempx+ dr.ghu*tempu+0.5*(dr.ghxx*tempxx+dr.ghuu*tempuu)+dr.ghxu*tempxu;
which is the shift effect if I am right.


So, at the end of the day, what forecast does exactly? (does it compute the path of variables, conditional to the path of the deterministic variable, independantly of the stochastic shock?) And, why forecast is used for "mixing" shock?
I post an example of the code (small model) that I used to obtain these results.

Thanks again for your help, that's very useful to me.
Best,
Céline
Attachments
MAIN_model_path.m
(2.2 KiB) Downloaded 89 times
model_NK_forecast.mod
(2.7 KiB) Downloaded 156 times
cel
 
Posts: 17
Joined: Tue Sep 15, 2009 9:25 am

Re: mixing shocks & forecast: question

Postby SébastienVillemot » Mon Feb 07, 2011 11:01 am

There are two cases, depending on whether “varexo_det” variables are declared or not.

In a stochastic setup, a “varexo_det” is a “deterministic exogenous”, i.e. a variable whose future path is fully and perfectly anticipated by the agents (without any uncertainty at all). This type of variable is different from classical “varexo” shocks, whose probability distribution is only known by the agents.

The use of “varexo_det” is relatively special and I am not even sure that a paper documents how Dynare computes the solution in that case (it is a mix of rational expectations and perfect foresight solution). In that case, Dynare will indeed compute the path of variables, conditional to the path of the deterministic variable, assuming that stochastic shocks are zero.

If you want to stick to a pure rational expectations model, you should not use “varexo_det”, and the forecast is done on the assumption that all future shocks are zero (the starting point is given in “histval” block). If you want to have non-zero realizations for the future shocks, you need to program a little bit (Dynare does not provide a user interface for doing this), using the “simult_.m” function (it is quite easy to use, I think there are examples on the forum).

Note that there also exist a “conditional_forecast” command, which computes a forecast given an assumption for the future path of endogenous variables. See the reference manual for documentation.

Hope this is clear enough,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests