class statsmodels.tsa.arima_process.ArmaProcess(ar, ma, nobs=100)[source]

Represent an ARMA process for given lag-polynomials

This is a class to bring together properties of the process. It does not do any estimation or statistical analysis.


ar : array_like, 1d

Coefficient for autoregressive lag polynomial, including zero lag. See the notes for some information about the sign.

ma : array_like, 1d

Coefficient for moving-average lag polynomial, including zero lag

nobs : int, optional

Length of simulated time series. Used, for example, if a sample is generated. See example.


As mentioned above, both the AR and MA components should include the coefficient on the zero-lag. This is typically 1. Further, due to the conventions used in signal processing used in signal.lfilter vs. conventions in statistics for ARMA processes, the AR paramters should have the opposite sign of what you might expect. See the examples below.


>>> import numpy as np
>>> np.random.seed(12345)
>>> arparams = np.array([.75, -.25])
>>> maparams = np.array([.65, .35])
>>> ar = np.r_[1, -ar] # add zero-lag and negate
>>> ma = np.r_[1, ma] # add zero-lag
>>> arma_process = sm.tsa.ArmaProcess(ar, ma)
>>> arma_process.isstationary
>>> arma_process.isinvertible
>>> y = arma_process.generate_sample(250)
>>> model = sm.tsa.ARMA(y, (2, 2)).fit(trend='nc', disp=0)
>>> model.params
array([ 0.79044189, -0.23140636,  0.70072904,  0.40608028])


acf([nobs]) theoretical autocorrelation function of an ARMA process
acovf([nobs]) theoretical autocovariance function of ARMA process
from_coeffs(arcoefs, macoefs[, nobs]) Create ArmaProcess instance from coefficients of the lag-polynomials
from_estimation(model_results[, nobs]) Create ArmaProcess instance from ARMA estimation results
generate_sample([nsample, scale, distrvs, ...]) generate ARMA samples
impulse_response([nobs]) get the impulse response function (MA representation) for ARMA process
invertroots([retnew]) make MA polynomial invertible by inverting roots inside unit circle
pacf([nobs]) partial autocorrelation function of an ARMA process
periodogram([nobs]) periodogram for ARMA process given by lag-polynomials ar and ma


arroots Roots of autoregressive lag-polynomial
isinvertible Arma process is invertible if MA roots are outside unit circle
isstationary Arma process is stationary if AR roots are outside unit circle
maroots Roots of moving average lag-polynomial