I am working on a replication of the BGG (1999) financial accelerator model but with the non-linear equations. Later on, I would like to include more detailed parts of the economy. However, my first simulation of the very simple version does not work because Schur decomposition fails after computing steady state values. Any help in solving this issue is highly appreciated and I look forward! Please find my Dynare code below:
// Simple DSGE model based on Bernanke et al.
// Define variables and parameters
var C H M P D B R Rn W; // Endogenous variables
varexo e_R; // Exogenous shock
parameters beta xi zeta; // Model parameters
// Calibration of parameters
beta = 0.99; // Discount factor
xi = 1.5; // Labor disutility parameter
zeta = 0.05; // Money demand parameter
// Model equations
model;
// Euler equation (B.3)
1/C = beta*(1/C(+1))*R(+1);
// Labor supply (B.4)
W*1/C = xi*1/(1-H);
// Money demand (B.5)
M/P = zeta*C*((Rn(+1)-1)/Rn(+1))^(-1);
// Relationship between nominal and real interest rate
R = Rn/P(+1)*P;
// Market clearing for deposits (B.7)
D = B;
// Resource constraint (assuming a simple production function Y = H)
C = H;
// Monetary policy rule (Taylor rule)
log(R) = 0.8*log(R(-1)) + 0.2*log(1/beta) + e_R;
// Nominal interest rate in steady state
Rn = R*P(+1)/P;
// Simple inflation process - setting to constant in steady state
P = P(-1)*(1 + 0.01*(M/M(-1) - 1));
end;
// Define the steady state values analytically
steady_state_model;
// In steady state, R = 1/beta from the Euler equation
R = 1/beta;
// Assume steady state inflation is zero, so P is constant
P = 1;
// From the relationship between real and nominal interest rates
Rn = R;
// From the resource constraint
H = 0.33; // Calibrated value for labor
C = H;
// From the labor supply equation
W = xi*C/(1-H);
// In steady state, deposits equal loans
B = 0.3; // Calibrated value
D = B;
// From the money demand equation, rearranged
M = P*zeta*C*((Rn-1)/Rn)^(-1);
end;
// Check the steady state calculations
resid;
steady;
check;
// Define shock
shocks;
var e_R; stderr 0.01;
end;
// Simulate the model
stoch_simul(order=1, irf=40) C H M P R Rn;
Thank you for the feedback. I slightly adjusted my model but now it fails to find a steady state. Do have any guidance on that?
// Simple DSGE model based on Bernanke et al.
// Define variables and parameters
var C H M P D B R Rn W Pi;
varexo e_R e_M;
parameters beta xi zeta phi_pi phi_y rho_R R_ss Pi_ss delta_m;
// Calibration of parameters
beta = 0.99; // Discount factor
xi = 1.5; // Labor disutility parameter
zeta = 0.05; // Money demand parameter
phi_pi = 1.5; // Taylor rule coefficient on inflation
phi_y = 0.5; // Taylor rule coefficient on output
rho_R = 0.8; // Interest rate smoothing
R_ss = 1/beta; // Steady state real interest rate
Pi_ss = 1; // Steady state inflation (=1 means zero inflation)
delta_m = 0.01; // Money growth sensitivity parameter
// Model equations
model;
// Euler equation
1/C = beta*(1/C(+1))*R(+1);
// Labor supply
W*1/C = xi*1/(1-H);
// Money demand
M/P = zeta*C*((Rn-1)/Rn)^(-1);
// Relationship between nominal and real interest rate
R = Rn/Pi(+1);
// Market clearing for deposits
D = B;
// Resource constraint (assuming a simple production function Y = H)
C = H;
// Define inflation
Pi = P/P(-1);
// Monetary policy rule (Taylor rule) - nonlinear form
Rn = R_ss*Pi_ss*(Pi/Pi_ss)^phi_pi*(C/steady_state(C))^phi_y*(Rn(-1)/R_ss)^rho_R*exp(e_R);
// Price level evolution based on money growth (restored from original)
P = P(-1)*(1 + delta_m*(M/M(-1) - 1) + e_M);
// Bond evolution equation (government budget constraint simplified)
B = B(-1)*Rn(-1)/Pi - (M - M(-1))/P;
end;
// Define the steady state values analytically
initval;
Pi = 1;
P = 1;
R = 1/beta;
Rn = R;
H = 0.33;
C = H;
W = xi*C/(1-H);
M = 0.5;
B = 0.3;
D = B;
e_R = 0;
e_M = 0;
end;
// Check the steady state calculations
steady;
check;
// Define shocks
shocks;
var e_R; stderr 0.01;
var e_M; stderr 0.005;
end;
// Simulate the model
stoch_simul(order=1, irf=40) C H M P R Rn Pi;