# How to calculate covariance

The covariance of returns on two assets measures their co-movement.
When we consider two assets, we are concerned with the co-movement.
Determine the expected returns on assets, the deviation of possible returns from the expected return for each asset.
Determine the sum of the product of each deviation of the return of two assets and respective probability.
The covariance of any asset with itself is represented by its variance$(covar_{j,j})=\sigma&space;^{2}_{j}$. The return on the market portfolio should depend on its own risk, which is given by the variance of the market return$(\sigma&space;^{2}_{m})$.