Hi, I am trying to solve a standard Small Open economy model with endowment under perfect foresight.

The chracterization of the equilibrium is given by,

c_t^{-\sigma} = c_{t+1}^{-\sigma} \beta (1+r)^{-1}

c_t + b_t(1+r)^{-1} = b_{t-1} + y_t

plus 1 initial condition on b_{-1} and a transversality condition that prevents overborrowing.

I am trying to analyse the response after an income shock (jump of y_0). Of course I have analytical solution to this simple model and I know the transition to the new steady state is inmediate to a higher consumption level.

The issue is that I cannot specify the transversality condition in Dynare and the solution I obtain is explosive savings (since nothing prevent it more than transversality).

How can I specify a condition that prevents debt to explote?

Thanks!

Here is the mod:

```
%----------------------------------------------------------------
% 1. Defining variables
%----------------------------------------------------------------
var c b;
varexo y;
parameters sigma beta r;
%----------------------------------------------------------------
% 2. Calibration
%----------------------------------------------------------------
set_param_value('sigma',p.sigma);
set_param_value('beta',p.beta);
set_param_value('r',p.r);
%----------------------------------------------------------------
% 3. Model
%----------------------------------------------------------------
model;
c^(-sigma) = c(+1)^(-sigma)*beta*(1+r);
c + b/(1+r) = y + b(-1);
end;
initval;
y=1;
c=2-0.96;
b=.96;
end;
shocks;
var y;
periods 1;
values 2;
end;
simul(periods=10);
```