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
acf2spdfreq
(acovf[, nfreq, w])not really a method 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 invpowerspd
(n)autocovariance from spectral density 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 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 spdroots_
(arroots, maroots, 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