Preprocessor: new “with_epilogue” option and related fixes

Ref. !1688
time-shift
Sébastien Villemot 2019-12-20 11:57:34 +01:00
parent c04c111d97
commit d40b775260
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
3 changed files with 17 additions and 6 deletions

View File

@ -6977,6 +6977,11 @@ Shock Decomposition
``1``, the shock decomposition is computed conditional on the ``1``, the shock decomposition is computed conditional on the
smoothed state variables in period 1. Default: ``0``. smoothed state variables in period 1. Default: ``0``.
.. option:: with_epilogue
If set, then also compute the decomposition for variables declared in
the ``epilogue`` block.
*Output* *Output*
.. matvar:: oo_.shock_decomposition .. matvar:: oo_.shock_decomposition
@ -7134,6 +7139,11 @@ Shock Decomposition
integer defines the last observation (equivalent to integer defines the last observation (equivalent to
:opt:`nobs`). Default: not enabled. :opt:`nobs`). Default: not enabled.
.. option:: with_epilogue
If set, then also compute the decomposition for variables declared in
the ``epilogue`` block.
*Output* *Output*
.. matvar:: oo_.realtime_shock_decomposition .. matvar:: oo_.realtime_shock_decomposition
@ -7376,6 +7386,11 @@ Shock Decomposition
Maximum number of rows in the subplot layout of detailed shock Maximum number of rows in the subplot layout of detailed shock
decomposition graphs. Note that columns are always 3. Default: 6 decomposition graphs. Note that columns are always 3. Default: 6
.. option:: with_epilogue
If set, then also compute the decomposition for variables declared in
the ``epilogue`` block.
.. command:: initial_condition_decomposition [VARIABLE_NAME]...; .. command:: initial_condition_decomposition [VARIABLE_NAME]...;
initial_condition_decomposition (OPTIONS...) [VARIABLE_NAME]...; initial_condition_decomposition (OPTIONS...) [VARIABLE_NAME]...;

@ -1 +1 @@
Subproject commit 8baec1e0ec5e06df5e14a96467fe520f5eb6f374 Subproject commit 5f451ebc9937b0a2a99f927a3f27fc2911b64eb9

View File

@ -90,11 +90,9 @@ A e_A;
end; end;
options_.initial_date=dates('1989Q4'); % date arbitrarily set for testing purposes options_.initial_date=dates('1989Q4'); % date arbitrarily set for testing purposes
options_.shock_decomp.with_epilogue=true; shock_decomposition(nograph, with_epilogue);
shock_decomposition(nograph);
// test for nothing to squeeze // test for nothing to squeeze
squeeze_shock_decomposition; squeeze_shock_decomposition;
// oo_ = squeeze_shock_decomp(M_,oo_,options_);
// standard plot // standard plot
plot_shock_decomposition y_obs R_obs pie_obs dq de; plot_shock_decomposition y_obs R_obs pie_obs dq de;
@ -122,7 +120,6 @@ realtime_shock_decomposition(forecast=8, save_realtime=[5 9 13 17 21 25 29 33 37
// test squeeze // test squeeze
squeeze_shock_decomposition; squeeze_shock_decomposition;
// oo_ = squeeze_shock_decomp(M_,oo_,options_);
//realtime pooled //realtime pooled
plot_shock_decomposition(realtime = 1) y_obs R_obs pie_obs dq de; plot_shock_decomposition(realtime = 1) y_obs R_obs pie_obs dq de;
@ -167,7 +164,6 @@ realtime_shock_decomposition(fast_realtime=75) y_obs R_obs pie_obs dq de;
// re-test squeeze // re-test squeeze
squeeze_shock_decomposition; squeeze_shock_decomposition;
// oo_ = squeeze_shock_decomp(M_,oo_,options_);
collect_latex_files; collect_latex_files;
if system(['pdflatex -halt-on-error -interaction=batchmode ' M_.fname '_TeX_binder.tex']) if system(['pdflatex -halt-on-error -interaction=batchmode ' M_.fname '_TeX_binder.tex'])