Auto ARIMA
The ARIMA forecast method provides an automatic ARIMA fitting capability that selects the optimal p, d, and q parameters.
Where:
- p = the order or time lags of the autoregressive model
- d = the degree of differencing
- q = the order of the moving average model
To improve reliability, the method includes robust detection and fallback mechanisms to handle edge cases where a standard ARIMA model cannot be applied, ensuring that a forecast is always produced. Seasonality is identified through seasonal decomposition using a centered moving average, along with detrending techniques to support accurate seasonality detection.
The production-ready ARIMA forecasting solution for DMP supports automatic model selection (AutoFit), automatic seasonality detection and handling, validation and cross-validation, comprehensive edge-case handling, and built-in fallback mechanisms to ensure forecast availability in all scenarios.
The main function function automatically performs these tasks:
- Detects seasonality with a detrended ACF
- Prioritizes period = 12 for monthly data (threshold: 0.55)
- Evaluates other common periods: 4, 7, 12, 24, 52 (threshold: 0.5)
- Uses centered moving average decomposition
- Seasonalizes forecasts automatically
Detection requirements:
- A minimum of 24 data points
- At least 2 complete seasonal cycles
- An ACF value that exceeds the defined threshold after detrending
- You can disable seasonality detection by setting to False.
Decomposition method uses:
- A centered moving average for trend extraction
- Seasonal indices normalized to sum to zero
- An additive decomposition model
This is the fallback hierarchy used in :
- For insufficient data (< 20 points), use Naive forecast
- For near-zero variance, use Mean forecast
- For seasonality detected, use seasonal decomposition plus ARIMA
- For standard ARIMA, best to use the (p, d, q) model
- For ARIMA failure, use Linear trend forecast
This results in a forecast that is always produced. Warnings are returned through the property.
Parameters are limited to P = 0 to 5, D = 0 to 2, and Q = 0 to 5, with these additional disallowed conditions:
- P + Q > 5
- D > 0 AND Q > 2
- D = 2 AND (p > 1 OR q > 1)