I am using ARIMA to fit values and save it as a pickle file. Post that, the pickle file is used to get out of sample predictions. However, while getting sample predictions I am getting the following error: Cannot cast ufunc subtract output from dtype('float64') to dtype('int64') with casting rule 'same_kind'.
def forecast_fit(df):
series=df
X = series.values
train=X
model = ARIMA(X, order=(1,0,1))
model_fit = model.fit(disp=0)
model_fit.save('model.pkl')
forecast_fit(df)
#Out of sample forecasts
loaded = ARIMAResults.load('model.pkl)
forecast = loaded.forecast(steps=17)[0] #error_occurs_here
df=pd.DataFrame(forecast, columns=[i+'_hat'])
The df contains the following data: https://docs.google.com/spreadsheets/d/14W77ra-nQYqvDN8wSPhhiN11lBnob6ZW0UVevQ5orKk/edit?usp=sharing
I am attaching the data because the error occurs with this very sample, rest of the variables(I am repeating the exercise for many other variables) don't produce the error.