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