# Two big open economy model

**URL:** <https://forum.dynare.org/t/two-big-open-economy-model/5975>\
**Category:** Dynare help (legacy posts)\
**Created:** [12 January 2017 23:11 UTC](https://forum.dynare.org/t/two-big-open-economy-model/5975 "2017-01-12T23:11:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jamo123](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/898d66/32.png) [@jamo123](https://forum.dynare.org/u/jamo123)\
**Post date:** [12 January 2017 23:11 UTC](https://forum.dynare.org/t/two-big-open-economy-model/5975/1 "2017-01-12T23:11:32Z")

</div>

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](http://www.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…! 😆

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](https://forum.dynare.org/uploads/default/original/2X/4/441ba9a25911d2ea469e0863d9b0fb12366e3c04.mod) (11.3 KB)

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [17 January 2017 10:59 UTC](https://forum.dynare.org/t/two-big-open-economy-model/5975/2 "2017-01-17T10:59:35Z")

</div>

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.
