Bonds exploding in deterministic simulation

this is related to a previous problem raised here

in order to find out what’s causing bond path to explode (something buried in my model or possibly algorithm of dynare), i worked with 2 very simple models to test the transition path of bond. both are small open economies, with only bonds-consumption decisions, fixed and known interest rate and endowment, no labor no capital. in both cases, the budget is c(t)+b(t)=y+Rb(t-1), y and R both exogenous and close the system mathematically, i had Uzawa discounting and bonds in utility. With Uzawa, the periodical discounting factor is a decreasing function of the population average consumption at that period, so replace beta with mu(xi+c)^(-psi). With bonds in utility, i make the utility function increasing in both consumption and bond holding, U=ln(c)+alpha*ln(b).

the exercise i do is to start from an initial level of bonds, and use simul command to get the deterministic optimal path that leads to steady state. with bonds in utility, i got bonds converging to steady state values as long as i start not far away from it, which is good. with the Uzawa preference, i get consumption jumping to its steady state value right away, and bonds exploding, both independent of the initial value of bonds. this is strange, because consumption always at steady state is not the optimal solution. if we start from bond above its steady state, we can eat the excess bond in the first period, and then go to steady state consumption from period 2, which is strictly better. besides having the bond exploding issue, i strongly suspect that dynare is not giving the optimal consumption path.

i also have Uzawa discounting in my original 2 country model, and it also has bonds exploding, I wonder if having the Uzawa feature is what causes bond to explode? is there a way to remedy this? or, could this be a computational glitch in dynare?

i attached both codes. thanks a lot for any suggestion.
bond_in_utility.mod (1.12 KB)
uzawa_bond.mod (1.32 KB)

Are you sure your endogenous discount factor example has an interior solution? Currently, consumption jumps to the new steady state determined by the endogenous discount factor being 1/r. From there on, we have perfect consumption smoothing. This new consumption level is then financed by running a Ponzi-scheme. Which economic mechanism should lead to a finite debt level?

thanks! for the uzawa endogenous discount factor example, from the budget equation c(t)+b(t)=y+R*b(t-1), we can see that if consumption goes to steady state right away and stays there forever (dynare’s answer), it can be rewritten as b(t) - b(ss) = R (b(t-1) - b(ss)), b(ss) standing for the steady state value of bond. clearly, for R>1, if initial bond is above (below) the steady state value, it will explode to positive (negative) infinity, as plotted. but as i said in the original post, i think this is not the optimal solution, if b(0)>b(ss), agent can always eat the excess bond c(ss) + R(b(0) - b(ss)) at time 1, and then go to steady state of bond and consumption from period 2, which is better off.

also, in the attached code, i did a stochastic version of the exact same simple model with uzawa and a stochastic endowment y(t), and irfs show everything goes back to steady state after some time, including bonds, no explosion, everything there seems good. imposing a shock to the stochastic system vs starting at a random point, and see how the system converges to steady state, one has exploding bond the other does not, could this be of any value to our discussion?

thanks a lot.
uzawa_bond_stochy.mod (826 Bytes)

i also noticed that in my example with uzawa, if the number of periods in simul is too large, say 500, dynare would not give answer, is this normal, or is this a sign that dynare is not doing what i think it’s doing? unlike stochastic irfs, deterministic simulations is not taking approximations, and making periods larger should simply add a longer horizontal line at the steady state after getting there. is this clue something inside is wrong?

i also did a similar small open economy model, without uzawa, but adding a cost of holding bonds into the budget to close the system. the dynamics turned out all good, nothing exploding. code is attached. looks like uzawa could be the cause of explosion? maybe having consumption feeding into discount factor endogenously affects the dynamics in ways i have yet to understand.

thanks a lot.
bond_cost.mod (882 Bytes)