I am trying to use a Rolling OLS to predict y. I have the following code and outcome, but I do not understand the ‘end’ and ‘subperiod’. Which am I to compare to the actual y in order to get the MSE?
Further, the length of the output is 8570, whereas the length of the actual y is 1763.
Code
rolling = ols.PandasRollingOLS(y=y, x=X, window=50)
y_pred = rolling.predicted
y_pred
Output:
end subperiod
4 0 85.013903
1 85.904752
2 85.979983
3 86.698113
4 86.797877
...
1762 1758 718.120178
1759 717.725245
1760 715.356422
1761 705.343367
1762 694.298419
Name: predicted, Length: 85700, dtype: float64