Recovering oo_.dr.ghx in third-order approximation

Dear all,

In a third order approximation, the first-order terms of the decision rule are corrected for uncertainty. I.e., oo_.dr.g_1=[oo_.dr.ghx, oo_.dr.ghu]+1/2[oo_.dr.ghs2x,oo_.dr.ghs2u]. Yet Dynare sets (see line 54 and 55 of k_order_pert.m) [oo_.dr.ghx, oo_.dr.ghu]=oo_.dr.g_1, meaning I can’t recover the uncertainty corrections oo_.dr.ghs2x and oo_.dr.ghs2u individually. Is there anyway to do this? E.g., is it possible to recover the original, certainty equivalent (i.e. as would result from setting order=1) first-order terms when running a third-order approximation?

Thanks in advance!

P.S. Obviously, I could run Dynare twice, setting order=1 and then order=3, but this is prohibitive with anything iterative and, anyway, shouldn’t be necessary as the certainty equivalent QZ decomposition must be calculated in a higher-order perturbation, too…


The uncertainty correction is incorporated into oo_.dr.g_0, not oo_.dr.g_1!

See the reference manual, section about stoch_simul, for details.


Dear Sébastien,

this is not completely true and has been discussed in [Bug in k_order_solver? ghx changes from order 1/2 to 3). The uncertainty corrections at second order result from the second partial derivative of the policy function w.r.t. the perturbation parameter. This term is saved into g_0 as it does not depend on the state variable. However, at third order, you get an additional term from differentiating twice w.r.t. to the perturbation parameter and once w.r.t. the state variables. This term, which only appears at third order is then added by Dynare to g_1 as it is linear in the state variable. Similary, if you would use Dynare++ to go to fourth order, there is a correction term added to g_2 (of course in addition to the lower order correction terms already contained in g_0 and g_1).

Back to the original question, I am not aware of a way to trace out this correction term without running Dynare twice at different orders and computing the difference.

Thanks for pointing to this previous thread.

I think this is largely a matter of terminology: what we call the “uncertainty correction” is not rigorously defined.