testsuite: expand Ramsey tests to check for consistency of utility and welfare
Also increase variance to make tests more challengingpac-components
parent
42165b9893
commit
45772571c3
|
@ -9,7 +9,7 @@ gamma = 1;
|
|||
delta = 0.012;
|
||||
alpha = 0.4;
|
||||
rho = 0.95;
|
||||
s = 0.007;
|
||||
s = 0.07; % increased by a factor of 10 from 0.007 to increase risk correction
|
||||
|
||||
model;
|
||||
c^(-gamma)=beta*c(+1)^(-gamma)*(alpha*exp(z(+1))*k^(alpha-1)+1-delta);
|
||||
|
|
|
@ -54,6 +54,15 @@ if abs(cond_W_hand_L_SS - planner_objective_value.conditional.steady_initial_mul
|
|||
error('Inaccurate conditional welfare with Lagrange multiplier set to its steady-state value');
|
||||
end;
|
||||
|
||||
if abs(oo_.mean(strmatch('U',M_.endo_names,'exact'))-oo1.oo_.mean(strmatch('U',M1.M_.endo_names,'exact')))>1e-6
|
||||
error('Utility inconsistent');
|
||||
end
|
||||
|
||||
if abs(planner_objective_value.unconditional-oo_.mean(strmatch('U',M_.endo_names,'exact'))/(1-beta)) > 1e-6;
|
||||
error('Unconditional welfare assessment does not match utility');
|
||||
end;
|
||||
|
||||
|
||||
initial_condition_states = zeros(M1.M_.endo_nbr,M1.M_.maximum_lag);
|
||||
initial_condition_states(1:M1.M_.orig_endo_nbr,:) = repmat(oo1.oo_.dr.ys(1:M1.M_.orig_endo_nbr),1,M1.M_.maximum_lag);
|
||||
shock_matrix = zeros(1,M1.M_.exo_nbr);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
var k z c;
|
||||
var k z c U;
|
||||
|
||||
varexo e;
|
||||
|
||||
|
@ -9,15 +9,17 @@ gamma = 1;
|
|||
delta = 0.012;
|
||||
alpha = 0.4;
|
||||
rho = 0.95;
|
||||
s = 0.007;
|
||||
s = 0.07; % increased by a factor of 10 from 0.007 to increase risk correction
|
||||
|
||||
model;
|
||||
k=exp(z)*k(-1)^(alpha)-c+(1-delta)*k(-1);
|
||||
z=rho*z(-1)+s*e;
|
||||
U=ln(c);
|
||||
end;
|
||||
|
||||
steady_state_model;
|
||||
z = 0;
|
||||
U=ln(c);
|
||||
end;
|
||||
|
||||
planner_objective ln(c);
|
||||
|
|
Loading…
Reference in New Issue