pmdarima
# init model
model = pm.auto_arima(data, ... , seasonal=True, m=12)
# for out-sample data (validation/testing set)
test_pred, confint = model.predict(n_periods=Ntest, return_conf_int=True)
# for in-sample data (training set)
train_pred = model.predict_in_sample(start=0, end=-1)
Seasonal ARIMA(SARIMA)
- stock prices don’t typically have seasonality, but stock prices don’t comprise all financial data
- E.g. weather affect real estate purchases data or commodity market
- $SARIMA{(p, d, q) * (P, D, Q)_m}$
- $D=1, {\Delta}mY_t = Y_t - Y{t-m}$
- Stationary is contradicts to Seaonality. That is, A data has seaonality means it is non-stationary
- SARIMAX = ARIMA * SARIMA * vector
Model Seclection, AIC and BIC
How to find the best model:
- The model has the minimum metric
How to deal with overfitting
How to find the best parameter for ARIMA
- ARIMA(p, d, q), the larger p + q, the more complex
One solution is adding penalty term