Forecast from the last observations, calibrated model

Hi,

is there a way to load the data file and forecast starting from the last observations of the file in a calibrated model without histval block?

Thank you!

You may try to run the estimation command with options mode_compute=0 and forecast (and by declaring the observed variables, i.e. those in the datafile, with varobs).

Hi Sebastien,

I tried this approach, but the forecast is not generating. I’m using Dynare 4.6.3 and Octave 5.2.0. Pls advise.

Then please provide the files to replicate the issue.

These are the files; sl_gdp_est_4.mod (1.9 KB) data_sl.csv (605 Bytes)

This is a bug. See https://git.dynare.org/Dynare/dynare/-/merge_requests/1802

I see. Do you think the fix will be available in the next release?

Yes, but you could also simply add three lines in your Dynare version.

I’ve tried modifying the .m file but still the forecasts are not getting generated. Here are the
files dynare_estimation_1.m (36.8 KB) sl_gdp_est_4.mod (1.9 KB) data_sl.csv (605 Bytes) . How can I fix this?

Why do you now have mode_compute=5 instead of 0?

Pardon me, I’m confused. In the .mod file I have opted mode_compute=0.

My mistake. The smoother-option is missing. Use

estimation(datafile=data_sl, xls_sheet = data_sl, xls_range = A2:A11, mode_compute=0, forecast=5, smoother);

Hello professor,

If Im forecasting after an estimation and wants to use the estimated parameters, should I have to remove estimated_params_init(use_calibration); option?

No, the estimated parameters should not depend on the initial parameters you chose.

But I get a different set of results if I have estimated_params_init(use_calibration) on as opposed to remove it from the code completely. What is the reason for that?

Most likely that your mode finding did converge to different modes. That suggests your mode-finding was not successful.