statsmodels.sandbox.tsa.fftarma.ArmaFft

class statsmodels.sandbox.tsa.fftarma.ArmaFft(ar, ma, n)[source]

fft tools for arma processes

This class contains several methods that are providing the same or similar returns to try out and test different implementations.

Notes

TODO: check whether we don’t want to fix maxlags, and create new instance if maxlag changes. usage for different lengths of timeseries ? or fix frequency and length for fft

check default frequencies w, terminology norw n_or_w

some ffts are currently done without padding with zeros

returns for spectral density methods needs checking, is it always the power spectrum hw*hw.conj()

normalization of the power spectrum, spectral density: not checked yet, for example no variance of underlying process is used

Methods

acf([lags]) Theoretical autocorrelation function of an ARMA process
acf2spdfreq(acovf[, nfreq, w]) not really a method just for comparison, not efficient for large n or long acf
acovf([nobs]) Theoretical autocovariance function of ARMA process
arma2ar([lags])
arma2ma([lags])
fftar([n]) Fourier transform of AR polynomial, zero-padded at end to n
fftarma([n]) Fourier transform of ARMA polynomial, zero-padded at end to n
fftma(n) Fourier transform of MA polynomial, zero-padded at end to n
filter(x) filter a timeseries with the ARMA filter
filter2(x[, pad]) filter a time series using fftconvolve3 with ARMA filter
from_coeffs([arcoefs, macoefs, nobs]) Convenience function to create ArmaProcess from ARMA representation
from_estimation(model_results[, nobs]) Convenience function to create an ArmaProcess from the results of an ARMA estimation
generate_sample([nsample, scale, distrvs, …]) Simulate an ARMA
impulse_response([leads]) Get the impulse response function (MA representation) for ARMA process
invertroots([retnew]) Make MA polynomial invertible by inverting roots inside unit circle
invpowerspd(n) autocovariance from spectral density
pacf([lags]) Partial autocorrelation function of an ARMA process
pad(maxlag) construct AR and MA polynomials that are zero-padded to a common length
padarr(arr, maxlag[, atend]) pad 1d array with zeros at end to have length maxlag function that is a method, no self used
periodogram([nobs]) Periodogram for ARMA process given by lag-polynomials ar and ma
plot4([fig, nobs, nacf, nfreq])
spd(npos) raw spectral density, returns Fourier transform
spddirect(n) power spectral density using padding to length n done by fft
spdmapoly(w[, twosided]) ma only, need division for ar, use LagPolynomial
spdpoly(w[, nma]) spectral density from MA polynomial representation for ARMA process
spdroots(w) spectral density for frequency using polynomial roots
spdshift(n) power spectral density using fftshift

Attributes

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