Debt exploding (ponzi)

Dear all,

I am trying to create a simple NOEM model. (with tradable and non-tradable goods)
It works fine if I do not allow HH to borrows.
But as soon as I introduce debt in the model agents will borrow and keep financing by rolling over their debt.
I don’t know if you have a solution?

var PIE U Nn Nt N PN PT P PTF PTH E W YN YT CN CT CTH CTF C B lambda 
     G  r;

varexo An At ;

parameters omega k sigma phi theta v alpha Phi  beta T;
k=0.48;
omega=0.5;
sigma=2;
phi=3;
theta=2;
v =0.5;
Phi=0.3;
alpha=01;
mu=1.5;
T=0;
beta=0.98;

model;

//period 1
PN=1;
PTF=1;

//market clearing
N=Nt+Nn;
YN=G/PN+CN;

//price definition
P=(omega*PT^(1-k)+(1-omega)*(PN)^(1-k))^(1/(1-k));
PT=(v*PTH^(1-theta)+(1-v)*(E*PTF)^(1-theta))^(1/(1-theta));
E=P/PTF;

//utility and consumption definition
U=(1-Phi)*(C^(1-sigma))/(1-sigma)+Phi*((G/PN)^(1-sigma))/(1-sigma)-N^(1+phi)/(1+phi);
C=(omega^(1/k)*CT^((k-1)/k)+(1-omega)^(1/k)*CN^((k-1)/k))^(k/(k-1));
CT=(v^(1/theta)*CTH^((theta-1)/theta)+(1-v)^(1/theta)*CTF^((theta-1)/theta))^(theta/(theta-1));

//production and profit maximization
An*alpha*(Nn)^(alpha-1)*PN=W;
At*alpha*(Nt)^(alpha-1)*PT=W;
PIE=YN*PN+CTH*PTH+E*PTF*(YT-CTH)-N*W;

YN=An*(Nn)^(alpha);
YT=At*(Nt)^(alpha);

//BC and FOC
PTH*CTH+PN*CN+PTF*E*CTF+B=W*N+PIE-T+(1+r)*B(-1);
lambda*W=N^phi;
lambda*PTF*E=(1-Phi)*C^((1-sigma*k)/k)*omega^(1/k)*CT^((k-1)/k+(1-theta)/theta)*(1-v)^(1/theta)*CTF^(-1/theta);
lambda*PTH=(1-Phi)*C^((1-sigma*k)/k)*omega^(1/k)*CT^((k-1)/k+(1-theta)/theta)*v^(1/theta)*CTH^(-1/theta);
lambda*PN=(1-Phi)*C^((1-sigma*k)/k)*(1-omega)^(1/k)*CN^(-1/k);
lambda=beta*(1+r)*lambda(+1);
r=0.026;
//r=1/beta-1;

//Government, now for simplicity =0
G=0;
//T+Bg-(1+r)*Bg(-1);


end;

initval;
An=1;
At=1;
G=0.2;
Nn=0.5;
Nt=0.3;
PN=1;
PT=1.2;
PTF=1;
PTH=1.2;
P=1.2;
E=1.2;
W=0.8;
N=0.2;
YT=0.3;
YN=0.3;
CN=0.2;
CTH=0.25;
CTF=0.25;
lambda=0.9;
C=1;
CT=0.5;
U=-2.4;
PIE=0.2;
//Bg=0;
B=-1;

end;
steady;



shocks;
var An = 1;
var At = 1;
end;

stoch_simul(order=1,irf=20,nograph,ar=1);

Your model features a singularity as is. Why do you e.g. set

//period 1
PN=1;
PTF=1;

Also, your steady state does not make sense ,e.g.

Nt     		 -233.692

Thank you for your prompt answer.

I use PN (price on tradable goods as numaire) and assume a small open economy thus foreign price (PTF) are unaffected by home economy.
I agree with you for the SS, but they do make sense without debt. I’ve been able to find back “normal” SS by setting r=0.02+0.001*exp(-B) (would like to change it as it is not support by academic). So maybe there could be something going on with the interest rate?

And sorry I know my code is quite messy I am relatively new on Dynare,
I really appreciate your help

  1. I see. But then it’s usually recommended to drop the normalized variables from the model. It makes things easier to debug.
  2. Yes, you should focus on why steady state finding goes wrong. Doing ad-hoc tricks does typically not solve the underlying problems.