# 2country trade & bond - Rank conditions ISN'T verified

Hi All,

I really hope that one of you can help me with my model.
See attachment.

I continuously get the error that rank conditions ISN’T verified!
There are 5 eigenvalue(s) larger than 1 in modulus for 6 forward-looking variable(s)

(By the way, this happen after adding the international bond.)

This is a simple 2 country model, each country produces one good using capital and labor.
Each agent consumes the home and foreign good (armington assumption).
there is one international bond that is traded.
The model is deterministic for the moment.

I think this should be straight forward, but I can’t solve it.

Thanks, Erez

See model below or look at attachment…

// The first 150 periods, no shock. From period 150-300, home country productivity rises by 0.01 stderr.
// 2 agent, each country 1 competitive Firms, 2 factor inputs
// each agent consumes home and foreign good (armington assumption)

var ydh ydf ysh ysf xh xhe xf xfe invh invf ch cf kh kf lh lf pdf ph pf wh wf rh rf zh zf tot pxhe pxfe nxh lambh lambf R ibh bf bh bf;
varexo eh ef;
parameters beta phi mu psi delta alpha rho sigma chi pdh;

alpha = 0.25; //production share in capital
beta = 0.99;
delta = 0.025;
psi = 1.75;
chi = 1.3;
rho = 0; //note, rho=0 when we have deterministic model.
sigma = 3; //intERtemp elas
mu = 2; //intRAtemp elas between home and foreign tradable, armington assumption , not-perfect substitutes
phi = 0.75; //armington share 0.5<phi<1 home bias, phi=0.5 NO home bias
pdh =1;

model;
(ch)^(-sigma) = - lambh;
chi * lh^psi = - lambh * wh / pdh;
lambh = lambh(+1) * beta * ( rh(+1) / pdh(+1) + 1 - delta);
lambh = lambh(+1) * beta * ( 1 + R(+1) / pdh(+1) );

``````(cf)^(-sigma) = - lambf;
chi * lf^psi  = - lambf * wf / pdf;
lambf = lambf(+1) * beta * (   rf(+1)   / pdf(+1)   + 1 - delta);
lambf = lambf(+1) * beta * (   1 + R(+1) / pdf(+1) );

ch + invh + ibh = ydh;
cf + invf + ibf = ydf;

pdh * ydh  = wh * lh + rh * kh(-1) +  R * bh(-1) ;   //income balance equation
pdf * ydf  = wf * lf + rf * kf(-1) +  R * bf(-1) ;

invh = kh - (1 - delta) * kh(-1);
invf = kf - (1 - delta) * kf(-1);

ibh  = bh -   bh(-1);
ibf  = bf -   bf(-1);

pdh * bh = - pdf * bf;
``````

// bh = - bf;

``````xh  =       phi^mu  * (ph/pdh)^(-mu) * ydh;
xfe =   (1-phi)^mu  * (pf/pdh)^(-mu) * ydh;

xf  =       phi^mu  *  (pf/pdf)^(-mu) * ydf;
xhe  =  (1-phi)^mu  *  (ph/pdf)^(-mu) * ydf;

ysh = xh + xhe;
ysf = xf + xfe;

ph = exp(zh)^(-1) *( rh^alpha * wh^(1-alpha) ) /( alpha^alpha * (1-alpha)^(1-alpha) );
pf = exp(zf)^(-1) * ( rf^alpha * wf^(1-alpha) ) /( alpha^alpha * (1-alpha)^(1-alpha) );

kh(-1) = (alpha) * ph * ysh / rh;
kf(-1) = (alpha) * pf * ysf / rf;

lh = (1-alpha) * ph * ysh / wh ;
lf = (1-alpha) * pf * ysf / wf ;

zh = rho * zh(-1) + eh;
zf = rho * zf(-1) + ef;

pdf = (phi ^ mu * (pf)^(1-mu) + (1-phi)^mu * (ph) ^ (1-mu ))^(1/(1-mu));

tot=ph/pf;
pxhe=ph*xhe;
pxfe=pf*xfe;
nxh=pxhe-pxfe;
``````

end;

initval;
ydh = 1.0244;
ydf = 1.0244;
ysh = 1.63903;
ysf = 1.63903;
xh = 1.47513;
xhe = 0.163903;
xf = 1.47513;
xfe = 0.163903;
invh = 0.182401;
invf = 0.182401;
ch = 0.841995;
cf = 0.841995;
kh = 7.29606;
kf = 7.29606;
lh = 0.996371;
lf = 0.996371;
pdf = 1;
ph = 0.625;
pf = 0.625;
wh = 0.771095;
wf = 0.771095;
rh = 1/beta - (1-delta);
rf = 1/beta - (1-delta);
zh = 0;
zf = 0;
tot = 1;
pxhe = 0.10244;
pxfe = 0.10244;
nxh = 0;
lambh = -1.67522;
lambf = -1.67522;
R = rh - pdh * delta;
ibh = 0;
ibf = 0;
bh = 0;
bf = 0;
eh = 0;

end;

endval;
ydh = 1.0244;
ydf = 1.0244;
ysh = 1.63903;
ysf = 1.63903;
xh = 1.47513;
xhe = 0.163903;
xf = 1.47513;
xfe = 0.163903;
invh = 0.182401;
invf = 0.182401;
ch = 0.841995;
cf = 0.841995;
kh = 7.29606;
kf = 7.29606;
lh = 0.996371;
lf = 0.996371;
pdf = 1;
ph = 0.625;
pf = 0.625;
wh = 0.771095;
wf = 0.771095;
rh = 1/beta - (1-delta);
rf = 1/beta - (1-delta);
zh = 0;
zf = 0;
tot = 1;
pxhe = 0.10244;
pxfe = 0.10244;
nxh = 0;
lambh = -1.67522;
lambf = -1.67522;
R = rh - pdh * delta;
ibh = 0;
ibf = 0;
bh = 0;
bf = 0;
eh = 0; //change here to 0.01 to make a future productivity shock.
end;

check;
shocks;
var eh; periods 1:150; values 0;

end;
simul (periods=300);

Hi !
I’m just building a similar model, and I’m facing the same problem, I wanted to know if you’ve solved yours and tell me how please.

Best,
AC

hi,

the instruction “check” show that the rank condition is not verified. Since you get 0 residuals, the steady-state looks good and you don’t have any unit root, it may have something to do with the timing of your variables. I suggest you to take a look at it.

Best

Hi all

I had the same problem. Maybe you should look “Closing small open economy models” (Schmitt-Grohé, Martín Uribe; 2002). When you introduce a bond market in this kind of models, the dynamic equilibrium generates a random walk component. Creating endogenous intertemporal discounting solves the problem.

Thanks

[quote=“vbotelho”]Hi all

I had the same problem. Maybe you should look “Closing small open economy models” (Schmitt-Grohé, Martín Uribe; 2002). When you introduce a bond market in this kind of models, the dynamic equilibrium generates a random walk component. Creating endogenous intertemporal discounting solves the problem.

Thanks[/quote]

If that’s the problem it can be also solved with a fixed adjustment cost to bond holdings, it can be small enough so that it does not significantly affect the outcomes of your model. See Karabarbounis (2010) who follows (among others) the paper of Schmitt-Groh ́e, Stephanie, and Mart ́ın Uribe. 2003. “Closing Small Open Economy Models.” Journal of International Economics, 61: 163–185.

[quote=“vbotelho”]Hi all

I had the same problem. Maybe you should look “Closing small open economy models” (Schmitt-Grohé, Martín Uribe; 2002). When you introduce a bond market in this kind of models, the dynamic equilibrium generates a random walk component. Creating endogenous intertemporal discounting solves the problem.

Thanks[/quote]

I have a similar problem. If you make the inter-temporal discounting rate endogenous, then you will need to add one more equation. -> What should that equation come from?