 # Problems arised in forecast using DynareOBC

I tried to replicate the result of the essay The effects of a money-financed fiscal stimulus(Jordy Gali,2019), using the toolkit dynareOBC. I succeed to print IRFs, but then I failed when using the forecast command( there are mixed shocks in the model), with matlab giving strange error massages about matlab files within the toolkit.
Can anyone help me?
Thanks!

Here is the mod file.

var Y C G EP I PI L MU M B T;

varexo_det RHO;
varexo e1 e2;

parameters beta phi rho sigma alpha eps theta chi eta v phi_b b delta lambda;

beta=0.995; % discount factor
phi=5; % inverse Frisch elasticity of labor supply
rho=0.02;
sigma=1;
alpha=0.25;
eps=9;
theta=0.75;
chi=0.333;
eta=7;
v=0;
phi_b=0.03;
b=2.4;
delta=0.5;
lambda=(1-theta)(1-betatheta)(1-alpha)/(theta(1-alpha+alpha*eps));

model;

Y=C+G;
EP=EP(1)+I-PI(1)-RHO;
EP=-sigmaC+vL;
PI=betaPI(1)-lambdaMU;
MU=EP-(alpha+phi)/(1-alpha)Y;
I=max(log(beta),(C-L)/eta);
L(-1)=L+PI-M;
B=(1+rho-phi_b)B(-1)+b(1+rho)
(I(1)-PI)+G-T-chiM;
B=0;
G=delta
G(-1)+e1;
T=delta*T(-1)-e2;

end;

initval;
Y=0;
C=0;
G=0;
EP=0;
I=0;
PI=0;
L=0;
MU=0;
M=0;
B=0;
T=0;
end;

check;

shocks;
var e1;
stderr 1;
var e2;
stderr 1;
var RHO;
periods 1:5 6:40;
values -0.01 0;
end;

stoch_simul(periods=0,irf=40);
forecast(periods=10);

That seems to be a question for @cfp.

DynareOBC does not support the “forecast” command, nor specifying periods and values for shocks. You can probably accomplish something similar using the ShockSequenceFile and InitialStateFile options to DynareOBC. As ever, see the DynareOBC ReadMe.

Thank you very much!
I have already solved my problem by setting lagged shocks so forecast command won’t be necessary.