I am trying to forecast a univariate time series with multiple seasonality
Something like this:
library(forecast) fit <- auto.arima(y, seasonal=FALSE, xreg=fourier(y, K=8))
Based on visualization my data show frequency of 7, 31 and 365. It is answered in few stack exchange answers that The value of K for fourier term can be chosen by minimizing the AIC.
How would the pseudo code look like to find K for for each frequency ( 7, 31 and 365), to minimize AIC.