Covariance

Applies to: general, python, finance

Covariance measures how two variables vary together, with units equal to the product of their units.

cov = np.mean((x-x.mean()) * (y-y.mean()))

See also: correlation, variance