Merge branch 'occbin_mean' of git.dynare.org:JohannesPfeifer/dynare
Ref. !1882var-model-with-constant
commit
1045c442a9
|
@ -167,7 +167,7 @@ for shock_period = 1:n_shocks_periods
|
||||||
regime_start(end)-1,binding_indicator,...
|
regime_start(end)-1,binding_indicator,...
|
||||||
data.exo_pos,data.shocks_sequence(shock_period,:),endo_init,update_flag);
|
data.exo_pos,data.shocks_sequence(shock_period,:),endo_init,update_flag);
|
||||||
|
|
||||||
[binding, relax, err]=feval([M_.fname,'.occbin_difference'],zdatalinear_,M_.params,dr_base.ys);
|
[binding, relax, err]=feval([M_.fname,'.occbin_difference'],zdatalinear_+repmat(dr_base.ys',size(zdatalinear_,1),1),M_.params,dr_base.ys);
|
||||||
|
|
||||||
% check if changes to the hypothesis of the duration for each
|
% check if changes to the hypothesis of the duration for each
|
||||||
% regime
|
% regime
|
||||||
|
|
|
@ -145,7 +145,7 @@ for shock_period = 1:n_shocks_periods
|
||||||
while (regime_change_this_iteration && iter<max_iter && ~is_periodic)
|
while (regime_change_this_iteration && iter<max_iter && ~is_periodic)
|
||||||
iter = iter +1;
|
iter = iter +1;
|
||||||
if any(binding_indicator(end,:)) && nperiods_0<opts_simul_.max_periods
|
if any(binding_indicator(end,:)) && nperiods_0<opts_simul_.max_periods
|
||||||
binding_indicator = [binding_indicator; false(2,1)];
|
binding_indicator = [binding_indicator; false(1,2)];
|
||||||
nperiods_0 = nperiods_0 + 1;
|
nperiods_0 = nperiods_0 + 1;
|
||||||
disp_verbose(['nperiods has been endogenously increased up to ' int2str(nperiods_0) '.'],opts_simul_.debug)
|
disp_verbose(['nperiods has been endogenously increased up to ' int2str(nperiods_0) '.'],opts_simul_.debug)
|
||||||
end
|
end
|
||||||
|
@ -183,7 +183,7 @@ for shock_period = 1:n_shocks_periods
|
||||||
binding_indicator,...
|
binding_indicator,...
|
||||||
data.exo_pos,data.shocks_sequence(shock_period,:),endo_init, update_flag);
|
data.exo_pos,data.shocks_sequence(shock_period,:),endo_init, update_flag);
|
||||||
|
|
||||||
[binding, relax, err]=feval([M_.fname,'.occbin_difference'],zdatalinear_,M_.params,dr.ys);
|
[binding, relax, err]=feval([M_.fname,'.occbin_difference'],zdatalinear_+repmat(dr.ys',size(zdatalinear_,1),1),M_.params,dr.ys);
|
||||||
binding_constraint_new=[binding.constraint_1;binding.constraint_2];
|
binding_constraint_new=[binding.constraint_1;binding.constraint_2];
|
||||||
relaxed_constraint_new = [relax.constraint_1;relax.constraint_2];
|
relaxed_constraint_new = [relax.constraint_1;relax.constraint_2];
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,7 @@ model;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
occbin_constraints;
|
occbin_constraints;
|
||||||
name 'zlb'; bind inom+inombar <= inomlb; relax inom+inombar > inomlb;
|
name 'zlb'; bind inom <= inomlb; relax inom > inomlb;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// ---------------- Steady state -----------------------------------------//
|
// ---------------- Steady state -----------------------------------------//
|
||||||
|
|
|
@ -209,7 +209,7 @@ model;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
occbin_constraints;
|
occbin_constraints;
|
||||||
name 'zlb'; bind inom+inombar <= inomlb; relax inom+inombar > inomlb;
|
name 'zlb'; bind inom <= inomlb; relax inom > inomlb;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// ---------------- Steady state -----------------------------------------//
|
// ---------------- Steady state -----------------------------------------//
|
||||||
|
|
|
@ -28,7 +28,7 @@ y_hat = log(y) - log(steady_state(y));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
occbin_constraints;
|
occbin_constraints;
|
||||||
name 'borrcon'; bind lb<-STEADY_STATE(lb); relax b>M*y; error_bind abs(lb+STEADY_STATE(lb)); error_relax abs(b-M*y);
|
name 'borrcon'; bind lb<0; relax b>M*y; error_bind abs(lb); error_relax abs(b-M*y);
|
||||||
%name 'borrcon'; bind lb<-STEADY_STATE(lb); relax b>M*y;
|
%name 'borrcon'; bind lb<-STEADY_STATE(lb); relax b>M*y;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ y_hat = log(y) - log(steady_state(y));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
occbin_constraints;
|
occbin_constraints;
|
||||||
name 'borrcon'; bind lb<-STEADY_STATE(lb); relax b>M*y; error_bind abs(lb+STEADY_STATE(lb)); error_relax abs(b-M*y);
|
name 'borrcon'; bind lb<0; relax b>M*y; error_bind abs(lb); error_relax abs(b-M*y);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
steady_state_model;
|
steady_state_model;
|
||||||
|
|
|
@ -53,8 +53,8 @@ a = RHOA*a(-1)+erra;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
occbin_constraints;
|
occbin_constraints;
|
||||||
name 'IRR'; bind i<PHI-1; relax lambdak<0;
|
name 'IRR'; bind i-steady_state(i)<log(PHI); relax lambdak<0;
|
||||||
name 'INEG'; bind i<-0.000001;
|
name 'INEG'; bind i-steady_state(i)<-0.000001;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@#include "dynrbc_common.inc"
|
@#include "dynrbc_common.inc"
|
||||||
|
|
|
@ -53,8 +53,8 @@ a = RHOA*a(-1)+erra;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
occbin_constraints;
|
occbin_constraints;
|
||||||
name 'IRR'; bind i<PHI-1; relax lambdak<0; error_bind abs(i-(PHI-1)); error_relax abs(lambdak-0);
|
name 'IRR'; bind i-steady_state(i)<log(PHI); relax lambdak<0; error_bind abs(i-steady_state(i)-log(PHI)); error_relax abs(lambdak-0);
|
||||||
name 'INEG'; bind i<-0.000001; relax i>-0.000001; error_bind abs(i-0.000001); error_relax abs(i-0.000001);
|
name 'INEG'; bind i-steady_state(i)<-0.000001; relax i-steady_state(i)>-0.000001; error_bind abs(i-steady_state(i)-0.000001); error_relax abs(i-steady_state(i)-0.000001);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@#include "dynrbc_common.inc"
|
@#include "dynrbc_common.inc"
|
||||||
|
|
Loading…
Reference in New Issue