-
Notifications
You must be signed in to change notification settings - Fork 9
AR(I)MA Models
We define the backshift, foreshift operators
Using that notation, an ARIMA process is then defined by
where
are respectively the differencing, auto-regressive and moving average polynomials.
We consider independent gaussian noises, i.e.
The corresponding stationary ARMA model is defined by
All the roots of
Standard ARIMA models are implemented in the class jdplus.toolkit.base.core.arima.ArimaModel
BackFilter phi=new BackFilter(Polynomial.of(1, -0.5, -0.4));
BackFilter theta=new BackFilter(Polynomial.of(1, -0.6, 0, 0, 0, 0, 0, -0.4, 0.24));
ArimaModel arma=new ArimaModel(phi, BackFilter.ONE, theta, 12.5);
System.out.println(arma);
\\ output : AR = 1.00000 - 0.500000 B - 0.400000 B^2; MA = 1.00000 - 0.600000 B - 0.400000 B^7 + 0.240000 B^8; var =12.5
The Pi-weights are generated by
and the Psi-weights are generated by
We have
The autocovariances of the process are generated by
\\ Example (cont.)
DoubleSeq pi=DoubleSeq.of(arma.getPiWeights().getWeights(10));
System.out.println(DoubleSeq.format(pi, "#.####"));
DoubleSeq psi=DoubleSeq.of(arma.getPsiWeights().getWeights(10));
System.out.println(DoubleSeq.format(psi, "#.####"));
DoubleSeq ac=DoubleSeq.of(arma.getAutoCovarianceFunction().values(20));
System.out.println(DoubleSeq.format(ac, "#.####"));
\\ output :
\\ 1 -0.1 0.35 0.135 0.2075 0.1578 0.1619 -0.256 0.1768 -0.014
\\ 16.9431 -1.0095 5.9694 2.0166 3.3436 1.1334 3.4541 -3.1196 2.8219 0.1631 1.2103 0.6704 0.8193 0.6778 0.6666 0.6044 0.5689 0.5262 0.4907 0.4558
Given a finite ACGF defined by
we want to recover the original MA polynomial. This algorithm is central in the computation of the sum/difference of ARMA models
Several solutions are available. We describe below the solution used by default and the legacy solution implemented in SEATS.
The most robust algorithm to find the roots of the ACGF consists in using its "modified" companion matrix. The roots are derived from the eigen values of that matrix.
More exactly, considering that
and that
we have, for
The eigen values of the matrix corresponds to
or can be defined recursively from
The actual roots of
Finally, it should be noted that a robust recovering of the MA polynomial needs
- a preliminary identification of the unit roots, which are often multiple
- a (Leja) re-ordering of the roots to avoid numerical instabilities.
That solution is implemented in internal.toolkit.base.core.math.linearfilters.EigenValuesDecomposer2
and is robust enough to treat long polynomials (for high-frequency series)
That solution is implemented in internal.toolkit.base.core.math.linearfilters.SymmetricFrequencyResponseDecomposer