Can OccBin work with news shock

I met an error when using Occbin to do with news shocks.

using Iacoviello JME 2017’s codes as an example.
I simply change their codes about shocks from

log(az) = RHO_Z*log(az(-1)) + eps_z;

to

log(az) = RHO_Z*log(az(-1)) + eps_z(-1) ;

Dynare reports an error

Total computing time : 0h00m00s
Error using solve_two_constraints (line 78)
baby00 and baby10 need to have exactly the same endogenous variables and they need to be declared in the same
order

Error in runsim_plot_figure3 (line 79)
    [zdatal zdatap zdatass oobase_ Mbase_] = solve_two_constraints(...

Line 78 in solve_two_constraints is just:

if ~strcmp(M00_.endo_names,M10_.endo_names)
    error([modnam_00_,' and ',modnam_10_,' need to have exactly the same endogenous variables and they need to be declared in the same order'])
end

But these two files do have the same endogenous variables in the same order FOR SURE.

Why would this happen? (Even if adding another shock eps_z_news, and puting it into all these 4 codes like
log(az) = RHO_Z*log(az(-1)) + eps_z+ eps_z_news(-1) ;
Dynare still reports the same error!

Thank you for every possible help!
replication_figure3_4.rar (1014.0 KB)

I think Occbin should be able to deal with news shocks.
But I tested in the mod files, it does show up errors.

can anyone help with this? Please!!! Many Thanks!
@jpfeifer

I will have a look soon.

Many thanks in advance!

Dear Johannes, have you looked at it? Thanks very much and wish you a good day! @jpfeifer

This is a problem with Occbin in combination with older Dynare versions. Can you upgrade? See GitHub - JohannesPfeifer/Occbin_update

Dear Johannes,

Wish you a good weekend!
replication_figure3_4.rar (988.9 KB)

I use dynare 4.5.1, and I download the corresponding toolbox GitHub - JohannesPfeifer/Occbin_update at 4.5

However, the same error shows up.
For the convenience of your reference, I upload the files that set path to toolbox 4.5.

BTW, I use MATLAB 2015b, will it be related to the MATLAB Version I use?

Thank you for any of your further assistance!

after dynare compute the related mod file and move to solve by Occbin, it shows up:

Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.

Using 64-bit preprocessor
Starting Dynare (version 4.5.7).
Starting preprocessing of the model file ...
Found 59 equation(s).
Evaluating expressions...done
Computing static model derivatives:
 - order 1
Computing dynamic model derivatives:
 - order 1
 - order 2
Processing outputs ...
done
Preprocessing completed.

Total computing time : 0h00m00s
Error using solve_one_constraint (line 61)
The two .mod files need to have exactly the same endogenous variables declared in the same order

Error in run_news (line 19)
[zdatalinear zdatapiecewise zdatass oobase_ Mbase_ ] = ...

Thank you for any of your further advice on how to fix it!

Dear Johannes,
I have tested it from Dynare Version 4.5.0 to 4.5.7 (download here Index of /release/windows-zip) with the corresponding toolkit files version (GitHub - JohannesPfeifer/Occbin_update at 4.5), but NONE of the dynare version works. From dynare 4.5.0 to 4.5.7, none of it works with the corresponding toolkit file version under news shock.

The issue is the following: Dynare replaces leads and lags on exogenous variables using auxiliary variables within stochastic models. But none of the mod-file other than the base one baby00-contain any statements telling Dynare that the model is supposed to be solved stochastically. That creates the mentioned discrepancy. A workaround is to add to the baby01 to baby11 the line

stoch_simul(order=1,noprint);

P.S.: Dynare 4.7 will contain Occbin without such issues.

Thanks so much! The issue is solved!

Professor, in JME 2015, “a toolkit on …” paper, it states that

just like any linear solution, it discards all information regarding the realization of future shocks. Accordingly, our piecewise linear approach is not able to capture precautionary behavior linked to the possibility that a constraint may become binding in the future, as a result of shocks yet unrealized.

It further highlights that

If shocks move the model away from the reference regime to the alternative regime, the model will return to the reference regime in finite time under the assumption that agents expect that no future shocks will occur.

My question is:
Can one use OccBin to analyze the effect of news shocks? or one can only switch to DynareOBC command?

My understanding is that news shocks are not a problem. Occbin will not capture precautionary behavior, but most news shock models rely on certainty equivalence in any case. For example, Jaimovich/Rebelo generated their IRFs under perfect foresight.