# Correia, Neves, Rebelo example?

Hi,

Just wondering if anyone has an example of dynare code for the model in Correia, Neves, and Rebelo’s “Business cycles in a small open economy”? I get several, several error messages when I try to run what I have entered and I have no idea what any of them mean. Thanks!

Maybe you should just post what you have and indicate the errors, then we will be able to help you.

Best

Michel

To be honest, I have zero experience with Dynare (and just about as much with Macro), so it might be too much trouble explaining to me what is wrong, but any advice would be appreciated. I am getting convergence and initial value errors, but I am not sure which values or equations are causing the problem since this is all new to me.

Here is what I have so far…

var c,i,y,tb,w,z,q,k,rdom,b,n;

parameters nu,bbar,psi,alpha,delta,beta,phi,phi_prime,phi_double,r;
alpha=0.53;
beta=0.9718;
delta=0.05;
phi_prime=1;
phi_double=5/3;
r=.11;
nu=1.7;
psi=.000742;
bbar=.7442;
phi=.05;

model;
rdom=r+psi*(exp(b-bbar)-1);
tb=b/(1+rdom)-b(-1);
c=y-i-tb;
k=(1-delta)k(-1)+phik(-1);
1=cbeta(1+rdom)/c(+1);
nuc=(1-n)w;
w=(1-alpha)y/n;
z=alpha
y/k(-1);
1=q
phi_prime;
q=(1/(1+rdom))
(z(+1)+q(+1)(1-delta+phi(+1)-phi_primei(+1)/k));
phi=i/k(-1)+(1/2)phi_double(i/k(-1)-delta)^2;
end;

initval;
c=.84;
i=2.49;
y=1;
tb=8.49;
q=1;
k=.33;
n=.28;
end;

stoch_simul;

Any guidance is greatly appreciated!! Thanks a lot!!!

Hi Nico,

1. which version of the paper are you using? I don’t recognize the parametrization from the European Economic Review paper of 1995.
2. the 4th equation is wrong, it is missing i/k(-1) in the adjustment cost term
3. there is no exogenous shock and productivity isn’t appearing in the model. The production function is missing, therefore one the equations currently present in the model must be redundant.

Best

Michel

Thanks! I will take a look at the equations when I get a chance.

Regarding the parameter values- alpha, beta, delta, r, and nu are from the paper in the European Economic Review, page 1108. Phi_double was calculated from the elasticity of phi_prime on page 1108. I added in the equation for rdom using “closing small open economy models” by Schmitt-Grohe and Uribe, and that is where I took the values of psi and bbar from.

Thanks for the help!