Why Estimate Covariance From Returns?
A portfolio’s risk depends not only on the variability of each asset’s returns but also on how the assets’ returns move together. When the population distribution of returns is not known, historical observations can be used to estimate the variances and covariance needed for a portfolio-risk calculation. These are sample estimates, not known population values.
The observations must be paired: each return for one asset must correspond to the same period as the return beside it for the other asset. For example, a first asset’s January return must be paired with the second asset’s January return, not its February return. A mismatch can change the estimated covariance and therefore the portfolio-risk estimate.
Covariance has the units of return squared. If returns are recorded in percentage points, the covariance is in squared percentage points. Correlation has no units and lies between \(-1\) and \(1\). Positive covariance means that periods with above-average returns for one asset tend to coincide with above-average returns for the other; negative covariance indicates a tendency for one to be above average when the other is below average. Neither statement guarantees that every period follows the tendency.
The population covariance is defined using population means and an expectation: \(\operatorname{Cov}(R_A,R_B)=E[(R_A-\mu_A)(R_B-\mu_B)]\). It is not the same quantity as the sample estimate. Under the standard sampling model in which the paired observations are independent draws from the same joint distribution with finite second moments, \(s_{AB}\) is an unbiased estimator of population covariance. The formula does not require normally distributed returns, but the sampling assumption can be questionable for historical financial data, especially if the return-generating process changes over time.
Why the Sample Formula Uses \(n-1\)
The sample means are calculated from the same observations used to estimate covariance. Once a sample mean is fixed, the deviations from it sum to zero. Consequently, only \(n-1\) of those deviations can vary freely. Dividing the sum of cross-products by \(n-1\), rather than \(n\), corrects for the use of sample means and gives an unbiased covariance estimator under the sampling model stated above.
A short justification follows from the fact that each observation has the same expected cross-product around the true means, while subtracting the sample means removes, on average, one degree of freedom. In particular, under independent identically distributed paired observations,
Dividing by \(n-1\) therefore gives \(E[s_{AB}]=\operatorname{Cov}(R_A,R_B)\). If instead the \(n\) observations themselves are being treated as the entire population of interest, their descriptive population covariance uses divisor \(n\). The choice of divisor depends on whether the aim is to describe that fixed set or estimate a broader population covariance.
Worked Example: Estimating Covariance and Correlation
A hypothetical analyst records four matched annual returns, in percentage points, for two assets. Asset A returns are \(2,-1,3,0\), and asset B returns are \(1,-2,2,0\). Estimate their sample covariance and correlation. Assume each pair refers to the same annual period; no interest-rate or mortality assumption is involved.
Method. Calculate each sample mean, form paired deviations, and use the sample covariance and correlation formulas. The common mistake to avoid is dividing by \(n\) when the goal is to estimate population covariance from a sample.
The sample means are
The paired deviations and products are:
| Period | A deviation | B deviation | Product |
|---|---|---|---|
| 1 | \(2-1=1\) | \(1-0.25=0.75\) | 0.75 |
| 2 | \(-1-1=-2\) | \(-2-0.25=-2.25\) | 4.50 |
| 3 | \(3-1=2\) | \(2-0.25=1.75\) | 3.50 |
| 4 | \(0-1=-1\) | \(0-0.25=-0.25\) | 0.25 |
The sum of the products is \(0.75+4.50+3.50+0.25=9\). With \(n-1=3\),
For correlation, calculate the sample variances:
Thus \(s_A=\sqrt{10/3}\) and \(s_B=\sqrt{8.75/3}\), so
The covariance is positive, and the estimated correlation is strongly positive. The check is that \(0.9622\) lies within the permitted correlation range \([-1,1]\). If returns had instead been entered as decimal returns, such as \(0.02\) rather than \(2\), the covariance would be \(0.0003\) in decimal-return squared; the correlation would be unchanged.
Using Estimates in a Portfolio-Risk Calculation
For two assets with fixed portfolio weights \(w_A\) and \(w_B\), the portfolio return in each period is \(R_P=w_A R_A+w_B R_B\). The estimated variance from the paired historical sample can be calculated either directly from the portfolio returns or from the estimated component variances and covariance:
The estimated standard deviation is \(s_P=\sqrt{s_P^2}\). The weights are fractions of portfolio value; if the portfolio is fully invested in the two assets, they sum to one. The formula also applies to other fixed weights, including negative weights, provided the portfolio return is defined with those weights. It is an estimate based on the historical sample, not a guarantee of future risk.
The identity follows by centering each asset’s return on its sample mean. The centered portfolio return is \(w_A(R_A-\bar R_A)+w_B(R_B-\bar R_B)\). Squaring this expression creates two squared-return terms and a cross-product term; averaging each over the same \(n-1\) denominator yields the two sample variances and twice the sample covariance.
This equality is also a useful check: when the weights are fixed and every asset uses the same matched periods, calculating the portfolio’s sample variance directly should agree with the covariance formula, apart from rounding.
Worked Example: Estimating the Risk of an Equal-Weight Portfolio
A hypothetical fund has four matched annual return observations, in percentage points. Asset X returns \(4,0,2,-2\); asset Y returns \(1,-1,3,1\). The fund holds 50% in each asset throughout the observations. Estimate the sample covariance and portfolio standard deviation. Avoid treating the estimated quantities as known population values.
The sample means are \(\bar R_X=1\) and \(\bar R_Y=1\). The deviations are \(3,-1,1,-3\) for X and \(0,-2,2,0\) for Y. The cross-products are \(0,2,2,0\), whose sum is \(4\). Therefore,
The sample variances are
With \(w_X=w_Y=0.5\), the estimated portfolio variance is
The estimated standard deviation is \(\sqrt{3}\approx1.7321\) percentage points, rounded to four decimal places. To check directly, the four portfolio returns are \(2.5,-0.5,2.5,-0.5\), with sample mean \(1\). Their deviations are \(1.5,-1.5,1.5,-1.5\); the sum of squared deviations is \(9\), and \(9/3=3\). Both methods agree.
Negative Covariance and a Weighted Portfolio
A negative covariance reduces the cross-product term in the portfolio-variance formula when both weights are positive. This does not mean the portfolio is risk-free: the two variance terms remain, and the estimated covariance itself may differ from the future covariance. Historical observations can suggest a diversification effect, but they cannot establish that the relationship will persist.
Worked Example: Applying a Negative Covariance Estimate
A hypothetical portfolio uses 70% of asset A and 30% of asset B. Four matched annual returns, in percentage points, are A: \(2,-2,4,0\) and B: \(-1,3,0,2\). Estimate sample correlation and portfolio standard deviation. Treat the observations as a sample of paired annual returns, not as a known population.
Both sample means equal \(1\). The deviations for A are \(1,-3,3,-1\); those for B are \(-2,2,-1,1\). The cross-products are \(-2,-6,-3,-1\), summing to \(-12\). Thus
The sample variances are
The sample correlation is
For weights \(w_A=0.7\) and \(w_B=0.3\),
The estimated standard deviation is \(\sqrt{1.8867}\approx1.3736\) percentage points, rounded to four decimal places. As a direct check, the portfolio returns are \(1.1,-0.5,2.8,0.6\), with mean \(1\). Their squared deviations sum to \(0.01+2.25+3.24+0.16=5.66\), and \(5.66/3=1.8867\) after rounding. The negative covariance lowers the estimate relative to the variance terms alone, but the resulting variance remains positive.
Interpretation, Assumptions, and Common Traps
Historical covariance is informative only in relation to the observations used to estimate it. Before calculating, verify that each pair refers to the same asset-return interval and that the return definitions are comparable. For example, mixing monthly observations for one asset with quarterly observations for another does not produce meaningful paired covariance. The return frequency should also be stated, since an estimate based on monthly returns describes the variation and co-movement of those monthly observations.
A common exam trap is to confuse a sample estimate with a known population quantity. If a problem gives historical observations and asks for an estimate, use the sample means and denominator \(n-1\). If it explicitly treats the listed values as the entire population, the descriptive population covariance uses denominator \(n\). Another trap is to report covariance as though it were correlation: covariance depends on the scale in which returns are recorded, while correlation does not.
For a portfolio calculation, use covariances and variances in consistent units. If the inputs are in squared percentage points, the portfolio variance is also in squared percentage points and its square root is in percentage points. Convert returns to decimals before calculating if desired, but use the same convention for every input. Do not round intermediate means, cross-products, or estimates unnecessarily; round the final reported result.
Check Your Understanding
Use percentage points for the return data unless a question states otherwise. Each problem is hypothetical.
- Three paired returns for assets A and B are A: \(1,3,2\) and B: \(2,1,3\). Calculate the sample covariance and correlation. (Answer: \(s_{AB}=-0.5000\) percentage-points\(^2\); \(r_{AB}=-0.5000\).)
- Three paired returns are A: \(0,2,4\) and B: \(1,2,3\). Calculate both sample variances and the sample covariance, then estimate the variance and standard deviation of a portfolio invested 25% in A and 75% in B. (Answer: \(s_A^2=4\), \(s_B^2=1\), \(s_{AB}=2\), and \(s_P^2=1.5625\) percentage-points\(^2\), so \(s_P=1.2500\) percentage points.)
- For the three paired observations A: \(1,3,5\) and B: \(2,0,4\), calculate the covariance using the sample divisor and the descriptive population divisor. Explain why the answers differ. (Answer: sample covariance \(=2\) percentage-points\(^2\); population covariance \(=4/3\) percentage-points\(^2\), because the sample estimate divides by \(n-1=2\), while the population description divides by \(n=3\).)
- Suppose \(s_A^2=9\), \(s_B^2=4\), and \(s_{AB}=-3\), all in consistent squared-percentage-point units. Estimate the standard deviation of a portfolio with 40% in A and 60% in B. (Answer: \(s_P^2=0.4^2(9)+0.6^2(4)+2(0.4)(0.6)(-3)=1.44\), so \(s_P=1.2000\) percentage points.)
- Three paired returns are A: \(2,0,4\) and B: \(1,3,2\). Estimate their sample correlation and the standard deviation of a portfolio invested 25% in A and 75% in B. (Answer: \(s_A^2=4\), \(s_B^2=1\), \(s_{AB}=-1\), \(r_{AB}=-0.5000\), and \(s_P^2=0.4375\) percentage-points\(^2\), so \(s_P\approx0.6614\) percentage points.)