- Source: Autoregressive moving-average model
In the statistical analysis of time series, autoregressive–moving-average (ARMA) models are a way to describe of a (weakly) stationary stochastic process using autoregression (AR) and a moving average (MA), each with a polynomial. They are a tool for understanding a series and predicting future values. AR involves regressing the variable on its own lagged (i.e., past) values. MA involves modeling the error as a linear combination of error terms occurring contemporaneously and at various times in the past. The model is usually denoted ARMA(p, q), where p is the order of AR and q is the order of MA.
The general ARMA model was described in the 1951 thesis of Peter Whittle, Hypothesis testing in time series analysis, and it was popularized in the 1970 book by George E. P. Box and Gwilym Jenkins.
ARMA models can be estimated by using the Box–Jenkins method.
Mathematical formulation
= Autoregressive model
=The notation AR(p) refers to the autoregressive model of order p. The AR(p) model is written as
X
t
=
∑
i
=
1
p
φ
i
X
t
−
i
+
ε
t
{\displaystyle X_{t}=\sum _{i=1}^{p}\varphi _{i}X_{t-i}+\varepsilon _{t}}
where
φ
1
,
…
,
φ
p
{\displaystyle \varphi _{1},\ldots ,\varphi _{p}}
are parameters and the random variable
ε
t
{\displaystyle \varepsilon _{t}}
is white noise, usually independent and identically distributed (i.i.d.) normal random variables.
In order for the model to remain stationary, the roots of its characteristic polynomial must lie outside the unit circle. For example, processes in the AR(1) model with
|
φ
1
|
≥
1
{\displaystyle |\varphi _{1}|\geq 1}
are not stationary because the root of
1
−
φ
1
B
=
0
{\displaystyle 1-\varphi _{1}B=0}
lies within the unit circle.
The augmented Dickey–Fuller test assesses the stability of IMF and trend components. For stationary time series, the ARMA model is used, while for non-stationary series, LSTM models are used to derive abstract features. The final value is obtained by reconstructing the predicted outcomes of each time series.
= Moving average model
=The notation MA(q) refers to the moving average model of order q:
X
t
=
μ
+
ε
t
+
∑
i
=
1
q
θ
i
ε
t
−
i
{\displaystyle X_{t}=\mu +\varepsilon _{t}+\sum _{i=1}^{q}\theta _{i}\varepsilon _{t-i}\,}
where the
θ
1
,
.
.
.
,
θ
q
{\displaystyle \theta _{1},...,\theta _{q}}
are the parameters of the model,
μ
{\displaystyle \mu }
is the expectation of
X
t
{\displaystyle X_{t}}
(often assumed to equal 0), and
ε
1
{\displaystyle \varepsilon _{1}}
, ...,
ε
t
{\displaystyle \varepsilon _{t}}
are i.i.d. white noise error terms that are commonly normal random variables.
= ARMA model
=The notation ARMA(p, q) refers to the model with p autoregressive terms and q moving-average terms. This model contains the AR(p) and MA(q) models,
X
t
=
ε
t
+
∑
i
=
1
p
φ
i
X
t
−
i
+
∑
i
=
1
q
θ
i
ε
t
−
i
.
{\displaystyle X_{t}=\varepsilon _{t}+\sum _{i=1}^{p}\varphi _{i}X_{t-i}+\sum _{i=1}^{q}\theta _{i}\varepsilon _{t-i}.\,}
= In terms of lag operator
=In some texts, the models is specified using the lag operator L. In these terms, the AR(p) model is given by
ε
t
=
(
1
−
∑
i
=
1
p
φ
i
L
i
)
X
t
=
φ
(
L
)
X
t
{\displaystyle \varepsilon _{t}=\left(1-\sum _{i=1}^{p}\varphi _{i}L^{i}\right)X_{t}=\varphi (L)X_{t}\,}
where
φ
{\displaystyle \varphi }
represents the polynomial
φ
(
L
)
=
1
−
∑
i
=
1
p
φ
i
L
i
.
{\displaystyle \varphi (L)=1-\sum _{i=1}^{p}\varphi _{i}L^{i}.\,}
The MA(q) model is given by
X
t
−
μ
=
(
1
+
∑
i
=
1
q
θ
i
L
i
)
ε
t
=
θ
(
L
)
ε
t
,
{\displaystyle X_{t}-\mu =\left(1+\sum _{i=1}^{q}\theta _{i}L^{i}\right)\varepsilon _{t}=\theta (L)\varepsilon _{t},\,}
where
θ
{\displaystyle \theta }
represents the polynomial
θ
(
L
)
=
1
+
∑
i
=
1
q
θ
i
L
i
.
{\displaystyle \theta (L)=1+\sum _{i=1}^{q}\theta _{i}L^{i}.\,}
Finally, the combined ARMA(p, q) model is given by
(
1
−
∑
i
=
1
p
φ
i
L
i
)
X
t
=
(
1
+
∑
i
=
1
q
θ
i
L
i
)
ε
t
,
{\displaystyle \left(1-\sum _{i=1}^{p}\varphi _{i}L^{i}\right)X_{t}=\left(1+\sum _{i=1}^{q}\theta _{i}L^{i}\right)\varepsilon _{t}\,,}
or more concisely,
φ
(
L
)
X
t
=
θ
(
L
)
ε
t
{\displaystyle \varphi (L)X_{t}=\theta (L)\varepsilon _{t}\,}
or
φ
(
L
)
θ
(
L
)
X
t
=
ε
t
.
{\displaystyle {\frac {\varphi (L)}{\theta (L)}}X_{t}=\varepsilon _{t}\,.}
This is the form used in Box, Jenkins & Reinsel.
Moreover, starting summations from
i
=
0
{\displaystyle i=0}
and setting
ϕ
0
=
−
1
{\displaystyle \phi _{0}=-1}
and
θ
0
=
1
{\displaystyle \theta _{0}=1}
, then we get an even more elegant formulation:
−
∑
i
=
0
p
ϕ
i
L
i
X
t
=
∑
i
=
0
q
θ
i
L
i
ε
t
.
{\displaystyle -\sum _{i=0}^{p}\phi _{i}L^{i}\;X_{t}=\sum _{i=0}^{q}\theta _{i}L^{i}\;\varepsilon _{t}\,.}
Spectrum
The spectral density of an ARMA process is
S
(
f
)
=
σ
2
2
π
|
θ
(
e
−
i
f
)
ϕ
(
e
−
i
f
)
|
2
{\displaystyle S(f)={\frac {\sigma ^{2}}{2\pi }}\left\vert {\frac {\theta (e^{-if})}{\phi (e^{-if})}}\right\vert ^{2}}
where
σ
2
{\displaystyle \sigma ^{2}}
is the variance of the white noise,
θ
{\displaystyle \theta }
is the characteristic polynomial of the moving average part of the ARMA model, and
ϕ
{\displaystyle \phi }
is the characteristic polynomial of the autoregressive part of the ARMA model.
Fitting models
= Choosing p and q
=An appropriate value of p in the ARMA(p, q) model can be found by plotting the partial autocorrelation functions. Similarly, q can be estimated by using the autocorrelation functions. Both p and q can be determined simultaneously using extended autocorrelation functions (EACF). Further information can be gleaned by considering the same functions for the residuals of a model fitted with an initial selection of p and q.
Brockwell & Davis recommend using Akaike information criterion (AIC) for finding p and q. Another option is the Bayesian information criterion (BIC).
= Estimating coefficients
=After choosing p and q, ARMA models can be fitted by least squares regression to find the values of the parameters which minimize the error term. It is good practice to find the smallest values of p and q which provide an acceptable fit to the data. For a pure AR model, the Yule-Walker equations may be used to provide a fit.
ARMA outputs are used primarily to forecast (predict), and not to infer causation as in other areas of econometrics and regression methods such as OLS and 2SLS.
= Software implementations
=In R, standard package stats has function arima, documented in ARIMA Modelling of Time Series. Package astsa has an improved script called sarima for fitting ARMA models (seasonal and nonseasonal) and sarima.sim to simulate data from these models. Extension packages contain related and extended functionality: package tseries includes the function arma(), documented in "Fit ARMA Models to Time Series"; packagefracdiff contains fracdiff() for fractionally integrated ARMA processes; and package forecast includes auto.arima for selecting a parsimonious set of p, q. The CRAN task view on Time Series contains links to most of these.
Mathematica has a complete library of time series functions including ARMA.
MATLAB includes functions such as arma, ar and arx to estimate autoregressive, exogenous autoregressive and ARMAX models. See System Identification Toolbox and Econometrics Toolbox for details.
Julia has community-driven packages that implement fitting with an ARMA model such as arma.jl.
Python has the statsmodelsS package which includes many models and functions for time series analysis, including ARMA. Formerly part of the scikit-learn library, it is now stand-alone and integrates well with Pandas.
PyFlux has a Python-based implementation of ARIMAX models, including Bayesian ARIMAX models.
IMSL Numerical Libraries are libraries of numerical analysis functionality including ARMA and ARIMA procedures implemented in standard programming languages like C, Java, C# .NET, and Fortran.
gretl can estimate ARMA models, as mentioned here
GNU Octave extra package octave-forge supports AR models.
Stata includes the function arima. for ARMA and ARIMA models.
SuanShu is a Java library of numerical methods that implements univariate/multivariate ARMA, ARIMA, ARMAX, etc models, documented in "SuanShu, a Java numerical and statistical library".
SAS has an econometric package, ETS, that estimates ARIMA models. See details.
History and interpretations
The general ARMA model was described in the 1951 thesis of Peter Whittle, who used mathematical analysis (Laurent series and Fourier analysis) and statistical inference. ARMA models were popularized by a 1970 book by George E. P. Box and Jenkins, who expounded an iterative (Box–Jenkins) method for choosing and estimating them. This method was useful for low-order polynomials (of degree three or less).
ARMA is essentially an infinite impulse response filter applied to white noise, with some additional interpretation placed on it.
In digital signal processing, ARMA is represented as a digital filter with white noise at the input and the ARMA process at the output.
Applications
ARMA is appropriate when a system is a function of a series of unobserved shocks (the MA or moving average part) as well as its own behavior. For example, stock prices may be shocked by fundamental information as well as exhibiting technical trending and mean-reversion effects due to market participants.
Generalizations
There are various generalizations of ARMA. Nonlinear AR (NAR), nonlinear MA (NMA) and nonlinear ARMA (NARMA) model nonlinear dependence on past values and error terms. Vector AR (VAR) and vector ARMA (VARMA) model multivariate time series. Autoregressive integrated moving average (ARIMA) models non-stationary time series (that is, whose mean changes over time). Autoregressive conditional heteroskedasticity (ARCH) models time series where the variance changes. Seasonal ARIMA (SARIMA or periodic ARMA) models periodic variation. Autoregressive fractionally integrated moving average (ARFIMA, or Fractional ARIMA, FARIMA) model time-series that exhibits long memory. Multiscale AR (MAR) is indexed by the nodes of a tree instead of integers.
= Autoregressive–moving-average model with exogenous inputs (ARMAX)
=The notation ARMAX(p, q, b) refers to a model with p autoregressive terms, q moving average terms and b exogenous inputs terms. The last term is a linear combination of the last b terms of a known and external time series
d
t
{\displaystyle d_{t}}
. It is given by:
X
t
=
ε
t
+
∑
i
=
1
p
φ
i
X
t
−
i
+
∑
i
=
1
q
θ
i
ε
t
−
i
+
∑
i
=
1
b
η
i
d
t
−
i
.
{\displaystyle X_{t}=\varepsilon _{t}+\sum _{i=1}^{p}\varphi _{i}X_{t-i}+\sum _{i=1}^{q}\theta _{i}\varepsilon _{t-i}+\sum _{i=1}^{b}\eta _{i}d_{t-i}.\,}
where
η
1
,
…
,
η
b
{\displaystyle \eta _{1},\ldots ,\eta _{b}}
are the parameters of the exogenous input
d
t
{\displaystyle d_{t}}
.
Some nonlinear variants of models with exogenous variables have been defined: see for example Nonlinear autoregressive exogenous model.
Statistical packages implement the ARMAX model through the use of "exogenous" (that is, independent) variables. Care must be taken when interpreting the output of those packages, because the estimated parameters usually (for example, in R and gretl) refer to the regression:
X
t
−
m
t
=
ε
t
+
∑
i
=
1
p
φ
i
(
X
t
−
i
−
m
t
−
i
)
+
∑
i
=
1
q
θ
i
ε
t
−
i
.
{\displaystyle X_{t}-m_{t}=\varepsilon _{t}+\sum _{i=1}^{p}\varphi _{i}(X_{t-i}-m_{t-i})+\sum _{i=1}^{q}\theta _{i}\varepsilon _{t-i}.\,}
where
m
t
{\displaystyle m_{t}}
incorporates all exogenous (or independent) variables:
m
t
=
c
+
∑
i
=
0
b
η
i
d
t
−
i
.
{\displaystyle m_{t}=c+\sum _{i=0}^{b}\eta _{i}d_{t-i}.\,}
See also
Autoregressive integrated moving average (ARIMA)
Exponential smoothing
Linear predictive coding
Predictive analytics
Infinite impulse response
Finite impulse response
References
Further reading
Mills, Terence C. (1990). Time Series Techniques for Economists. Cambridge University Press. ISBN 0521343399.
Percival, Donald B.; Walden, Andrew T. (1993). Spectral Analysis for Physical Applications. Cambridge University Press. ISBN 052135532X.
Francq, C.; Zakoïan, J.-M. (2005), "Recent results for linear time series models with non independent innovations", in Duchesne, P.; Remillard, B. (eds.), Statistical Modeling and Analysis for Complex Data Problems, Springer, pp. 241–265, CiteSeerX 10.1.1.721.1754.
Shumway, R.H. and Stoffer, D.S. (2017). Time Series Analysis and Its Applications with R Examples. Springer. DOI: 10.1007/978-3-319-52452-8
Kata Kunci Pencarian:
- Analitik prediktif
- Deret waktu
- Autoregressive moving-average model
- Moving-average model
- Autoregressive integrated moving average
- Autoregressive fractionally integrated moving average
- Autoregressive model
- Moving average
- Box–Jenkins method
- Autoregressive conditional heteroskedasticity
- Linear model
- Exponential smoothing