Two big open economy model

Dear forum,

I am trying to replicate the results from Nikhil Patel (2016, BIS) - International trade finance and the cost channel of monetary policy in open economies
which can be found here: bis.org/publ/work539.pdf.

I have drawn some inspiration from Benedikt Kolbs code on Justiniano and Preston (2010) and managed so far to include Patels import-export sector in this code, but that is more of a fix than an elegant model. Plus, in that case I have a big and a small economy whereas the idea is to model to equally-sized big open economies (not in a monetary union, with independent monetary policy regimes). If there is demand I can upload that code later, too.

However, the code attached is what I wrote for Patels model with two big open economies. It seems to have the right equations for all the relevant variables (only a definition, Trade/GDP, needs to be added but this shouldn’t pose a problem) but unfortunately the Blanchard-Kahn-conditions are not satisfied and I hope that maybe someone else is able to detect where exactly the rub is.
I have been struggling a good time now without finding the solution, so I would be very grateful…! :laughing:

Thank you all.

EDIT: All equations are log-linearized.
In the mod-file are two different sets of parameterization (second one at the end) - the problems described emerge under the second set, under the first set I get the message that most equations’ resiudals are NaN, the others zero - so that seems even worse…
Patel2016.mod (11.3 KB)

You need to check the correctness and timing of all equations. From my experience, this is like searching for a needle in a haystack. Usually, the only way out is to simplify as far as possible to get a working version of the model and then start adding features back in. Starting with a big model as you do almost never works.