Bug command "Forecast" in v4.0.3 (however not in 4.0.2)

Hi,
I encountered a bug when using the “forecast” command in version 4.0.3, which is however not a bug in version 4.0.2
First, I present a simple model, then I report the error message.


simple model


var y inf r;
varexo e_y e_inf;

parameters delta sigma alpha kappa gamma1 gamma2;

delta = 0.44;
kappa = 0.18;
alpha = 0.48;
sigma = -0.06;
gamma1 = 1.5;
gamma2 = 0.5;

model(linear);
y = deltay(-1)+(1-delta)y(+1)
+sigma (r-inf(+1))+e_y;
inf = alpha
inf(-1)+(1-alpha)inf(+1)
+kappa
y+e_inf;
r = gamma1
inf+gamma2
y;
end;

shocks;
var e_y; stderr 0.63;
var e_inf; stderr 0.4;
end;

steady;
check;

stoch_simul;
forecast;


error message only in version 4.0.3 (and not in version 4.0.2)


??? Undefined function or variable “var_yf”.

Error in ==> forcst at 87
int_width(:,i) = fact*sqrt(var_yf(:,i));

Error in ==> forecast at 103
[yf,int_width] = forcst(oo_.dr,y0,horizon,var_list);

Error in ==> simple1 at 95
info = forecast(var_list_,‘simul’);

Error in ==> dynare at 102
evalin(‘base’,fname) ;

Hi,

I fixed the bug in forecast. The correction will be available in tomorrow’s snapshot.
Thanks a lot for reporting it.

Note also that “inf” is now a reserved word in Dynare language. In the example, you should change the variable “inf” to something else.

Best

Michel