From dde1acd18d40238849f16d72b865a3b5cadbf577 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer <jpfeifer@gmx.de> Date: Fri, 12 Jan 2018 14:25:26 +0100 Subject: [PATCH] Make fast_realtime accept observation as input --- doc/dynare.texi | 6 ++++-- preprocessor/DynareBison.yy | 2 +- tests/shock_decomposition/ls2003_plot.mod | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/dynare.texi b/doc/dynare.texi index a25bf1792..72f63800d 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -7544,9 +7544,11 @@ realtime shock decompositions are computed, @i{i.e.} for @anchor{save_realtime} Choose for which vintages to save the full realtime shock decomposition. Default: @math{0}. -@item fast_realtime +@item fast_realtime = @var{INTEGER} @anchor{fast_realtime} Runs the smoother only twice: once for the last in-sample -and once for the last out-of-sample data point. Default: not enabled. +and once for the last out-of-sample data point, where the provided integer defines the last observation +(equivalent to @ref{nobs}). +Default: not enabled. @end table diff --git a/preprocessor/DynareBison.yy b/preprocessor/DynareBison.yy index 7fbae92a4..64c3a796c 100644 --- a/preprocessor/DynareBison.yy +++ b/preprocessor/DynareBison.yy @@ -3099,7 +3099,7 @@ o_init_state : INIT_STATE EQUAL INT_NUMBER { driver.option_num("shock_decomp.ini o_shock_decomposition_presample : PRESAMPLE EQUAL INT_NUMBER { driver.option_num("shock_decomp.presample", $3); }; o_shock_decomposition_forecast : FORECAST EQUAL INT_NUMBER { driver.option_num("shock_decomp.forecast", $3); }; o_save_realtime : SAVE_REALTIME EQUAL vec_int { driver.option_vec_int("shock_decomp.save_realtime", $3); }; -o_fast_realtime : FAST_REALTIME { driver.option_num("shock_decomp.fast_realtime", "1"); }; +o_fast_realtime : FAST_REALTIME EQUAL INT_NUMBER { driver.option_num("shock_decomp.fast_realtime", $3); }; o_nodisplay : NODISPLAY { driver.option_num("nodisplay","1"); }; o_psd_nodisplay : NODISPLAY { driver.option_num("plot_shock_decomp.nodisplay","1"); }; o_graph_format : GRAPH_FORMAT EQUAL allowed_graph_formats diff --git a/tests/shock_decomposition/ls2003_plot.mod b/tests/shock_decomposition/ls2003_plot.mod index 69e8774f8..895de40e9 100644 --- a/tests/shock_decomposition/ls2003_plot.mod +++ b/tests/shock_decomposition/ls2003_plot.mod @@ -133,7 +133,7 @@ close all, // testing realtime decomposition with fast_realtime option -realtime_shock_decomposition(fast_realtime); +realtime_shock_decomposition(fast_realtime=75); collect_latex_files; if system(['pdflatex -halt-on-error -interaction=batchmode ' M_.fname '_TeX_binder.tex']) -- GitLab