Unit Root in Two-Country Model


For my research I am trying to open up a slightly modified version of the 4-equation NK model (Sims and Wu, 2021) to model a two-country currency union.

The model features two large countries that trade in the final good, and have home bias (country H will want to consume more of good H and country F will want to consume more of good F in their bundles - this engenders different CPIs in the two countries and a RER potentially different from 1 although we’re in a currency union). There is NO international financial market: each country is endowed with its own intermediary who collects deposits from domestic savers and purchases long-term bonds issued by domestic borrowers and by the domestic government.

After having solved for the deterministic steady state where terms of trade = 1 and there is 0 inflation in both countries, I try to run the .mod file but it tells me that the model has 15 eigenvalues outside the unit circle for 16 forward looking variables, hence the BK conditions are not satisfied. In particular, the problem seems to lie in the presence of a unit root among the eigenvalues, as suggested by model_diagnostics.

I’m not super familiar with open macro so I would be extremely grateful if anyone could give a look at my code and help me spot the problem!

Thanks in advance for your kindness!
twocountry.mod (12.2 KB)

Hello, alemacro, when I run the mod file, the dynare report Unrecognized function or variable 'NX_F'.

Hello Jingjing thanks for your reply! There was a little typo in the .mod I uploaded, here’s the corrected version!
twocountry.mod (12.2 KB)

Your model indeed features a unit root, but it’s unclear whether that is indeed the cause of the problem. I can only give you the generic advice: start from a simpler model.