Hi
I am not yet conversant with Dynare and I am running into issues trying to estimate the neoclassical DSGE model from del negro (2010). I am almost certain my steady-state model is incorrect
CanadaADTData.xlsx (23.3 KB)
but I am unsure how to improve it. I have included my dataset, where I log differenced output and hours worked. The error I am getting is as follows: Residuals of the static equations:
Equation number 1 : 0 : 1
Equation number 2 : 0 : 2
Equation number 3 : 0 : w
Equation number 4 : 0.037071 : r
Equation number 5 : -1.3297 : y
Equation number 6 : 0 : 6
Equation number 7 : 0 : k
Equation number 8 : 0 : 8
Equation number 9 : 0 : a
Equation number 10 : 0 : 10
Equation number 11 : 0 : gy_obs
Equation number 12 : 0 : gh_obs
Error using print_info
The steadystate file did not compute the steady state while simulation has been running.
CanadaADTData.xlsx (23.3 KB)
My .mod is as follows:
var y c k i h w r a A_tilda B gy_obs gh_obs;
/*
y - output
c - consumption
k - capital
i - investment
h - labor
w - wage
gy_obs- observed output
gh_obs- observed hours worked
r - rental rate of capital
a - technology shock
A_tilda - trend component of technology
B - exogenous preference shifter
*/
varexo e_a e_b; // the exogenous variables
// Parameters that need to be calibrated
parameters beta upsilon delta alpha B_star gamma Rho_a Rho_b sigma_a sigma_b;
%----------------------------------------------------------------
% 2. Calibration
%----------------------------------------------------------------
beta = 0.99; % Discount rate
upsilon = 2; % Aggregate labor supply elasticity
delta = 0.025; % Depreciation rate of capital
alpha = 0.66; % Output elasticity of capital
B_star = 1; % Exogenous preference shifter level
gamma = 1.03; % Trend growth rate
Rho_a = 0.01; % AR(1) technology shock parameter
Rho_b = 0.8; % AR(1) preference shock parameter
sigma_a = 0.01;
sigma_b = 0.01;
%----------------------------------------------------------------
% 3. Model
%----------------------------------------------------------------
model;
1/c = beta*((1/c(+1))*exp(-a(+1))*(r(+1) + (1 - delta)));
(1/c)*w = (1/B)*(h/B)^(1/upsilon);
w = (1-alpha)*y/h;
r = (1-alpha)*(y/k)*exp(a);
y = (h^alpha)*(k*exp(-a))^(1 - alpha);
y = c + i;
k = (1 - delta)*k(-1)*exp(-a) + i;
// Log-linearized technology shock process
log(A_tilda) = Rho_a*log(A_tilda(-1)) + e_a;
a = log(gamma) + (Rho_a - 1)*log(A_tilda(-1)) + e_a;
// Exogenous preference shifter process
log(B) = (1 - Rho_b)*log(B_star) + Rho_b*log(B(-1)) + e_b;
// measurement equation for gy_obs
gy_obs= y-y(-1);
// measurement equation for gh_obs
gh_obs= h-h(-1);
end;
varobs gy_obs gh_obs; // output and hours worked
steady_state_model;
// Technology Adjustment (a = log(gamma) in steady state)
a = log(gamma);
// Exogenous preference shifter process (B = 1 in steady state)
B = 1;
A_tilda=1;
// Define steady-state values for h, k, and y
h = 1; //
k=1;
// Production Function (using k)
y = h^alpha * k^(1 - alpha)* (1/gamma)^(1-alpha);
// Wage Equation
w = (1 - alpha) * y / h;
// Labour Supply and Demand Equation (c in terms of w and h)
c = w / h^(1 / upsilon);
// Interest Rate Equation (r in terms of beta, gamma, and delta)
//r = (1-alpha)*(y/k)*gamma;
// Euler Equation (R in terms of gamma, beta, and delta)
r = (gamma/beta)-(1-delta);
// Capital Accumulation Equation (i = y - c)
i = y - c;
// Now, calculate k from the investment equation:
//k = i / (1 - (1 - delta) * (1 / gamma));
// Resource Constraint (y = c + i is already ensured by the equation above)
// Define the steady-state values for variables
k = i / (1 - (1 - delta) * (1 / gamma));
// Measurement Equation for Output Growth (gy_obs)
gy_obs = 0;
// Measurement Equation for Labour Growth (gh_obs)
gh_obs = 0;
end;