Parameter change in a stochastic model with "varexo_det"

At our institute, we are trying to implement an anticipated parameter change in a stochastic model using the variable declaration “varexo_det”. I have not been able to find detailed documentation about this feature (any hints are welcome), but there is one worked out example in a presentation of Michel Juillard’s from some years ago:

econ.lse.ac.uk/staff/wdenhaan/numerical/michelday4.pdf

I’ve copied the example on pages 14-15 into a mod file (example_varexodet_01.mod). The parameter of interest is tau (a tax rate). Apparently, the idea is to specify the steady state before the parameter change (tau = -0.15) in the “initval” block and the steady state after the parameter change (tau = -mu/(1+mu) ) in the “endval” block. But something goes wrong here. The model has one state variable: capital. Its steady-state values are (as shown in the Dynare screen output) 12.2 (initial) and 10.3 (final). However, in the forecast, Dynare does not seem to depart from the initial steady state. If we look at the forecast output (attachment experiment_ex01.pdf with only the mean of the forecast variables), the capital stock clearly starts from the final steady state value, not from the initial one.

Is this a feature or a bug? Is the example set up correctly or not? Any suggestions how to handle this case?
experiment_ex01.pdf (8.57 KB)
example_varexodet_01.mod (871 Bytes)

Which Dynare version are you using? In 4.4.3 there was a bug. Please try the unstable version or use [Problem with varexo_det/ forecast + 2nd order approximati)
You might also be interested in github.com/DynareTeam/dynare/blob/master/tests/forecast/Hansen_exo_det_forecast.mod
Note that initval/endval are not appropriate for setting initial conditions in stochastic settings. See github.com/DynareTeam/dynare/pull/1182

Thanks, Johannes, for your response. Yes, I’m using version 4.4.3. I’ve now applied the bugfix in stochastic_solvers.m. This changes the results, but not in the respect I was focusing on: the start level of the state variable.

Your example “Hansen_exo_det_forecast.mod” was helpful, indeed. Quite a difference with the Juillard example I started with; and it solves the issue with the starting level of the state variable. I’m still curious how to handle a permanent parameter change. (In your example the parameter change was temporary.) In the attached model (example_Pfeifer_03.mod) I’ve introduced a permanent anticipated shock to productivity (productivity increases by 1 percent in period 8 and remains at this level). Would you code it in the same way? Do I see it correctly that the final steady state (at productivity level exp(0.01)) does not play a role in solution and forecast?

Is there a detailed documentation of what “forecast” precisely does in a case with an exogenous parameter change?
example_Pfeifer_03.mod (3.03 KB)

Using a one-time shock to a unit root variable is one way to achieve a permanent shock. In a stochastic context, Dynare approximates the decision rules around the initial steady state. Therefore, the “terminal steady state” does not play a role (keep in mind that there is an approximation error involved).

What my mod-file initially showed is that a news shock and a deterministic exogenous shock are equivalent at first order. What you need to ask yourself is which question you want to answer.

What forecast does it simply iterating the state-space solution of the model forward from the historical values for a given sequence of shocks that you provide.