## 1.8.2 The Spectra of Linear Filters and of ARMA ModelsIn this section we will derive the spectrum of a filtered process and of an ARMA process from the definitions given in Section 1.8.1. We will assume that the appropriate transformations have been made to render the process under consideration zero-mean and stationary. ### Spectrum of a Linear Filtered ProcessWe have introduced the concept of a time-invariant linear filter in Section 1.4. Now we want to look at the effect of filtering on the spectrum of a process. Let {Y_{t}} be a stationary, zero-mean process with spectrum f_{Y}() and X_{t}=_{j}Y_{t-j}. The (constant) filter weights {_{j}} satisfy _{j}<. Using the definitions of covariance function and ( 8.1), it is straightforward to show that the spectrum of the filtered process {X_{t}} is given by So if {X_{t}} is the process obtained from application of a linear filter of weights {_{j}} on {Y_{t}}, the spectrum of {X_{t}} is simply the spectrum of {Y_{t}} multiplied by the weight function (e^{-i})^{2}, where (e^{-i})=_{j}e^{-ij} is called the transfer function of the filter and the squared modulus (e^{-i})^{2}=T() the power transfer function of the filter. Note (e^{-i}) is also called the frequency response function, and some authors refer to (e^{-i})^{2} as the transfer function.
As an exercise let us write a little program to calculate the power transfer function T() of a given linear filter. We assume that only a finite number of filter weights are nonzero ( i.e., _{j}=0 for j larger than a positive number M). With this assumption, as we have pointed out before, we can always treat a linear filter as a causal (or one-sided) one ( i.e., _{j}=0 for j<0) since doing so only amounts to a "time shifting" in time domain or an extra phase factor in the transfer function, and it leaves the power transfer function invariant. Therefore, the filter weights can be input in the form "weight"={_{0}, _{1}, _{2}, ... , _{M}}. The transfer function for a list of weights weight can be defined as Table[E^(-I j),{j, 0, Length[weight] - 1}].weight Calling the expression for the transfer function tf, the power transfer function can be defined as tf * (tf /. a_Complex -> Conjugate[a]) Using the above two lines, we can define a Mathematica function called powertransferfunction, which computes (e^{-i})^{2} given the filter weights {_{j}} and the frequency variable as arguments. A simple moving average of order M is a linear filter of weights _{j}=1/M for j=0, 1, ... , M-1 and _{j}=0 otherwise. We use the function defined above to find the power transfer function of the simple moving average filter of order 5. Out[3]= | |
Out[4]= | |
The power transfer function of the filter has a maximum at =0 and is rather small at "high" frequencies. Since the spectrum of the filtered process is the original spectrum multiplied by this function, we see that the effect of the moving average is to suppress the high frequency (short time) part of the spectrum in the original process and retain the low frequency (long time) spectrum. The kind of filter is called a low-pass filter. This is why we can use the moving average to eliminate short time fluctuations and, thus, estimate long-term trends. ### Spectrum of an MA("q") ProcessAn MA( q) process can be thought of as a white noise process {Z_{t}} passed through a linear filter of weights {1, _{1}, _{2}, ... , _{q}}. From ( 8.3) an MA( q) process has the spectrum where f_{Z}()=^{2}/(2) is the white noise spectrum, and (x) is the usual MA polynomial ( ( ^{-})=1+ _{1}^{-}+ _{2}^{-2}+...+ _{q}^{-q }). To get the spectrum of an MA process we can use the function Spectrum. Spectrum[model, ] gives the spectrum of an ARMA type of model as a function of frequency and its code resembles the above demonstration program. (We can also obtain the same MA spectrum by finding the power transfer function and multiplying it by the white noise spectrum.) Out[5]= | |
We see that the spectrum of an MA(1) process is the otherwise flat white noise spectrum multiplied by a weight function (power transfer function), which depends on . Since cos is monotonically decreasing for in [ 0, ], as the frequency increases f() decreases for positive _{1} and increases for negative _{1}. Also since the covariance function at lag 1, (1), is _{1}, a negative _{1} can cause the series to fluctuate rapidly and we expect large contributions to the variance at high frequencies. This is indeed the case as we see in the following graph. Out[6]= | |
As an exercise we can plot spectra of different MA models just to develop some intuition. For example, let us find and plot the spectrum for an MA(2) model with _{1}=-0.5 and _{2}=0.9. Out[8]= | |
### Spectra of AR("p") and ARMA("p", "q") ProcessesSimilarly, using ( 8.3) and writing Z_{t}=(B)X_{t}, the spectrum of an AR( p) process is simply given by f_{Z}()=(e^{-i})^{2}f_{X}() or where (x) is the usual AR polynomial. ( 1/(e^{-i})^{2} is the power transfer function of the linear filter of weights {_{j}} where X_{t}=_{j}Z_{t-j}.) Out[9]= | |
Again the power spectrum is monotonic in and, depending on the sign of _{1}, the power is concentrated at either low or high frequencies. For _{1}=0.7 and ^{2}=1 we plot the spectrum. Out[10]= | |
In general the spectrum of an AR( p) process is not monotonic and depending on the signs of the AR coefficients the spectrum can assume different shapes. Out[12]= | |
This is often called a rational spectrum. AR and MA spectra are special cases of this spectrum when (x)=1 and (x)=1, respectively. Out[13]= | |
Note that the noise variance has been set to 1. The values of _{1} and _{1} determine the shape of the spectrum. Out[14]= | |
Consider the model (1-_{1}B)(1-_{1}B^{6})X_{t}=Z_{t}. It has the following spectrum. Out[15]= | |
Out[16]= | |
We have used the option Ticks -> {{0, /3, 2/3, }, Automatic}, which yields tick marks at specified points along the abscissa and puts them automatically along the ordinate.
This multiplicative seasonal process can be thought of as two successive linear filters being applied to a white noise process, and the spectrum is the product of the two corresponding power transfer functions and the white noise spectrum. The seasonal part of the spectrum has an dependence through cos6. Since cos6=1 for =0, /3, 2/3, and , the seasonal part of the spectrum reaches its maximum value at these frequencies for _{1}>0. This spectrum is again weighted by the monotonically decreasing ordinary AR spectrum resulting in the final shape of the spectrum we see above. |