# Small open economy-steady state

**URL:** <https://forum.dynare.org/t/small-open-economy-steady-state/3975>\
**Category:** Dynare help (legacy posts)\
**Created:** [16 June 2014 15:24 UTC](https://forum.dynare.org/t/small-open-economy-steady-state/3975 "2014-06-16T15:24:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![carlosvasco](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/90db22/32.png) [@carlosvasco](https://forum.dynare.org/u/carlosvasco)\
**Post date:** [16 June 2014 15:24 UTC](https://forum.dynare.org/t/small-open-economy-steady-state/3975/1 "2014-06-16T15:24:56Z")

</div>

Hello,

I’m trying to run this “small open economy” model on Dynare. But it says that there is not steady state:

“Impossible to find the steady state. Either the  
model doesn’t have a steady state, there are an  
infinity of steady states, or the guess values  
are too far from the solution”

Can someone tell me what I’m doing wrong? 😊 I upload the .mod file as .txt  
[modelo16.txt](https://forum.dynare.org/uploads/default/original/2X/4/47bc6d1c372da59aec7bb5cf09f81536d2c5df75.txt) (1.25 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 June 2014 19:01 UTC](https://forum.dynare.org/t/small-open-economy-steady-state/3975/2 "2014-06-17T19:01:32Z")

</div>

Try to compute the steady stata analytically using pencil and paper. For your model, this should be straightforward. On my machine, Dynare finds the following steady state:

[quote]STEADY-STATE RESULTS:

y -4.08625  
c 1.95484  
k -6.1014  
l 0.0958977  
w 0.697914  
r 0.235592  
z 1  
b -0.353146  
Te 0.579002[/quote]

But negative capital makes no sense. Check your parameters. Particularly the beta seems really low.

Finally, not that you are violating Dynare’s timing convention. You will need:

`predetermined_variables k b;
`

---

<div class="post-metadata">

**Author:** ![carlosvasco](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/90db22/32.png) [@carlosvasco](https://forum.dynare.org/u/carlosvasco)\
**Post date:** [28 June 2014 17:20 UTC](https://forum.dynare.org/t/small-open-economy-steady-state/3975/3 "2014-06-28T17:20:22Z")

</div>

We try another model. But still we can’t find a steady state.

We are trying to replicate a paper: “Optimal oil taxation in small open economy”. We think we have trouble with the initial values.

> [@](#):
>
> * * *
> 
> var c l k b w r tc e p z te y tb;
> 
> varexo x;
> 
> parameters mu r1 beta teta gama phi alpha pe prho rho sigma delta;
> 
> mu = 1/3;  
> r1 = 0.04;  
> beta = 1/(1+r1);  
> teta = 1/3;  
> gama = 1/3;  
> phi = 0.2;  
> alpha = 2;  
> pe = -0.176;  
> prho = 0.94;  
> rho = 0.96;  
> sigma = 1;  
> delta = 0.028;
> 
> model;  
> y = z\*(k^(teta))_(l^gama)_(e^(1-teta-gama)); % eq 1  
> c+k(+1) - (1-delta)_k + 0.15_y + tb = y; % eq 3  
> tb = p_e +b(+1) - (1+r1)b; % eq 5  
> (c/(1-l)) = ((1-mu)/mu)(w/(1+tc)); % eq 6  
> ((c/(1-l))^(-mu))_((1+phi_y)^(-alpha))/(1-tc) = beta_((((c(+1)/(1-l(+1)))^(-mu)))_((1+phi_y(+1))^(-alpha))_(1-delta+r(+1))/(1+tc(+1))); % eq 7  
> r(+1) - delta = r1; % eq 8  
> (1+tc)c + k(+1)-(1-delta)k + b(+1) = wl + rk + (1+r1)b; % eq 9  
> w = gama(y/l) ; % eq 10  
> r = teta_(y/k) ; % eq 11  
> (1+te)_p = (1-teta-gama)_(y/e); % eq 12  
> 0.15_y = tc_c + te_p_e; % eq 13
> 
> % Shock de productividad  
> log(z(+1)) = rho\*log(z)+ x; % eq 2
> 
> % Shock de precios  
> log(p(+1)) = pe + prho\*log(p)+ x; % eq 2  
> end;
> 
> initval;
> 
> c = 3;  
> l = 2;  
> k = 2;  
> y = 5;  
> b = 3;  
> w = gama\*(y/l);  
> r = teta\*(y/k);  
> tc = -(((1-mu)/mu)_(1-l)w/c)+1 ;  
> e = 1;  
> p = 1;  
> z = 1.2;  
> te = (0.15y-tc_c)/(p_e);  
> tb = p_e+b-(1+r1)\*b;
> 
> end;
> 
> steady;
> 
> check;  
> shocks;  
> var x = sigma^2;  
> end;
> 
> stoch\_simul(periods=1000);

---

<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:** [30 June 2014 14:04 UTC](https://forum.dynare.org/t/small-open-economy-steady-state/3975/4 "2014-06-30T14:04:05Z")

</div>

Apart from completely wrong timing for x and the predetermined stocks (which do not affect the steady state, but need to be fixed later), your initial values are too poor. In particular, l needs to be between 0 and 1, but you start it at 2. Please try to compute the steady state analytically.

---

<div class="post-metadata">

**Author:** ![carlosvasco](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/90db22/32.png) [@carlosvasco](https://forum.dynare.org/u/carlosvasco)\
**Post date:** [1 July 2014 18:07 UTC](https://forum.dynare.org/t/small-open-economy-steady-state/3975/5 "2014-07-01T18:07:13Z")

</div>

Ok, we fixed the initial values with the authors data. Now the problem is this:

[quote]STEADY-STATE RESULTS:

c -0.308473  
l 1.79118  
k 3.4918  
b -12.6259  
w 0.194944  
r 0.1  
tc -1.27679e-09  
e 0.18379  
p 1.04494  
z 1  
te 0.818182  
y 1.04754  
tb 1.1011

Error using print\_info (line 54)  
One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is  
smaller than 1e-06!

If you believe that the model has a unique solution you can try to reduce the value of  
qz\_zero\_threshold.[/quote]

How can we fix this and get the shocks? What do you mean with wrong timing x?  
[estadoestacionario.mod](https://forum.dynare.org/uploads/default/original/2X/1/13c986efd2046071097cafb4ac49c9d24f5e7696.mod) (1.34 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:** [2 July 2014 14:11 UTC](https://forum.dynare.org/t/small-open-economy-steady-state/3975/6 "2014-07-02T14:11:19Z")

</div>

model\_diagnostics says:

[code]MODEL\_DIAGNOSTICS: The Jacobian of the static model is singular  
MODEL\_DIAGNOSTICS: there is 1 colinear relationships between the variables and the equations  
Colinear variables:  
c  
l  
k  
b  
e  
y  
tb  
Colinear equations  
3 5 9 10 11 12 13

MODEL\_DIAGNOSTICS: The presence of a singularity problem typically indicates that there is one  
MODEL\_DIAGNOSTICS: redundant equation entered in the model block, while another non-redundant equation  
MODEL\_DIAGNOSTICS: is missing. The problem often derives from Walras Law.[/code]

There must still be a mistake in your model equations. Your steady state for l is not between 0 and 1.

Bond and capital are predetermined. Given the way you entered these variables with beginning of period stock notation, you need

`predetermined_variables k b;
`  
Moreover, the exogenous processes should be backward-looking, i.e.

`log(z) = rho*log(z(-1))+ x; % eq 2
`  
instead of

```auto

```
