Q:

Akaike information criterion, long time series, and overfitting ARIMA?

I'm trying to forecast a stock index with daily data from 1990 to today (over 7000 data points) with ARIMA, after correlogram, information criterion (prioritizing Akaike) and auto selection (either with Eviews and R), I end up with 10 parameters (5,1,5) (I bet it doesn't respect the principle of parsimony).
On the log returns of the train sample it's, indeed, the best model, but when I do the forecast on the test sample, it's clearly not the best, even adding a garch(1,1).
So I guess the problem is the length of my time series, or that I shouldn't go for Akaike's information criterion with that length? What are your thoughts on that ?
Thank you very much.

A:

For any given model, a larger sample facilitates more precise estimation of model parameters and hence more accurate forecasts. In a small sample, a flexible model may underperform compared to a simpler model because of poor estimation precision of the former, but in a larger sample the flexible model may beat the simpler model because of improved estimation precision. AIC takes this into account and will tend to select more complex models for larger samples, ceteris paribus. The model complexity will be balanced against the sample size as follows: 
$$
\text{AIC}=-2n\cdot\frac{\sum_{i=1}^{n}\ln(\text{likelihood}_i)}{n}+2k
$$
where $n$ is the sample size, $\frac{\sum_{i=1}^{n}\ln(\text{likelihood}_i)}{n}$ is the average log likelihood (where the average is taken over the sample points) and $k$ is the number of parameters in the model. There is no need to adjust this for sample size, because the adjustment has already been done within the AIC.
If the forecasts from the model are not as accurate as from another, perhaps simpler model with a higher AIC value, it might be because of a change in the data generating process (DGP) over time. What was characteristic to the DGP in 1990 may no longer be true in 2020. It is not a problem of AIC but one of selecting a sample that is relevant w.r.t. what you are trying to forecast.

