Finance-Theory · Unit 16 · Video 3 · Interactive Practice

Estimating Means and Covariances: How Much History?

IKey Formulas

FormulaNameWhat it estimates
μ^i=1T∑t=1TRit\hat{\mu}_i = \dfrac{1}{T}\displaystyle\sum_{t=1}^{T} R_{it}Sample meanStock ii's expected return, from TT periods of history
σ^ij=1T∑t=1T(Rit−μ^i)(Rjt−μ^j)\hat{\sigma}_{ij} = \dfrac{1}{T}\displaystyle\sum_{t=1}^{T} (R_{it} - \hat{\mu}_i)(R_{jt} - \hat{\mu}_j)Sample covarianceThe average cross product: positive when the two returns sit on the same side of their means
σ^i=σ^ii\hat{\sigma}_i = \sqrt{\hat{\sigma}_{ii}}Sample standard deviationThe covariance of a stock with itself, square-rooted
ρ^ij=σ^ijσ^i σ^j\hat{\rho}_{ij} = \dfrac{\hat{\sigma}_{ij}}{\hat{\sigma}_i\,\hat{\sigma}_j}Sample correlationThe covariance rescaled to lie between −1-1 and 11

Key Insight: The hats mark estimates of parameters we never observe. You choose the weights ωi\omega_i; the data supply the μ^i\hat{\mu}_i and σ^ij\hat{\sigma}_{ij} they multiply. Portfolio theory assumes those expected returns and covariances are stable over time: it forecasts nothing and does not try to beat the market.

IIThe Covariance Averages Cross Products

Each month's cross product is positive when both stocks sit on the same side of their means; σ^GH\hat{\sigma}_{GH} averages them.

IIIHow Long a Sample?

Longer samples shrink estimation error but build in non-stationarity; the faster parameters drift, the shorter the history worth using. The curves below are an illustrative picture of that trade-off, not a fitted model: only their shapes carry meaning.

IVSame Name, Different Company

A long return series can keep one name while the company underneath it changes.

VQuiz Questions

Problem 1 · A Sample Covariance

Given: Four months of illustrative returns, in percent per month: Garnet 33, −1-1, 44, 22 and Hollis 66, 00, 22, 44. Find the sample covariance σ^GH\hat{\sigma}_{GH} (dividing by TT).

✅ Correct! The cross products 33, 99, −2-2, 00 sum to 1010, and their average over T=4T = 4 months is 2.52.5 (in %2\%^2).
❌ The means are missing. 8.58.5 is the average of RGtRHtR_{Gt} R_{Ht} itself. The covariance multiplies deviations from the means, μ^G=2\hat{\mu}_G = 2 and μ^H=3\hat{\mu}_H = 3.
❌ Average, don't just add. 1010 is the sum of the four cross products; the estimator divides it by T=4T = 4.
❌ Check the sign of month 3. Garnet is 22 above its mean while Hollis is 11 below its own: opposite sides, so that cross product is −2-2, not +2+2.
❌ Not quite. Find both means, multiply the two deviations month by month, then average.
Show solution

Means: μ^G=14(3−1+4+2)=2\hat{\mu}_G = \tfrac{1}{4}(3 - 1 + 4 + 2) = 2 and μ^H=14(6+0+2+4)=3\hat{\mu}_H = \tfrac{1}{4}(6 + 0 + 2 + 4) = 3, in percent per month.

Deviations: Garnet 11, −3-3, 22, 00; Hollis 33, −3-3, −1-1, 11.

Cross products: 1⋅3=31 \cdot 3 = 3, (−3)(−3)=9(-3)(-3) = 9, 2⋅(−1)=−22 \cdot (-1) = -2, 0⋅1=00 \cdot 1 = 0. Months 1 and 2 are same-side (positive), month 3 is opposite-side (negative), and in month 4 Garnet sits exactly at its mean.

σ^GH=14(3+9−2+0)=104=2.5 (%2)\hat{\sigma}_{GH} = \tfrac{1}{4}(3 + 9 - 2 + 0) = \tfrac{10}{4} = 2.5 \ (\%^2)

Problem 2 · Positive Returns, Negative Covariance

Given: Four months of illustrative returns, in percent per month: Garnet 33, 11, 44, 00 and Hollis 22, 66, 11, 77. Neither stock ever has a negative return. Find the sample covariance σ^GH\hat{\sigma}_{GH}.

✅ Correct! Every month one stock is above its mean while the other is below its own, so every cross product is negative.
❌ Positive returns are not "above the mean". +4+4 is what you get by averaging RGtRHtR_{Gt} R_{Ht} without subtracting the means (or by dropping the signs of the cross products). The sign of a cross product depends on which side of its own mean each return sits: μ^G=2\hat{\mu}_G = 2, μ^H=4\hat{\mu}_H = 4.
❌ Average, don't just add. −16-16 is the sum of the four cross products; divide by T=4T = 4.
❌ Not quite. Subtract each stock's mean, multiply the deviations month by month, then average over the four months.
Show solution

Means: μ^G=14(3+1+4+0)=2\hat{\mu}_G = \tfrac{1}{4}(3 + 1 + 4 + 0) = 2 and μ^H=14(2+6+1+7)=4\hat{\mu}_H = \tfrac{1}{4}(2 + 6 + 1 + 7) = 4.

Deviations: Garnet 11, −1-1, 22, −2-2; Hollis −2-2, 22, −3-3, 33. In every month the two deviations have opposite signs.

σ^GH=14[(1)(−2)+(−1)(2)+(2)(−3)+(−2)(3)]=14(−16)=−4 (%2)\hat{\sigma}_{GH} = \tfrac{1}{4}\big[(1)(-2) + (-1)(2) + (2)(-3) + (-2)(3)\big] = \tfrac{1}{4}(-16) = -4 \ (\%^2)

Both stocks earned non-negative returns every month, yet they moved in opposite directions relative to their averages. Covariance measures co-movement around the means, not whether returns are positive.

Problem 3 · From Data to Correlation

Given: Four months of illustrative returns, in percent per month: Garnet 44, 00, 33, 11 and Hollis 44, 22, 55, 11. Find the sample covariance and the sample correlation, using 1T\tfrac{1}{T} throughout.

The sample covariance σ^GH\hat{\sigma}_{GH}

The sample correlation ρ^GH\hat{\rho}_{GH}

✅ Correct! σ^GH=2\hat{\sigma}_{GH} = 2 and both standard deviations are 2.5\sqrt{2.5}, so ρ^GH=2/2.5=0.8\hat{\rho}_{GH} = 2/2.5 = 0.8.
❌ That is the sum, not the average. The four cross products are 22 each; divide their total 88 by T=4T = 4.
❌ That is a variance. 2.52.5 is σ^G2\hat{\sigma}_G^2 (and also σ^H2\hat{\sigma}_H^2): the average squared deviation of one stock, not the average cross product of the two.
❌ That is the correlation, not the covariance. 0.80.8 is σ^GH\hat{\sigma}_{GH} divided by σ^Gσ^H\hat{\sigma}_G\hat{\sigma}_H; the covariance itself is the plain average of the cross products, in %2\%^2.
❌ Not quite. Subtract the means (22 and 33), multiply the deviations month by month, and average.
❌ Divide by standard deviations, not variances. 2/(2.5×2.5)=0.322/(2.5 \times 2.5) = 0.32 uses σ^G2σ^H2\hat{\sigma}_G^2 \hat{\sigma}_H^2; the correlation divides by σ^Gσ^H=2.52.5=2.5\hat{\sigma}_G \hat{\sigma}_H = \sqrt{2.5}\sqrt{2.5} = 2.5.
❌ A correlation cannot exceed 11. 2/2.5≈1.262/\sqrt{2.5} \approx 1.26 divides by only one standard deviation; the denominator is the product σ^Gσ^H\hat{\sigma}_G \hat{\sigma}_H.
❌ Not quite. Compute each standard deviation as the square root of that stock's average squared deviation, then divide the covariance by their product.
Show solution

Means: μ^G=14(4+0+3+1)=2\hat{\mu}_G = \tfrac{1}{4}(4 + 0 + 3 + 1) = 2 and μ^H=14(4+2+5+1)=3\hat{\mu}_H = \tfrac{1}{4}(4 + 2 + 5 + 1) = 3.

Deviations: Garnet 22, −2-2, 11, −1-1; Hollis 11, −1-1, 22, −2-2.

σ^GH=14[(2)(1)+(−2)(−1)+(1)(2)+(−1)(−2)]=84=2 (%2)\hat{\sigma}_{GH} = \tfrac{1}{4}\big[(2)(1) + (-2)(-1) + (1)(2) + (-1)(-2)\big] = \tfrac{8}{4} = 2 \ (\%^2) σ^GG=14(4+4+1+1)=2.5,σ^HH=14(1+1+4+4)=2.5\hat{\sigma}_{GG} = \tfrac{1}{4}(4 + 4 + 1 + 1) = 2.5, \qquad \hat{\sigma}_{HH} = \tfrac{1}{4}(1 + 1 + 4 + 4) = 2.5

So σ^G=σ^H=2.5≈1.58%\hat{\sigma}_G = \hat{\sigma}_H = \sqrt{2.5} \approx 1.58\% per month, and

ρ^GH=σ^GHσ^G σ^H=22.5 2.5=22.5=0.8\hat{\rho}_{GH} = \frac{\hat{\sigma}_{GH}}{\hat{\sigma}_G\,\hat{\sigma}_H} = \frac{2}{\sqrt{2.5}\,\sqrt{2.5}} = \frac{2}{2.5} = 0.8

Problem 4 · A Mean That Drifted

Given: An analyst estimates Hollis's expected return from 2020 years (240240 months) of history. Illustratively, the company changed 88 years ago: its returns averaged 0.5%0.5\% per month over the first 1212 years and 1.5%1.5\% per month over the last 88, and 1.5%1.5\% per month is the expected return of the company as it is today.

The 20-year sample mean μ^H\hat{\mu}_H

Estimating from only the last 8 years instead

✅ Correct! The long sample mixes two companies and misses today's 1.5%1.5\% by 0.60.6 percentage points; the short one trades that bias for estimation error.
❌ Weight each period by its length. 12(0.5+1.5)=1.0\tfrac{1}{2}(0.5 + 1.5) = 1.0 treats the 1212-year and 88-year stretches as equally long.
❌ Check which rate goes with which stretch. 1.11.1 gives the 1.5%1.5\% rate 1212 years; it applies only to the last 88.
❌ That is the target, not the estimate. The sample mean averages all 240240 months, including the 144144 months of the old company.
❌ Not quite. The sample mean is the sum of all 240240 monthly returns divided by 240240.
❌ Backwards. Fewer observations make the estimate noisier, not exact; only T→∞T \to \infty with nothing changing would make it exact.
❌ No estimate here is a forecast. Either window estimates a parameter assumed stable over the sample; neither predicts what the market does next month.
❌ Not quite. The last 88 years cover only today's company, so this bias disappears; what changes is how many months are averaged.
Show solution

20-year mean. The first 1212 years are 144144 months at an average of 0.5%0.5\% and the last 88 years are 9696 months at 1.5%1.5\%, so the sum of all returns is 144(0.5)+96(1.5)=72+144=216144(0.5) + 96(1.5) = 72 + 144 = 216:

μ^H=216240=0.9% per month\hat{\mu}_H = \frac{216}{240} = 0.9\% \text{ per month}

Today's company has an expected return of 1.5%1.5\%, so the long sample understates it by 0.60.6 percentage points: a non-stationarity bias, because the parameter being averaged was not the same throughout the sample.

8-year window. Every month in it belongs to today's company, so this bias is gone, but the estimate rests on 9696 months instead of 240240 and so carries more estimation error. Choosing between them means taking a stand on how much the parameters drift; there is no single right length.

Solved: 0 / 4