I am building an ARIMA model with timeseries data. Here is my original df
date values
-----------------
2018-05-28 0
2018-06-04 1
2018-06-11 2
2018-06-18 3
2018-06-25 4
2018-07-02 5
2018-07-09 6
2018-07-16 7
2018-07-23 8
In order to achieve stationarity I subtracted actual - rolling mean from the original dataset with
rolling_mean = df["values"].rolling(window=8).mean()
df_minus_rollingmean = df.values - rolling_mean
So now df_minus_rollingmean looks like this
0 NaN
1 NaN
2 NaN
3 NaN
4 NaN
5 NaN
6 NaN
7 3.5
8 4.5
I have fitted an ARIMA model and generated forecasts
model = ARIMA(df_minus_rollingmean)
forecasts = model.fit().fittedvalues
Because the model to generate the forecasts were made against the df_minus_rollingmean values, how do I convert the forecasts back to values that make sense when compared to the original dataset?