Skip to main content

ARIMA Models

AutoRegressive Integrated Moving Average - models dependencies between observations.

ModelDescription
ARIMAClassic ARIMA with manual parameter specification
AutoARIMAAutomatic ARIMA with (p,d,q) selection
Showing 2 of 2

ARIMA

Classic ARIMA model with manual parameter specification.

Parameters

ParameterTypeRequiredDescription
pINTEGERYesAR (autoregressive) order
dINTEGERYesDifferencing order
qINTEGERYesMA (moving average) order
seasonal_periodINTEGERNoFor seasonal ARIMA
PINTEGERNoSeasonal AR order
DINTEGERNoSeasonal differencing
QINTEGERNoSeasonal MA order

Example

-- Non-seasonal ARIMA(1,1,1)
SELECT * FROM anofox_fcst_ts_forecast(
'sales_data',
'date',
'sales',
'ARIMA',
28,
MAP{'p': '1', 'd': '1', 'q': '1'}
);

-- Seasonal ARIMA(1,1,1)(1,1,1)[7]
SELECT * FROM anofox_fcst_ts_forecast(
'weekly_data',
'date',
'value',
'ARIMA',
28,
MAP{'p': '1', 'd': '1', 'q': '1', 'P': '1', 'D': '1', 'Q': '1', 'seasonal_period': '7'}
);

Best for: Complex patterns when you know the appropriate order.


AutoARIMA

Automatic ARIMA with (p,d,q) parameter selection using information criteria.

Parameters

ParameterTypeDefaultDescription
seasonal_periodINTEGERautoSeasonal period
max_pINTEGER5Maximum AR order
max_dINTEGER2Maximum differencing order
max_qINTEGER5Maximum MA order

Example

SELECT * FROM anofox_fcst_ts_forecast(
'sales_data',
'date',
'sales',
'AutoARIMA',
28,
MAP{'seasonal_period': '7'}
);

Best for: Complex patterns, long-term forecasts, automatic tuning.


Parameter Selection Guide

Scenariopdq
Stationary data1-201-2
Trending data1-211-2
Strong trend1-221-2
Random walk010

When to Use ARIMA vs AutoARIMA

ScenarioRecommended
Known order from domain expertiseARIMA
Exploratory analysisAutoARIMA
Production pipelineAutoARIMA
Performance-criticalARIMA (faster)
Many time seriesAutoARIMA
🍪 Cookie Settings