Yes, oil revenue of the government increased drastically due to start of the contracts. It is very volatile during the entire period.
RA
Yes, oil revenue of the government increased drastically due to start of the contracts. It is very volatile during the entire period.
RA
Then you should try a higher order approximation. But more generally, a global solution technique may be more appropriate in this case.
Thank you @jpfeifer, 4th order approximation delivers shocks close to the real data.
In my model, the economy experiences unexpected oil revenue shocks, i.e. each period the economic agents believe that the shock is permanent. Does it imply that I cannot use stoch_simul in this situation?
RA
With a prespecified shock sequence, that should still work.
Am I getting it correctly?
When I exclude the “shocks” block (or set the variance to zero) and use “simult_” to simulate with real data, the agents do not expect any shock and accept each one as permanent shock when they arrive.
Here is my code: StEx3.mod (5.0 KB)
RA
X = simult_(M_,options_,initial_condition_states,oo_.dr,shock_matrix,1);
means you are still using a first order approximation. UseX = simult_(M_,options_,initial_condition_states,oo_.dr,shock_matrix,options_.order);
stoch_simul(irf=15, order=4, nograph)
Thank you @jpfeifer.
pruning
.Unfortunately, In Dynare, the pruning approach is implemented for second and third order approximations. I need fourth or fifth order to get shock values close to real data.
That is true, although we are working on it.
@jpfeifer, would it be correct to use a deterministic case to overcome this difficulty? I mean, compute steady states for each shock value, use them as initial and terminal values, pick up the first period in each transition and put them together as a sequence?
Here is my latest code:
StEx3.mod (5.0 KB)
I’ve come across this discussion before. As you said, a deterministic setup assumes perfect foresight. In my case, I need shocks to be unexpected in each period.
pruning
, so where is the problem? You wrote aboveStEx3.mod (5.0 KB)
2. Yes, but the post MIT shocks in deterministic environment - #4 by ghazika1 outlines the right idea to use a sequence of perfect foresight problems.
In Dynare 4.6.4 X
is not empty with the file I posted.
Your version of my code StEx3.mod (5.0 KB) produces the following error when I am using an updated simult_m (where you’ve fixed a bug):
Error using -
Arrays have incompatible sizes for this operation.
Error in StEx4.driver (line 348)
M_IRF = X(:,M_.maximum_lag+1:end)-repmat(oo_.dr.ys,1,options_.irf);
Error in dynare (line 293)
evalin(‘base’,[fname ‘.driver’]) ;
However, the previous version of simult_m (from the original Dynare package) runs smoothly. Am I missing something?
Please try the most recent unstable version.