My model is a two-country core-periphery model with banks (the file is attached)Paper_19Nov.mod (10.4 KB)
. The model can be solved however in theoretical moments part, there are so many NaN. After model diagnostic, I suspect that the problem is due to collinearity in the way I put in Euler equations, stochastic discount factor, and interest rates.

lambdae: discount factor for the Emerging economy,
lambdac: discount factor for the Center economy,
rstar: interest rate in the Center economy,
r_e: interest rate in the Emerging economy,
pi_e (pi_c): inflation in Emerging (Center) economy

Please let me know another way to better include these equations into the model.

Your help is very much appreciated. Thank you very much…

Your model has a unit root that affects many variables. Maybe there is a problem with closing the model so you get a non-stationary net foreign asset position. See the SGU paper on closing small open economy models at https://ideas.repec.org/a/eee/inecon/v61y2003i1p163-185.html

Thank you very much for your kind help, as always. This is a very helpful information.
I am still trying to stationarize the model using one of the method proposed by the SGU paper.
However, in the mean time, do you think it is safe to use the ‘empirical moments’ from Dynare simulations in replacement for the theoretical moments that are currently not available due to the non-stationarity problem?

I have tried to induce stationarity using one of the method proposed by the SGU paper, namely the ‘Debt elastic interest rate’ where the interest rate faced by the domestic agent is increasing in the aggregate level of foreign debt.

This seems to solve the non-stationarity problem as the theoretical moments exist now (no more NaN in theoretical moments). However, it some how produces dynamics that is unexpected. For example, I introduced a positive shock to the foreign interest rate, but the IRFs show that the foreign interest rate is reduced (negative) on impact.

Can you spot whether I have solved the problem of non-stationarity correctly or is there any other mistake?

Please disregard my last email. I have finally managed to get around the unit-root problem in my model. So in the last attempt, I tried to introduce a different function for the country specific interest rate premium (I add squared (power 2) to the premium function).

This still solves the unit-root problem (NaNs are gone) so I can rely on the second moments produced. Furthermore, the business cycle dynamics are not much different than the non-stationary model (which is expected as in SGU paper).