Two countries two sectors model, help required

Hi,

I tried to program a frictionless model with two countries and two sectors. The code should be fine (at least on paper), but I can’t get it working. I usually receive the following error message:

The rank conditions ISN’T verified!

??? Error using ==> print_info at 39
Blanchard Kahn conditions are not satisfied: no stable equilibrium

I understand the meaning of the message, however, I can’t find what’s wrong with my code. The code is in the attached file. I would appreciate any kind of help. THanks!
twocountry2sector.mod (12.7 KB)

I’d suggest trying to simplify the code as much as possible until you can find the issue. Note that variables that are predetermined, like capital, have to be lagged compared to how they’re often written out in papers (i.e. y(t) is a function of k(t-1)). Your attached code is way too long for me to be willing to actually work through it. I could look at a drastically simplified version, though.

Ian, many thanks for the answer. The stock variables were already dated back one period. Attached are two versions of the simplified code. “twocountrytwosector” contains the rounded (approx) steady states. Also I attached a short PDF “paper” with the equations. If it helps: the sectors are symmetric and so are the countries which should reduce complexity.
twocountrytwosectors.mod (6.98 KB)
paper.pdf (163 KB)