Here is a code I use for forecasting..So I am looking for a way to modify this code so I can conduct backcastings..Do you know If I can modify it?? Many thanks.
row=75;
data(1:row,1)=USActualGDPPotentialsandOutputGapsS1(1:row,1);
mdl=arima(3,0,0);
for ii=0:99;
RecursiveData=data(1:row,1);
mdlEstimate = estimate(mdl,RecursiveData,'print',false);
[Y,YMSE,~] = forecast(mdlEstimate,1,'Y0',RecursiveData);
forecastY(ii+1,1) = Y;
data(row+1,1)= Y;
row=row+1;
end;