I am building an ARIMA model and did a grid search to find which values to use for my AR and MA components using the AIC criteria (this was using all of my data). The results are in this graphic:
Now I want to use cross-validation (as described here by Rob Hyndman) to select a model from a few candidates chosen from my grid search.
I have read in Elements of Statistical Learning (Hastie, Tibshirani and Friedman) a description of the wrong way to do cross validation and that I should perform the entire model selection process within each fold, but I am unsure if this approach is crossing the line, especially since it is with a time series model.