Dear all,
I am a beginner of dynare and I currently working with the Bernanke & Gertler “Monetary Policy & Asset Price Volatility” paper (1999) and after I conduct my code and I try to run it and it shows, Error using dynare (line 174) DYNARE: preprocessing failed. And doubt checks the location of my file and it is correct.
And I have no idea what mistake that I just made, did I type the equation wrongly? Does anyone know how to solve it?
This is my model.
\Bernanke & Gertler “Monetary Policy & Asset Price Volatility” paper (1999)
var y c ce i g s q mc k r rs rq rk z l pi n rn;
varexo e_rn e_g e_z;
parameters C_Y Ce_Y I_Y G_Y N_K K_N Y_N beta alpha delta rho_z rho_g psi sigma kappa a b thetf thetb tau vthet phi xi rn_t R Rk Rq pi_rl pi_rh;
C_Y = 0.61; // C/Y, BGG
Ce_Y = 0.04; // Ce/Y, p.47
I_Y = 0.18; // I/Y, BGG
G_Y = 0.2; // G/Y, p.47
K_N = 2; // K/N BGG
Y_N = 0.28; // BGG
N_K = 0.5; // N/K p. 47
beta = 0.99; // Time Preference, p.47
alpha = 0.33; // capital share of production, p.47
delta = 0.025; // p.47
rho_z = 1; // BGG, technology obey 4.27
rho_g = 0.95; // BGG
psi = 0.05; // p.47
sigma = 1; // p.47
kappa = 0.086; // p.47
a = 0.98; // Growth rate of exogenous bubble, p.47
b = a*(1-delta); // p.47
theta_f = 0.5; // Inflation Expectation, p.47
theta_b = 0.5; // Inflation Expectation, p.47
tau = 0.95; // The probability of the firm survives in next period, p. 47
vtheta = (1-delta)/((alpha*Y_N/K_N)+1-delta); // p.46
phi = 0.25; // p.47
xi = 1.33; // parameter of utility function (log utility), p.47
rn_t = 1.02; // Target nominal interest
R = 1/beta; // Steady State Level of r
Rk = R+0.02; // Steady State Level of r^k (ASSUMPTION)
Rq = R+0.01; // Steady State Level of r^q (ASSUMPTION)
pi_rl = 1.01; // Inflation Response: Accommodative, p. 30
pi_rh = 2.0; // Inflation Response: Aggressive, p. 30
model;
// Aggregate Demand
y = C_Yc + Ce_Yce + I_Yi + G_Yg; // A1 Aggregate Demand
c = -sigmar + c(+1); // A2 Euler Condition for Household Consumption
ce = s + k(+1); // A3 Assumption: Entrepreneurial Cons is prop. to stock value
q(+1) = phi(i(+1)-k(+1)); // A4 Investment is prop. to fundamental value of capital
// Returns to Stock and Capital
s(+1) - q(+1) = (s - q) * a * Rq; // A5 The expected evolution of the bubble
rq = (1-vtheta)(mc+y-k)+vthetaq-q(-1); // A6 Fundamental Return to Capital
rs = (1-vtheta)(mc+y-k)+vthetas-s(-1); // A7 Return to Stocks
rs(+1) = rq(+1) - (1-b)(s-q); // A8 Relation between stock return and fundamental return
rs(+1) = r - psi(n-s-k(+1)); // A9 Link between spread and firm leverage
// Aggregate Supply
y = z + alphak + (1-alpha)l; // A10 Cobb Douglas Production Function
y - l + mc - c= (xi-1)l; // A11 Household Labor-Leisure Decision
pi = kappamc + theta_fpi(+1) + theta_bpi(-1); // A12 Evolution of inflation (sticky prices) The Gali n Gertler NK phillip curve
// Evolution of state variables and shock process
k(+1) = deltai + (1-delta)k; // A13 Capital
n = Rq * ( (K_N) * (rs - rs) + (1-tauRk)/(tau)y + n(-1)) ); // A14 Internal Equity
g = rho_gg(-1) + e_g; // A15 Government Spending AR(1) process
z = rho_zz(-1) + e_z; // A16 Total Factor Productivity AR(1) process (the technology obey BGG 4.27)
// Monetary Policy Rule
r = rn - pi_rl * pi(+1); // A17 Policy Rule Accommodative
r = rn - pi(+1); // A18 Fisher Equation
end;
check;
steady;
shocks;
var e_g; stderr 0.1;
var e_z; stderr 0.1;
var e_rn; stderr 1.0;
end;
stoch_simul(irf=24);
I would really appreciate it for your help.
Many Thanks
Kax