Sequence of Conditional Forecasts

Hello Dynare community.

I am working on a linear semi-structural model, which is calibrated and can be successfully solved by Dynare. IRFs, unconditional and conditional forecasts are working fine.

I want to perform several conditional forecast scenarios in sequence using the same .mod file, in just one Dynare call. My goal is to save time and avoid having to change the conditional_forecast_paths in each run. The problem is that when I do that, the previous scenarios seems to affect the next one. In other words, the declared order of scenarios affects the results.

Even when I try two identical scenarios in a row (see example below) I get different paths for all endogenous variables. The difference between them are small, but not negligible and grow as I change the magnitude of endogenous variables paths. Has anyone ever experienced something similar?

As an example, consider the code below. I constrain the path of two variables (i and e), store the results in an arbitrary struct scen and re-run the same scenario again. I expected to get identical results, but this is not the case.

% SCENARIO 1

conditional_forecast_paths;

var i;
periods 1,2,3,4;
values 2,2,2,2;

var e;
periods 1,2,3,4;
values 0.25,0.25,0.25,0.25;

end;

conditional_forecast(parameter_set = calibration, controlled_varexo = (eps_i, eps_e), periods = 4, conf_sig = 0.90);

scen(1).data = oo_                  

% SCENARIO 2

conditional_forecast_paths;

var i;
periods 1,2,3,4;
values 2,2,2,2;

var e;
periods 1,2,3,4;
values 0.25,0.25,0.25,0.25;

end;

conditional_forecast(parameter_set = calibration, controlled_varexo = (eps_i, eps_e), periods = 4, conf_sig = 0.90);

scen(2).data = oo_

I can’t provide codes for replication because the model is private, but I can share them by email if necessary. I am using Dynare version 4.6.4

Thank you for your help.

Please provide me with the files via PM.

1 Like

You are considering mean forecasts that rely on random shocks. You need to set a seed:

set_dynare_seed('default')
conditional_forecast(parameter_set = calibration,
                     periods = 8, 
                     controlled_varexo = (eps_i, eps_e),
                     conf_sig = 0.50);

should do the trick.

1 Like