Temporarily set the variance of the shocks to zero when computing or checking the deterministic steady

state. This is necessary if the model contains mean preverving spread terms.
time-shift
Stéphane Adjemian (Charybdis) 2011-12-04 23:57:46 +01:00
parent a0e1d3b34f
commit 7aeb881e3a
2 changed files with 20 additions and 0 deletions

View File

@ -56,6 +56,13 @@ if info(1)
print_info(info,options_.noprint)
end
% Keep of a copy of M_.Sigma_e
Sigma_e = M_.Sigma_e;
% Set M_.Sigma_e=0 (we evaluate the *deterministic* static model)
M_.Sigma_e = zeros(size(Sigma_e));
% Compute the residuals
if options_.block && ~options_.bytecode
z = zeros(M_.endo_nbr,1);
@ -82,6 +89,8 @@ else
oo_.exo_det_steady_state], M_.params);
end
M_.Sigma_e = Sigma_e;
% Display the non-zero residuals if no return value
if nargout == 0

View File

@ -36,6 +36,14 @@ if options_.steadystate_flag && options_.homotopy_mode
error('STEADY: Can''t use homotopy when providing a steady state external file');
end
% Keep of a copy of M_.Sigma_e
Sigma_e = M_.Sigma_e;
% Set M_.Sigma_e=0 (we compute the *deterministic* steady state)
M_.Sigma_e = zeros(size(Sigma_e));
switch options_.homotopy_mode
case 1
homotopy1(options_.homotopy_values, options_.homotopy_steps);
@ -53,6 +61,9 @@ end
disp_steady_state(M_,oo_);
M_.Sigma_e = Sigma_e;
if isempty(ys0_)
oo_.endo_simul(:,1:M_.maximum_lag) = oo_.steady_state * ones(1, M_.maximum_lag);
%%% Unless I'm wrong, this is (should be?) done in make_y_.m