Hi,

I need some help about the model from McCandless ABCs of RBCs open economy model with money. Somebody tried it before who can help me? My mod file is here:

var Y H A K e P C r r_f M B X P_f w g;

varexo epsilon1 epsilon2 epsilon3;

parameters theta delta beta kapa r_poc rho1 rho2 rho3 sigma a;

theta=0.36;

delta=0.15;

beta=0.99;

kapa=4;

r_poc=0.03;

rho1=0.9;

rho2=0.9;

rho3=0.8;

sigma = 0.01;

a=0.01;

model;

%C+K-(1-delta)*K(-1)+X=Y;
Y=A*(K(-1)^theta)

*H^(1-theta);*

e/(P(+1)(1+r_f))/(P(+2)

e/(P(+1)

*C(+1))=beta*((e(+1)*C(+2)));*

(P/(P(+1)(K-K(-1)))=beta*((P(+1))/(P(+2)

(P/(P(+1)

*C(+1)))*(1+kapa*C(+2)))*(r(+1)+(1-delta)+kapa*(K(+1)-K));

B/w+beta*(P/(P(+1)

*C(+1)))=0;*

PC=M;

P

M/P+((e

*B)/P)+K+(kapa/2)*(K-K(-1))^2=w

*H+r*K(-1)+(1-delta)

*K(-1)+((e*(1+r_f(-1))

*B(-1))/P);*

w=(1-theta)(H^(-theta));

w=(1-theta)

*A*((K(-1))^theta)r=theta

*A*((K(-1))^(theta-1))

*(H^(1-theta));*

B=(1+r_f(-1))

r_f=r_poc-a(B/P_f);

B=(1+r_f(-1))

*B(-1)+P_f*X;r_f=r_poc-a

e=P/P_f;

M=g

*M(-1);*

A=rho1A(-1)+epsilon1;

A=rho1

P_f=1-rho2+rho2*(P_f(-1))+epsilon2;

g=rho3*(g(-1))+epsilon3;

end;

resid(i);

steady;

check;

shocks;

var epsilon1; stderr 0.01;

var epsilon2; stderr 0.01;

var epsilon3; stderr 0.01;

end;

stoch_simul;

And I tried to get some results, with different initial values, but every time I got the folowing message:

Starting Dynare (version 4.1.2).

Starting preprocessing of the model file …

Substitution of endo leads >= 2: added 2 auxiliary variables and equations.

Found 17 equation(s).

Evaluating expressions…done

Computing static model derivatives:

- order 1

Computing dynamic model derivatives: - order 1
- order 2

Processing outputs …done

Preprocessing completed.

Starting MATLAB/Octave computing.

Warning: Divide by zero. This

warning will be removed in a future

release.

Consider using DBSTOP IF

NANINF when debugging.

In open_nista_static at 21

In resid at 62

In open_nista at 150

In dynare at 132

Warning: Divide by zero. This

warning will be removed in a future

release.

Consider using DBSTOP IF

NANINF when debugging.

In open_nista_static at 24

In resid at 62

In open_nista at 150

In dynare at 132

Warning: Divide by zero. This

warning will be removed in a future

release.

…

STEADY: numerical initial values incompatible with the following equations

Columns 1 through 5

```
2 3 4 6 7
```

Columns 6 through 10

```
8 10 11 16 17
```

??? Error using ==> dynare_solve at

82

exiting …

Error in ==> steady_ at 124

[oo_.steady_state,check] =

dynare_solve([M_.fname

‘_static’],…

Error in ==> steady at 52

steady_;

Error in ==> open_nista at 151

steady;

Error in ==> dynare at 132

evalin(‘base’,fname) ;

So i think that that there is something wrong with my model but I don’t know what because I wrote down the equation from the book. Maybe the initial values or somethink else?

Maybe somebody could help me?

Than you.