PV Government Budget Constraint

Hi, I want to code the present value government budget constraint (fiscal theory with long-term bonds, Cochrane 2001, where debt maturing at time t, B_t-1(t), is equal to the present value of future surpluses) in dynare. In this case, B_t-1(t) is a purely predetermined variable because B_t(t+1) DOES NOT appear anywhere else in the model. Is dynare ok with this? Because I keep getting the following error when I invoke the 3rd order approximation:

[quote]dynare:k_order_perturbation: Caught Kord exception: NaN or Inf asserted in first order derivatives in FirstOrder::solve
Error using mexErrCheck (line 41)
Error encountered in: k_order_perturbation.

Error in k_order_pert (line 40)
mexErrCheck(‘k_order_perturbation’, err);

Error in stochastic_solvers (line 65)
[dr,info] = k_order_pert(dr,M_,options_,oo_);

Error in resol (line 118)
[dr,info] = stochastic_solvers(dr,check_flag,M,options,oo);

Error in stoch_simul (line 76)
[oo_.dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);

Error in NonRicardFiscalNKEZSUKRWDisSV (line 1365)
info = stoch_simul(var_list_);

Error in dynare (line 120)
evalin(‘base’,fname) ;[/quote]

This issue goes away when I use the typical flow government budget constraint instead. Thanks.

Alex

Does it work at order=1?

It works for orders 1 and 2 (with and without pruning). I guess this implies something is exploding in the simulation under the third order approximation? There seems to be no issues for the analytical moments. Thanks for the quick reply btw.

Alex

Could you provide me with the mod-file (e.g. via private message or my email address published in the manual). I would like to look into it.

Thanks Johannes. I will email you directly. Is the uni-tuebingen.de address on your webpage ok? I cannot find your email in the manual…

Alex

Fine with me.

[quote=“alexch0405”]Hi, I want to code the present value government budget constraint (fiscal theory with long-term bonds, Cochrane 2001, where debt maturing at time t, B_t-1(t), is equal to the present value of future surpluses) in dynare. In this case, B_t-1(t) is a purely predetermined variable because B_t(t+1) DOES NOT appear anywhere else in the model. Is dynare ok with this? Because I keep getting the following error when I invoke the 3rd order approximation:

[quote]dynare:k_order_perturbation: Caught Kord exception: NaN or Inf asserted in first order derivatives in FirstOrder::solve
Error using mexErrCheck (line 41)
Error encountered in: k_order_perturbation.

Error in k_order_pert (line 40)
mexErrCheck(‘k_order_perturbation’, err);

Error in stochastic_solvers (line 65)
[dr,info] = k_order_pert(dr,M_,options_,oo_);

Error in resol (line 118)
[dr,info] = stochastic_solvers(dr,check_flag,M,options,oo);

Error in stoch_simul (line 76)
[oo_.dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);

Error in NonRicardFiscalNKEZSUKRWDisSV (line 1365)
info = stoch_simul(var_list_);

Error in dynare (line 120)
evalin(‘base’,fname) ;[/quote]

This issue goes away when I use the typical flow government solar panel budget constraint instead. Thanks.

Alex[/quote]

Were you able to fix the error? It seems like I am facing similar issue so can you help me out with some suitable information.

Please try 4.4. The problem was a singularity of the first order approximation that was hard to detect given the size of the model.