Help with my two country model


I would appreciate it if someone here could take a look at my model and help me figure out what I may be doing wrong.

  1. I have a two-country model. A large open economy and a small open economy. The large open economy follows Sims and Wu (2019) closely.
  2. The small open economy only differs from the large one in terms of side and has a foreign goods and asset sector.
  3. If I run the large open economy (only) in dynare, the model diagnostics read “MODEL_DIAGNOSTICS: No obvious problems with this mod-file were detected”.
  4. But If I run the two country model in dynare model diagnostic read “MODEL_DIAGNOSTICS: The Jacobian of the static model is singular MODEL_DIAGNOSTICS: there is 1 colinear relationships between the variables and the equations Colinear variables”:
  5. I have spent so much time trying to figure out which equation is creating the problem in my model but to no avail.

I would be extremely grateful if I can get help in identifying which equation is causing the problem in the two-countryclosed.mod (8.9 KB) closed_steadystate.m (2.8 KB) paramfile_closed.m (795 Bytes) paramfile_twocountry.m (843 Bytes) twocountry.mod (24.8 KB) twocountry_steadystate.m (6.6 KB) model. Kindly see attached files ( both closed model and two country model).

Your model has two unit roots. That explains the collinearity problem. You need to figure out where they come from.

Thanks for the time in looking at it. Do you have any suggestion where I should be looking at?

Unfortunately, not. The NaN moments tell you which variables are involved, but debugging here will be rather complicated as the model is big and there are a lot of variables involved.

Thanks a lot for your help. I’ll keep working on it.

Hi jpfeifer,

I debugged my model and noticed the unit-roots are from foreign private assets and foreign government assets held by domestic intermediaries. Following Schmitt-Grothe and Uribe, I introduced a risk adjustment term to pin down both variables in the steady-state. Unfortunately, I still have both variables having unit-roots.
Please, do you have any suggestions to help me deal with two different foreign bonds held by domestic Intermediaries?