I am studying time series right now. So, I have this dataset. My aim is temperature prediction.
I've found out that ARIMA can't work with long period seasonality. So, I've resampled daily dataset into weekly. Than I create an ARIMA with S = 52 and fit it. Here is a code (python):
import statsmodels.api as sm
import pandas as pd
df = pd.read_csv('data/DailyDelhiClimateTrain.csv', parse_dates=['date'], index_col='date')
df = df.resample('W').mean()
model=sm.tsa.statespace.SARIMAX(
df.meantemp,
order=(1, 1, 1),
seasonal_order=(2, 1, 0, 52)
).fit()
And here is the prediction and the test data (blue - test data, red - predictions):
As you see, the MSE is 6.08.
Later, I decided to use daily format with S = 365.25. I didn't find solution in python, but I found a fourier approximation in R. So, here my daily model (R):
require(forecast)
require(data.table)
train <- read.csv("data/DailyDelhiClimateTrain.csv")
y_train = ts(train[, 2], freq=365.25)
fit <- auto.arima(y_train, seasonal=FALSE, xreg=fourier(y_train, K=15))
And for some reason this works much worse:
I'm really sorry for such long introduction. My question is: why daily prediction works much worse than weekly?