MATLAB: One step ahead forecast from an estimated model – error term

arimaarima ma term valueone-step ahead prediction

I have estimated the model for my series and it is arima(1,1,1). Instead of available k-step ahead option, I need to do one-step ahead forecast. The model is:
ARIMA(1,1,1) Model:
--------------------
Conditional Probability Distribution: Gaussian
Standard t
Parameter Value Error Statistic
----------- ----------- ------------ -----------
Constant 8.96034e-05 0.00121444 0.0737815
AR{1} 0.531086 0.0802215 6.62025
MA{1} -0.917878 0.0394706 -23.2548
Variance 0.0378884 0.00419511 9.03158
so, the equation will be
y(k) = .000089 + (0.531086*y(k-1)) + e(k) + (-0.917878*e(k-1))
What will be the value of 'e' term? what should be 'e(k)'? Correct me if I have interpreted anything wrongly.

Best Answer

1. The arima\estimate method will return to you the data on the original scale. That is if you do:
Mdl = arima(1,1,1);
Mdl = estimate(Mdl,data);
res = infer(Mdl,data); % Retrieve inferred residuals (innovations)
foreValues = forecast(Mdl,1,'Y0',data','E0',res) % forecast
Your forecasted data will be on the same scale as data and not the differenced data. The difference operator is just applied and you have the model you wrote above, but are simply returned y(k),y(k+1),...
2. The residual e(k-1) is he last value in the variable res above. That is, if you pass 'E0' to the forecast method it will use the residuals which were infered from the model and data.
Related Question