Problems with exogenous variables with a lead
In dynamic_set_auxiliary_series.m
, exogenous variables with lead are set at the wrong period.
If A
is an exogenous variable and appears as A(+1)
in the model, dynamic_set_auxiliary_series.m
contains the following line:
ds.AUX_EXO_LEAD_18=ds.A;
when it should be
ds.AUX_EXO_LEAD_18=lag(ds.A, -1);
However, this solution raises another issue as lag(ds.A, -1)
is unknown at the time of evaluation of dynamic_set_auxiliary_series
in driver.m
.
M_.histval_endo
should be initialized with M_.orig_maximum_lag_with_diffs_expanded + M_.orig_maximum_lead
, initialized with the steady state of endogenous, exogenous and exogenous_det variables, and the shocks.
This can be investigated with neoclassical1.mod
The timing used in row 33 of +neoclassical1/dynamic_resid.m
looks suspicious as well, I believe that one should use the row it_+1
rather than it_