naffe15 / BVAR_

Empirical macro toolbox
GNU General Public License v3.0
130 stars 76 forks source link

VARX (un)conditional forecasts #16

Open devproglab opened 1 year ago

devproglab commented 1 year ago
  1. I seem to have found a bug in how unconditional forecasts for VARX models are produced. I have found out that no matter which values for the exogenous variable I use for the forecast period (with the length of options.controls being equal to T + fhor), the forecast stays exactly the same. I guess line 841 in bvar_.m should read:

forecast_data.xdata = [forecast_data.xdata exogenous(T+1 : T+fhor,:)];

  1. I also wonder why the code does not allow to use exogenous variables while producing conditional forecasts. When I comment line 632 in bvar_m.m and fix the bug described above, everything seems to work OK.
naffe15 commented 1 year ago

Thanks for you message and for reporting bugs. let me look into it and I get back to you soon.