I’m trying to simulate the transition from one steady state to another.
I’ve followed the very helpful slides of Sebastien (attached).
Unfortuntely for steady-state changes that are large enough there is no solution (NAN in the residuals) and all the solution algorithms return an error.
The threshold for the change in steady state for which a solution exist is super small (changes in the order of 10^(-7).
I’ve checked that the first order solution at both steady states has no unit root. So they are both locally stable.
This is the syntax I’ve used
verbatim; %Note that ysINIT is a vector that contains the initial steady state values
ys0_ = GB_subsidy_TR_steadystate;
oo_.steady_state = GB_subsidy_TR_steadystate;
where tr_obj is a global variable that changes the steady state computed in the file GB_subsidy_TR_steadystate.m .
I’ve checked the .m produced out of the .mod file and it seems that the initial (y0_) and final (oo_.steady_state) are correctly associated.
The NaNs appear in the Jacobia and residual at the second iteration.
Note that my model contains a number of variables that are constant in this exercise.
I attache a zipped folder with the model if you want to reproduce the error (not it is set to run stoch_simul. Just comment this and uncomment simul.
Thanks and best
ForDynHelp.zip (42 KB)
deterministic.pdf (323 KB)
there seem to be a couple of files missing, e.g. find_incell and str2cell.
Sorry, you are right. Here they are.
find_incell.m (798 Bytes)
str2cell.m (260 Bytes)
Can you please try the unstable version with “brute force”, i.e. delete the
and go for
simul(periods=100,stack_solve_algo = 0,robust_lin_solve) ;
You made my day!! And it’s Friday
It works like a charm.
Thanks Johannes!! (and the Dynare team, for the new solution algorithm!!)
since I’m using the unstable version (master-2017-03-16-1022e67), you might want to know that the simulation output has an incorrect timing. The shock, while hitting at period 1, shows up in the output at period 5, and all the simulation is shifted by 5 periods for all variables.
I am missing the cell2str-function. But when I use
simul(periods=10,stack_solve_algo = 0,robust_lin_solve) ;
rplot Ye Yc RER;
the timing looks correct.
sure. This is rplot. What I referred to was the output of the simulation
0 0 0 0 0.0100 0.0084 0.0071 0.0059 0.0050 0.0042
Could you please provide me with the most recent version of the mod-file you run, including the log-file for your run? I am getting different results.
sorry, just seen your message (must update the e-mail link)
I will send you the stuff. Just bad time now. Note that the initial zeroes might be due to the fact that I have four lags in innovations (news stuff).
It should be easy to trim oo_.endo_simul and the association to variables names accordingly for the Dynare team (unless you don’t prefer to keep it as it is, of course).
What you describe is strange. The most recent unstable version of Dynare should transform all problems to 1-lag problems.