Mulit capital economy with bonds

Dear community,

I am fresh to the topic of DSGE modelling and dynare. It seems that I lack knowledge of some fundamentals as I am not able to implement a model that allows borrowing between agents. I hope the forum is willing and able to provide some advice.

Brief description:
I am trying to run a model where two entrepreneurs rent their accumulated capital stock to some final goods producer. Three agents (households, entrepreneur P and entrepreneur G) consume the final good, households can generate labor income. Entrepreneur P is subject to an exogenous tax. Production technology of the latter can be hit by a shock.
Associated mod file: twocap_no_borrowing.mod

So far so good, I did not experience any problems here. However, as soon as I allow entrepreneurs to offer one period bonds to households and to the other entrepreneur something strange happens. After the shock, the system does not converge back to its steady state.
Associated mod file: twocap_borrowing.mod

From what I understood by reading similar posts, I might have an issue with the timing of variables. However, I was not able to resolve the issue. Please let me know if you have any idea what could be going on.

I highly appreciate any help, thank you!

twocap_no_borrowing.mod (3.0 KB)
twocap_borrowing.mod (3.6 KB)

This is not a timing issue. Rather, it is the result of consumption smoothing. After a shock, bonds are aquired by one agent, who then consumes an annuity out of these bonds. Thus, the bond stock never goes back to steady state, leading to a permanent wealth effect. This is the reason for the unit root your are getting. This behavior is well known from the small open economy literature.

Dear jpfeifer,

many thanks for having a look at my problem and your informative reply.

So the shock basically catapults the system to a new steady state? However, in this new steady state, the borrower(s) is/are worse off with respect to intertemporal utility. This can be seen by calculating intertemporal utility for the three agents (see attached files - U_H, U_P, U_G).

Would it then not make sense for the borrowers to repay debts and abstain from any further issuance of bonds? Or is this were consumption is smoothed since the one period drop in consumption (while repaying bonds) is valued worse than the benefits of a marginal increase of consumption in future periods? I would appreciate if you could point out one descriptive piece of the literature you mentioned.

Thank you very much for your time and efforts!

twocap_no_borrowing.mod (3.0 KB)
twocap_borrowing.mod (3.6 KB)

You cannot simply compare steady states. There is a transition involved that caused the shift in the first place. The classical reference on the solution is Schmitt-Grohe/Uribe (2003) “Closing small open economy models”

Thank you for your help. I will look into it.
Kind regards