Periodogram
For any given frequency $\omega$ the sample periodogram is the sample analog of the sample spectrum. In general, the periodogram is used to identify the periodic components of unknown frequency in the time series. X-13ARIMA-SEATS and TRAMO-SEATS use this tool for detecting seasonality in raw time series and seasonally adjusted series. Apart from this it is applied for checking randomness of the residuals from the ARIMA model.
To define the periodogram, first consider the vector of complex numbers1:
[1]
where $\mathbb{C}^{n}$ is the set of all column vectors with complex-valued components.
The Fourier frequencies associated with the sample size are defined as a set of values , , , , where ${\lbrack n\rbrack}$ denotes the largest integer less than or equal to $n$. The Fourier frequencies, which are called harmonics, are given by integer multiples of the fundamental frequency $\ \frac{2\pi}{n}$.
Now the $n$ vectors can be defined. Vectors are orthonormal in the sense that:
[2]
where denotes the row vector, which component is the complex conjugate of the component of .2 These vectors are a basis of , so that any can be expressed as a sum of components:
[3]
where the coefficients are derived from [3] by multiplying the equation on the left by and using [1].
The sequence of is referred as a discrete Fourier transform of $\mathbf{x}\mathbb{\in C}^{n}$ and the periodogram $I(\omega_{j})$ of $\mathbf{x}$ at Fourier frequency $\omega_{j} = \frac{2\pi j}{n}$ is defined as the square of the Fourier transform of $\mathbf{x}$:
[4]
From [2] and [3] it can be shown that in fact the periodogram decomposes the total sum of squares $\sum_{t = 1}^{n}\left| x_{t} \right|^{2}$ into a sums of components associated with the Fourier frequencies :
[5]
If $\ \mathbf{x\ \in}\ {R}^{n}$, $\omega_{j}$ and are both in and is presented in its polar form (i.e.), where $r_{j}$ is the modulus of , then [3] can be rewritten in the form:
[6]
The orthonormal basis for is , where:
is a vector composed of n elements equal to , which implies that ;
;
;
.
Equation [5] can be seen as an OLS regression of on a constant and the trigonometric terms. As the vector of explanatory variables includes elements, the number of explanatory variables in [5] is equal to the number of observations. HAMILTON, J.D. (1994) shows that the explanatory variables are linearly independent, which implies that an OLS regression yields a perfect fit (i.e. without an error term). The coefficients have the form of a simple OLS projection of the data on the orthonormal basis:
[7]
[8]
[9]
[10]
[11]
With [5] the total sum of squares $\sum_{t = 1}^{n}\left| x_{t} \right|^{2}$ can be decomposed into components corresponding to and , which are grouped to produce the “frequency ” component for . As it is shown in the table below, the value of the periodogram at the frequency $\omega_{j}$ is the contribution of the$\ j^{\text{th}}\ $harmonic to the total sum of squares $\sum_{t = 1}^{n}\left| x_{t} \right|^{2}$.
Decomposition of sum of squares into components corresponding to the harmonics
Frequency | Degrees of freedom | Sum of squares decomposition |
---|---|---|
$\omega_{0}$(mean) | 1 | |
2 | ||
2 | ||
$\omega_{n/2} = \pi$ (excluded if $n$ is odd) | 1 | |
Total |
Source: DE ANTONIO, D., and PALATE, J. (2015).
Obviously, if series were random then each component $I\left( \omega_{j} \right)\ $would have the same expectation. On the contrary, when the series contains a systematic sine component having a frequency $j$ and amplitude $A$ then the sum of squares $I\left( \omega_{j} \right)$ increases with $A$. In practice, it is unlikely that the frequency $j$ of an unknown systematic sine component would exacly match any of the frequencies, for which peridogram have been calcuated. Therefore, the periodogram would show an increase in intensities in the immediate vicinity of $j$.3
Note that in JDemetra+ the periodogram object corresponds exactly to the contribution to the sum of squares of the standardised data, since the series are divided by their standard deviation for computational reasons.
Using the decomposition presented in table above the periodogram can be expressed as:
[12]
where $j = 0,\ldots,\left\lbrack \frac{n}{2} \right\rbrack$.
Since $\mathbf{x} - \overline{\mathbf{x}}$ are generated by an orthonormal basis, and $\overline{\mathbf{x}}\mathbf{=}a_{0}\mathbf{e}_{0}$ [5] can be rearranged to show that the sum of squares is equal to the sum of the squared coefficients:
. [13]
Thus the sample variance of can be expressed as:
, [14]
where $a_{n/2}^{2}$ is excluded if $n$ is odd.
The term in [14] is then the contribution of the $j^{\text{th}}$ harmonic to the variance and [14] shows then how the total variance is partitioned.
The periodogram ordinate $I\left( \omega_{j} \right)$ and the autocovariance coefficient $\gamma(k)$ are both quadratic forms of . It can be shown that the periodogram and autocovarinace function are related and the periodogram can be written in terms of the sample autocovariance function for any non-zero Fourier frequency :4
[15]
and for the zero frequency $\ I\left( 0 \right) = n\left| \overline{x} \right|^{2}$.
Once comparing [15] with an expression for the spectral density of a stationary process:
[16]
it can be noticed that the periodogram is a sample analog of the population spectrum. In fact, it can be shown that the periodogram is asymptotically unbiased but inconsistent estimator of the population spectum $f(\omega)$.5 Therefore, the periodogram is a wildly fluctuatating, with high variance, estimate of the spectrum. However, the consistent estimator can be achieved by applying the different linear smoothing filters to the periodogram, called lag-window estimators. The lag-window estimators implemented in JDemetra+ includes square, Welch, Tukey, Barlett, Hanning and Parzen. They are described in DE ANTONIO, D., and PALATE, J. (2015). Alternatively, the model-based consistent estimation procedure, resulting in autoregressive spectrum estimator, can be applied.