Getting Results from DYNARE in an iterative procedure when steady state is approximate


#1

Dear all,

I am wondering if it is possible to obtain results from dynare even when the steady state is close to the accurate one but not identical exactly. I am trying to find the risky steady state where i iterate on moments. I calculate the steady state in a separate m. file and provide the results to dynare using initval. Then I call DYNARE repeatedly to update covariance matrix.
For the deterministic case there are no issues.

However when I move to risky steady state and update the steady state i get error from dynare saying that some equations have not converged etc… But i am trying to iterate on the moments and I am aware that the initial guesses of steady state may not be 100% accurate. All i need is to get the new covariance matrix.

But during the loop after the initial update of steady state DYNARE runs a a few times and gives me the error that steady state is not defined. And stops. I dont want it to stop, I want DYNARE to just give me the covariance matrix that i can use for my outside steady state file

I am wondering if it is possible to suppress the dynare error about steady state and obtain the covariance matrix then iterate until i find a solution that satisfies both dynare initval solver and my external steady state file solver.

I would really appreciate your help. I am worried that i might need to switch the entire model (around 50 equations) to Schmitt-Grohe package which computes the covariance matrix function for any given steady state without checking if it satisfies the conditions. But this will make the whole notation much much messier

Thanks a lot


#2

I do not understand the details… My impression is that you just have to change the value of the tolerance parameter used by the nonlinear solver (by increasing its value). Look for the tolf option of the steady command in the reference manual.

Best,
Stéphane.


#3

Hello Stéphane,

Thanks for taking your time. Basically my mod file looks like

  1. var;

  2. parameters;

  3. model;

  4. steady_state_model or initval
    here i use an extrernal m file to get the steady states

  5. steady;

  6. stoch_simul

and now i get oo_gamma_y{1,1}

what is important for me is to get oo_gamma_y{1,1} and i use this to go back to the external steady state file.
Then start from step 1

When i get errors it stops but i dont want it to stop

Regards


#4

Did you try to use the nocheck option (same section in the reference manual)?

Best,
Stéphane.


#5

Hello Stéphane,

I did try different combinations. I put the following below while using initval but still did not work

options.solve_tolf=1000;
options4fsolve.TolFun = 1000;
options.solve_tolf=100;
options.dynatol.f=100;
options.solve_tolf=1000;
steady(nocheck);
resid;

Is steady_state_model and initval different in terms of using the steady state convergence functions?


#6

Yes it’s different. If you provide an approximate steady state in the steady_state_model block and use the nocheck option I believe it should do the trick (actually I did not try in this kind of situation). I would not change the tolerance parameters.

Best,
Stéphane.