AutoARIMA performance I am  trying to implement a pmdarima AutoARIMA estimation exercise for learning reasons.
Observation is that, selected model fits the train data quite well, however it performs poorly on test data, at a glance.
Dataset is daily temperatures from 1981.01.01 to 1990.12.31 with strong cycle behaviour. Best model found by pmdarima.AutoARIMA is ARIMA(1,0,3)(0,0,0)[0].
I am not sure if the model should perform better on test data or results cannot be improved further for this dataset.
My question is, why the same model performs so differently on train and test data despite that they have similar properties?
Thank you very much.
import matplotlib.pyplot as plt
import pandas as pd
import pmdarima as pm
from sktime.forecasting.model_selection import temporal_train_test_split
from data_preparation import data_preparation

y = data_preparation('D:/Stat/dataset/temperatures.csv', 'Date', 'Temp', 'D')
y_train, y_test = temporal_train_test_split(y, train_size = 0.8)
forecaster = pm.auto_arima(y_train, trace = True)
fitted = forecaster.predict_in_sample()
forecast = forecaster.predict(len(y_test))
fitted = pd.Series(fitted, index = pd.date_range(start = y_train.index[0], periods = len(y_train) + 1, freq='D', closed='right'))
forecast = pd.Series(forecast, index = pd.date_range(start = y_test.index[0], periods = len(y_test) + 1, freq='D', closed='right'))

figure = plt.figure(figsize=(12, 5))
figure.suptitle("AutoARIMA - Temperatures")
new_plot_1 = figure.add_subplot(111)
new_plot_1.plot(y_train.index, y_train.values, 'darkblue')
new_plot_1.plot(y_test.index, y_test.values, 'darkgreen')
new_plot_1.plot(fitted, 'royalblue')
new_plot_1.plot(forecast, 'red')


 A: As jbowman notes, you are not telling auto_arima that these are seasonal data with cycle length (about 365). auto_arima does not automatically detect season cycle length, which would be very hard, and possibly impossible if you have multiple-seasonalities. See also here. So tell your code about the seasonality, e.g., by setting m=365 and seasonal=True.
However, even then auto_arima may not pick up on the seasonality. This is a well-known weakness of ARIMA for seasonality with long periods. You can in principle force it to use seasonality, e.g., by setting D=1 to force seasonal differencing. Note that this is not the only way to make ARIMA work with seasonality: you could also try to enforce SARIMA components, like SAR(P). Unfortunately, I do not think that auto_arima allows you to fix the SARIMA orders, or specify minimum SARIMA orders. (At least the default value of start_P=1 will start out with an SAR(1) component.)
Finally, a better approach especially for highly regular seasonality as here would likely be Fourier terms to model seasonality in ARIMA models.
