# Cross-spectrum

In time series analysis, the cross-spectrum is used as part of a frequency domain analysis of the cross correlation or cross covariance between two time series.

## Definition

Let $(X_t,Y_t)$ represent a pair of stochastic processes that are jointly wide sense stationary with covariance functions $\gamma_{xx}$ and $\gamma_{yy}$ and cross-covariance function $\gamma_{xy}$. Then the cross spectrum $\Gamma_{xy}$ is defined as the Fourier transform of $\gamma_{xy}$ [1]

$\Gamma_{xy}(f)= \mathcal{F}\{\gamma_{xy}\}(f) = \sum_{\tau=-\infty}^\infty \,\gamma_{xy}(\tau) \,e^{-2\,\pi\,i\,\tau\,f} .$

The cross-spectrum has representations as a decomposition into (i) its real part (co-spectrum) and its imaginary part (quadrature spectrum)

$\Gamma_{xy}(f)= \Lambda_{xy}(f) + i \Psi_{xy}(f) ,$

and (ii) in polar coordinates

$\Gamma_{xy}(f)= A_{xy}(f) \,e^{i \phi_{xy}(f) } .$

Here, the amplitude spectrum $A_{xy}$ is given by

$A_{xy}(f)= (\Lambda_{xy}(f)^2 + \Psi_{xy}(f)^2)^\frac{1}{2} ,$

and the phase spectrum $\Phi_{xy}$ given by

$\begin{cases} \tan^{-1} ( \Psi_{xy}(f) / \Lambda_{xy}(f) ) & \text{if } \Psi_{xy}(f) \ne 0 \wedge \Lambda_{xy}(f) \ne 0 \\ 0 & \text{if } \Psi_{xy}(f) = 0 \text{ and } \Lambda_{xy}(f) > 0 \\ \pm \pi & \text{if } \Psi_{xy}(f) = 0 \text{ and } \Lambda_{xy}(f) < 0 \\ \pi/2 & \text{if } \Psi_{xy}(f) > 0 \text{ and } \Lambda_{xy}(f) = 0 \\ -\pi/2 & \text{if } \Psi_{xy}(f) < 0 \text{ and } \Lambda_{xy}(f) = 0 \\ \end{cases}$

## Squared coherency spectrum

The squared coherency spectrum is given by

$\kappa_{xy}(f)= \frac{A_{xy}^2}{ \Gamma_{xx}(f) \Gamma_{yy}(f)} ,$

which expresses the amplitude spectrum in dimensionless units.