Page 1 of 1

PV Government Budget Constraint

PostPosted: Tue Aug 27, 2013 1:02 pm
by 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:

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) ;


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

Alex

Re: PV Government Budget Constraint

PostPosted: Tue Aug 27, 2013 1:21 pm
by jpfeifer
Does it work at order=1?

Re: PV Government Budget Constraint

PostPosted: Tue Aug 27, 2013 1:31 pm
by alexch0405
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

Re: PV Government Budget Constraint

PostPosted: Tue Aug 27, 2013 2:06 pm
by jpfeifer
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.

Re: PV Government Budget Constraint

PostPosted: Tue Aug 27, 2013 2:42 pm
by alexch0405
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

Re: PV Government Budget Constraint

PostPosted: Tue Aug 27, 2013 3:02 pm
by jpfeifer
Fine with me.

Re: PV Government Budget Constraint

PostPosted: Tue Dec 24, 2013 7:42 am
by RamonMaxwell
alexch0405 wrote: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:

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) ;


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

Alex


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.

Re: PV Government Budget Constraint

PostPosted: Fri Dec 27, 2013 9:28 am
by jpfeifer
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.