Cross-spectrum of two stationary time series (source code)

= Cross-spectrum of two stationary time series
{title2=$f_{XY}(\lambda)=\frac1{2\pi}\sum_h\mathbb E[X_tY_{t+h}]e^{-ih\lambda}$}

For two real centered <time series> $X_t,Y_t$, require joint <weak stationarity>: all auto- and cross-<covariances> depend only on the time lag. Individual <weak stationarity> alone does not impose this condition on their joint behavior. With the convention $\gamma_{XY}(h)=\mathbb E[X_tY_{t+h}]$, define the <cross-spectrum> by
$$
f_{XY}(\lambda)=\frac1{2\pi}\sum_{h\in\mathbb Z}\gamma_{XY}(h)e^{-ih\lambda},\qquad -\pi\le\lambda\le\pi.
$$
Assume absolute summability of the auto- and cross-<covariance> sequences, so the displayed <Fourier series> and the two individual <spectral densities> are continuous. Reality and joint <weak stationarity> give
$$
f_{XY}(-\lambda)=\overline{f_{XY}(\lambda)},\qquad
f_{YX}(\lambda)=\overline{f_{XY}(\lambda)}.
$$
Consequently the spectral <matrix> $F(\lambda)=\left(\begin{smallmatrix}f_{XX}&f_{XY}\\f_{YX}&f_{YY}\end{smallmatrix}\right)$ is a <Hermitian matrix>. It is <positive semidefinite>, because its quadratic forms are nonnegative <spectral densities> of complex <linear combinations> of the jointly stationary series. Its nonnegative <determinant> therefore yields $|f_{XY}(\lambda)|^2\le f_{XX}(\lambda)f_{YY}(\lambda)$.

The imaginary part records directional lag information. For <white noise> $X_t$ of <variance> $v$ and $Y_t=X_{t-1}$, only $\gamma_{XY}(1)=v$ is nonzero. Hence $f_{XY}(\lambda)=ve^{-i\lambda}/(2\pi)$, although both individual <spectral densities> equal $v/(2\pi)$. The cross-spectrum is generally complex, rather than real and even like a real series' own <spectral density>.