From cfc849fadc90ab4c59ece70310923bdfc0d952bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?= Date: Wed, 3 May 2017 14:06:38 +0200 Subject: [PATCH] Fixed subsample periods for exogenous variables. Model inversion routine was returning wrong results when the periods in constrainedpaths where not aligned with the periods in exogenousvariables. (cherry picked from commit d0071bd80b298fc5093ded298f17f3694de24449) --- matlab/backward_model_inversion.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/backward_model_inversion.m b/matlab/backward_model_inversion.m index ed144cbcf..e10593e1c 100644 --- a/matlab/backward_model_inversion.m +++ b/matlab/backward_model_inversion.m @@ -98,7 +98,7 @@ for i=1:nyctrl end % Initialization of the returned simulations (exogenous variables). -X = exogenousvariables{exo_names{:}}.data; +X = exogenousvariables{exo_names{:}}(constraints.dates(1)-1:constraints.dates(end)).data; % Inversion of the model, solvers for the free endogenous and exogenous variables (call a Newton-like algorithm in each period). for it = 2:nobs(constraints)+1