Skip to content

ARAR / ARARMA

Memory-shortening autoregressive models based on Brockwell & Davis (ARAR) and Parzen (ARARMA).


ARAR

The ARAR algorithm (Brockwell & Davis) uses a memory-shortening transformation to reduce a time series to a short-memory process, then fits an AR model.

from durbyn import ARAR

model = ARAR(max_ar_depth=13).fit(y)
fc = model.forecast(h=12, level=[80, 95])

Parameters

Parameter Type Default Description
max_ar_depth int \| None None Maximum autoregressive depth
max_lag int \| None None Maximum lag

Note

ARAR does not use a seasonal period m.


ARARMA

Extends ARAR with ARMA fitting on the whitened residuals.

from durbyn import ARARMA

model = ARARMA(p=0, q=1).fit(y)
fc = model.forecast(h=12, level=[80, 95])

Parameters

Parameter Type Default Description
max_ar_depth int 26 Maximum autoregressive depth
max_lag int 40 Maximum lag
p int 4 AR order
q int 1 MA order

AutoARARMA

Automatically selects the best ARARMA specification by searching over p and q ranges.

from durbyn import AutoARARMA

model = AutoARARMA(max_p=4, max_q=2).fit(y)
fc = model.forecast(h=12, level=[80, 95])

Parameters

Parameter Type Default Description
min_p int 0 Minimum AR order
max_p int 4 Maximum AR order
min_q int 0 Minimum MA order
max_q int 2 Maximum MA order
max_ar_depth int 26 Maximum autoregressive depth
max_lag int 40 Maximum lag

Example

from durbyn import ARAR, ARARMA, AutoARARMA, compare

y_train = y[:100]
y_test = y[100:]

result = compare(
    models={
        "ARAR": ARAR(),
        "ARARMA": ARARMA(p=2, q=1),
        "AutoARARMA": AutoARARMA(),
    },
    y_train=y_train,
    y_test=y_test,
    m=1,
)

print(result.to_dataframe())