0

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])

Thanks in advance!

enter image description here

k1234
  • 1
  • 1

1 Answers1

1

Time series (more generally: all observed data) consist of signal and noise. Time series algorithms (more generally: all models and fitting algorithms) aim at extracting the signal and forecasting that. They don't forecast the noise, because that is by definition unforecastable.

Therefore the predictions will always be less variable than the original data, because the noise component is not included. To account for the inevitable noise, you can calculate s.

I very strongly suspect that your training data exhibits a large amount of noise. Or what the algorithm believes is noise. If you can feed your algorithm some information that explains the noise, i.e., predictors, noise can miraculously be transmuted into signal. And improve your forecasts.

Stephan Kolassa
  • 95,027
  • 13
  • 197
  • 357