# ARIMA model gives inaccurate predictions?

I am trying fit an ARIMA model for time series. The blue plot is the training set, orange is the test set, and red and green are 2 different ARIMA models. My prediction plots always look very compressed. Anyone know what might have caused this?

This is the code I used to make the prediction:

import pandas as pd
import matplotlib.pyplot as plt
from statsmodels.tsa.arima_model import ARIMA

X = series.values
size = int(len(X) * 0.50)
train, test = X[0:size], X[size:len(X)]
history = [x for x in train]
predictions = list()
for t in range(len(test)):
model = ARIMA(history, order=(5,1,0))
model_fit = model.fit(disp=0)
output = model_fit.forecast()
yhat = output[0]
predictions.append(yhat)
history.append(test[t])


• What package are you using? – Skander H. Jul 12 '18 at 20:22
• @Alex I'm using statsmodels! – k1234 Jul 12 '18 at 20:27
• Are you asking about the statistical quality of the predictions or the visual quality of the plot? – Sycorax Jul 12 '18 at 20:36
• @Sycorax the statistical quality of the predictions:) – k1234 Jul 12 '18 at 20:52
• @k1234 Perhaps you could edit your title and question to more clearly emphasize that you are not satisfied with the quality of your predictions. – Sycorax Jul 12 '18 at 20:56