There are two more facts i'd like to mention
1. Another really strange thing that i noticed is that when i divide forecast_simple by the sum of SARIMA coefficients as shown below, the result gets much better. It doesn't work really well when using both first and seasonal differencies, but still somehow makes the forecast better.
With (p, 1, 0)x(0,0,0,0) models it works way better and almost restores the actual forecast.
I have no idea what happens when i do this, i discovered it by accident, but the result looks like the initial time series shifted towards future values.
It would be great if you could also explain this.
inversed_forecast = my_ts.inverse_diff(forecast_simple / sarima_simple.params[:-1].sum(),\
time_series[:31],\
orders=[30, 1])
2. I tried to recreate the same procedure using just LinearRegression from sklearn. I forecasted the differenced time series using 'p' usual lags and 'P' seasonal lags. It gives almost the same coefficients and results as SARIMA and i also can't restore the time series after that.
понедельник, 8 ноября 2021 г. в 13:52:12 UTC+3, Вячеслав Загородин: