Skip to content
Snippets Groups Projects
Verified Commit 911814be authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Various improvements for 2022 Summer school

– add slide and example about perfect_foresight_with_expectation_errors_{setup,solver} syntax
– expand slides on EP and SEP (borrowing some stuff from Stéphane’s slides)
– switch to 16:9 ratio
parent 23382e7b
No related branches found
No related tags found
No related merge requests found
// Same as rbc_unexpected.mod, but requires Dynare 6 (not yet released, currently unstable)
var k, y, L, c, A, a;
varexo epsilon;
parameters beta, theta, tau, alpha, psi, delta, rho, Astar;
beta = 0.99;
theta = 0.357;
tau = 2;
alpha = 0.45;
psi = -0.1;
delta = 0.02;
rho = 0.8;
Astar = 1;
model;
a = rho*a(-1) + epsilon;
A = Astar*exp(a);
y = A*(alpha*k(-1)^psi+(1-alpha)*L^psi)^(1/psi);
k = y-c + (1-delta)*k(-1);
(1-theta)/theta*c/(1-L) - (1-alpha)*(y/L)^(1-psi);
(c^theta*(1-L)^(1-theta))^(1-tau)/c = beta*(c(+1)^theta*(1-L(+1))^(1-theta))^(1-tau)/c(+1)*(alpha*(y(+1)/k)^(1-psi)+1-delta);
end;
steady_state_model;
a = epsilon/(1-rho);
A = Astar*exp(a);
Output_per_unit_of_Capital=((1/beta-1+delta)/alpha)^(1/(1-psi));
Consumption_per_unit_of_Capital=Output_per_unit_of_Capital-delta;
Labour_per_unit_of_Capital=(((Output_per_unit_of_Capital/A)^psi-alpha)/(1-alpha))^(1/psi);
Output_per_unit_of_Labour=Output_per_unit_of_Capital/Labour_per_unit_of_Capital;
Consumption_per_unit_of_Labour=Consumption_per_unit_of_Capital/Labour_per_unit_of_Capital;
% Compute steady state of the endogenous variables.
L=1/(1+Consumption_per_unit_of_Labour/((1-alpha)*theta/(1-theta)*Output_per_unit_of_Labour^(1-psi)));
c=Consumption_per_unit_of_Labour*L;
k=L/Labour_per_unit_of_Capital;
y=Output_per_unit_of_Capital*k;
end;
steady;
// Declare pre-announced shocks
shocks(learnt_in=1);
var epsilon;
periods 5, 15;
values -0.1, -0.1;
end;
// Declare shocks learnt in period 10
shocks(learnt_in=10);
var epsilon;
periods 10;
values 0.1;
end;
perfect_foresight_with_expectation_errors_setup(periods=300);
perfect_foresight_with_expectation_errors_solver;
rplot epsilon;
rplot c;
No preview for this file type
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment