The sample cross covariance function is an
estimate of the covariance between two time series, *y*_{1t} and *y*_{2t},
at lags *k* = 0, ±1, ±2,....

For data pairs (*y*_{11},*y*_{21}),
(*y*_{12},*y*_{22}),...,(*y*_{1T},*y*_{2T}),
an estimate of the lag *k* cross-covariance is

$${c}_{{y}_{1}{y}_{2}}(k)=\{\begin{array}{c}\frac{1}{T}{\displaystyle \sum}_{t=1}^{T-k}\left({y}_{1t}-{\overline{y}}_{1}\right)\left({y}_{2,t+k}-{\overline{y}}_{2}\right);\text{\hspace{0.17em}}k=0,1,2,\dots \\ \frac{1}{T}{\displaystyle \sum}_{t=1}^{T+k}\left({y}_{2t}-{\overline{y}}_{2}\right)\left({y}_{1,t-k}-{\overline{y}}_{1}\right);\text{\hspace{0.17em}}k=0,-1,-2,\dots \end{array},$$

where $${\overline{y}}_{1}$$ and $${\overline{y}}_{2}$$ are the sample means of the
series.

The sample standard deviations of the series are:

$${s}_{{y}_{1}}=\sqrt{{c}_{{y}_{1}{y}_{1}}(0)},$$ where $${c}_{{y}_{1}{y}_{1}}(0)=Var({y}_{1}).$$

$${s}_{{y}_{2}}=\sqrt{{c}_{{y}_{2}{y}_{2}}(0)},$$ where $${c}_{{y}_{2}{y}_{2}}(0)=Var({y}_{2}).$$

An estimate of the cross-correlation is

$${r}_{{y}_{1}{y}_{2}}(k)=\frac{{c}_{{y}_{1}{y}_{2}}(k)}{{s}_{{y}_{1}}{s}_{{y}_{2}}};\text{\hspace{0.17em}}k=0,\pm 1,\pm 2,\dots \text{.}$$