From 7aeb881e3ac44efcb051db16d418b47096a7ae2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Sun, 4 Dec 2011 23:57:46 +0100 Subject: [PATCH] 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. --- matlab/resid.m | 9 +++++++++ matlab/steady.m | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/matlab/resid.m b/matlab/resid.m index 2e7c47824..91273bb83 100644 --- a/matlab/resid.m +++ b/matlab/resid.m @@ -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 diff --git a/matlab/steady.m b/matlab/steady.m index 93051a749..c9a2272b8 100644 --- a/matlab/steady.m +++ b/matlab/steady.m @@ -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