Bug in k_order_solver? ghx changes from order 1/2 to 3

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Bug in k_order_solver? ghx changes from order 1/2 to 3

Postby jpfeifer » Fri Aug 20, 2010 2:45 pm

Dear all,

I compared in two models the solutions using different solvers and approximation orders. Unfortunately, there are significant differences that should not occur from my point of view.
What I found is the following: The first order solution, i.e. in particular dr.ghx, is the same whether I use the k_order_solver option for order 1 or 2 or if I use the standard solver. However, independent of the solver I use, when I move from 2nd to 3rd order, the first order solution (i.e. dr.ghx) significantly changes. From my understanding this should not be the case as the first term of a Taylor approximation should be independent of higher order terms.
In contrast, the second order terms dr.ghxx and dr.ghxu are the same for 2nd and 3rd order approximations.

The above problem might also be the reason for my post about the strange error message " Caught Kord exception: NaN or Inf asserted in first order derivatives in FirstOrder::solve" (http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=2720) as the problem obviously only occurs in the first order derivatives.

The problem occured with the unstable Dynare version of 08/20/2010 under Matlab 2010a 32bit with MSVC10.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: Bug in k_order_solver? ghx changes from order 1/2 to 3

Postby SébastienVillemot » Tue Aug 24, 2010 1:55 pm

Hi,

Actually this is not necessarily a bug.

The point is that Dynare does not deliver the Taylor approximation of the decision rule. It delivers the decision rule of an approximated version of the model. This is quite different, and explains why lower order terms can change when moving to higher order, since when moving to higher order we solve for a different problem (the model is approximated to a different order).

For example, when moving from first to second order, the constant term changes (shift effect due to the variance of the future shocks). This would not have been the case if the solution delivered by Dynare was the Taylor approximation of the decision rules, since the constant term would then be the same in a 1st and 2nd order Taylor expansion of the same function.

It is probably a similar phenomenon at work in your example.

Best,
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 5 guests