Tutorials › VEE Accounting and Finance › Deriving The Two-Asset Portfolio Variance Formula

VEE Accounting and Finance · Portfolio Diversification · Tutorial 530 of 996

Deriving The Two-Asset Portfolio Variance Formula

Learn to derive and apply the two-asset portfolio variance formula, keeping weights, variances, and covariance consistent.

Intermediate 10 min read

What You'll Learn

  • Expand the variance of a weighted sum of two random returns.
  • Explain why the covariance term appears twice before combining.
  • Distinguish covariance from correlation when using portfolio inputs.
  • Apply the formula to long-only and short-position weights.
  • Verify a formula-based result against a discrete return scenario.

Why the Two-Asset Formula Includes Covariance

A portfolio’s return depends not only on how variable each asset’s return is by itself, but also on how the two returns vary together. If both assets tend to be above or below their averages at the same time, their joint movements affect portfolio risk. If one tends to be above its average when the other is below, the joint movements enter differently. The covariance term in the two-asset variance formula records this relationship.

The formula applies to returns measured over the same period, using fixed portfolio weights. The weights are constants during that period; they are not random variables that change in response to returns. The returns may have any joint distribution with finite variances. No normality assumption is needed.

Definition: Let \(R_1\) and \(R_2\) be random returns on two assets over the same period, with finite means and variances. Let \(w_1\) and \(w_2\) be fixed weights. The portfolio return is \(R_p=w_1R_1+w_2R_2\). Write \(\operatorname{Var}(R_j)=\sigma_j^2\) for asset \(j\)'s return variance and \(\operatorname{Cov}(R_1,R_2)\) for the covariance of the two returns.

For a fully invested portfolio, \(w_1+w_2=1\). That allocation condition is common but is not required for the variance formula itself. The formula also applies to weights that include a short position, provided the weights are fixed and the portfolio return is defined by the same weighted sum.

Deriving the Formula

Variance is the expected squared deviation from a variable’s mean. First, linearity of expectation gives the portfolio’s mean return:

$$ E[R_p]=w_1E[R_1]+w_2E[R_2]. $$

Subtract this mean from the portfolio return. Since the weights are constants, the deviation can be written as a weighted sum of the assets’ deviations from their own means. Squaring that sum creates two squared terms and two identical cross-products.

1
Center each return.
Let \(\mu_1=E[R_1]\) and \(\mu_2=E[R_2]\). Then \(R_p-E[R_p]=w_1(R_1-\mu_1)+w_2(R_2-\mu_2)\).
2
Square the centered portfolio return.
Expanding the square produces \(w_1^2(R_1-\mu_1)^2+2w_1w_2(R_1-\mu_1)(R_2-\mu_2)+w_2^2(R_2-\mu_2)^2\).
3
Take expectations.
The expected squared deviations are the two variances. The expected product of the centered returns is their covariance, so the cross-product contributes \(2w_1w_2\operatorname{Cov}(R_1,R_2)\).

This gives the two-asset portfolio variance formula:

$$ \operatorname{Var}(R_p) = w_1^2\sigma_1^2 + w_2^2\sigma_2^2 + 2w_1w_2\operatorname{Cov}(R_1,R_2). $$

The factor of 2 is not an extra modeling assumption. It comes from the two equal cross-products in the square: \(w_1w_2(R_1-\mu_1)(R_2-\mu_2)\) and \(w_2w_1(R_2-\mu_2)(R_1-\mu_1)\). Because multiplication is commutative, those products are equal and combine into twice one product.

When standard deviations and correlation are supplied instead of covariance, use the definition \(\operatorname{Cov}(R_1,R_2)=\rho_{12}\sigma_1\sigma_2\), where \(\rho_{12}\) is the correlation. Substitution gives an equivalent form:

$$ \operatorname{Var}(R_p) = w_1^2\sigma_1^2 + w_2^2\sigma_2^2 + 2w_1w_2\rho_{12}\sigma_1\sigma_2. $$

Do not insert correlation directly where the formula calls for covariance. Correlation is unitless, while covariance has squared-return units; the standard deviations convert correlation into covariance. Returns, variances, and covariance must also use consistent units. For example, if returns are entered as decimals, a return of 8% is \(0.08\), not \(8\).

Worked Example: Converting Correlation to Covariance

A hypothetical fund holds 60% in Asset A and 40% in Asset B for one year. The assets’ annual return standard deviations are 10% and 15%, respectively, and their return correlation is \(0.20\). Find the portfolio return variance. The joint return distribution is unspecified; assume only these finite second moments and the stated correlation. There is no separate interest-rate assumption or mortality assumption in this investment-return model.

Method. Convert the given correlation to covariance, then substitute the weights and variances into the derived formula. Use decimal returns throughout.

The weights are \(w_1=0.60\) and \(w_2=0.40\). The standard deviations in decimal units are \(\sigma_1=0.10\) and \(\sigma_2=0.15\), so the variances are:

$$ \sigma_1^2=(0.10)^2=0.0100, \qquad \sigma_2^2=(0.15)^2=0.0225. $$

Convert correlation to covariance:

$$ \operatorname{Cov}(R_1,R_2) = (0.20)(0.10)(0.15) = 0.0030. $$

Now calculate each term in the portfolio formula:

$$ w_1^2\sigma_1^2=(0.60)^2(0.0100)=0.36(0.0100)=0.0036, $$ $$ w_2^2\sigma_2^2=(0.40)^2(0.0225)=0.16(0.0225)=0.0036, $$ $$ 2w_1w_2\operatorname{Cov}(R_1,R_2) = 2(0.60)(0.40)(0.0030) = 0.48(0.0030) = 0.00144. $$

Adding the three contributions gives:

$$ \operatorname{Var}(R_p) = 0.0036+0.0036+0.00144 = 0.00864. $$

Check. The positive covariance gives a positive cross-term, as expected for positive correlation and positive weights. The reported variance is in squared decimal-return units; equivalently, it is \(86.4\) squared percentage points. The calculation avoids the common mistake of using \(0.20\) as the covariance without multiplying by both standard deviations.

Weights, Signs, and Interpretation

Each weight is squared in its asset’s standalone variance term, so a negative weight does not make that term negative. The sign of the cross-term, however, depends on the product \(w_1w_2\) and on the covariance. This matters when a portfolio includes a short position: a negative weight can make the cross-term negative even when the assets’ covariance is positive.

The formula is an identity for the variance of the weighted return, not a claim that every individual term must be positive. The two weighted variance terms are nonnegative. The covariance term can be positive, zero, or negative, but the complete expression must be nonnegative because it equals a variance. A negative cross-term therefore does not, by itself, indicate an invalid calculation.

Worked Example: A Portfolio With a Short Position

A hypothetical strategy invests 125% of its capital in Asset A and shorts Asset B at 25% of capital, giving weights \(w_1=1.25\) and \(w_2=-0.25\). For annual returns, suppose \(\sigma_1=0.20\), \(\sigma_2=0.30\), and \(\rho_{12}=0.20\). Find the portfolio variance. Assume a joint return distribution with these finite moments; no specific parametric distribution, interest rate, or mortality assumption is imposed.

Method. Compute each variance and the covariance from the supplied standard deviations and correlation, then retain the negative sign on the short weight in the cross-term.

First calculate the asset variances and covariance:

$$ \sigma_1^2=(0.20)^2=0.0400, \qquad \sigma_2^2=(0.30)^2=0.0900, $$ $$ \operatorname{Cov}(R_1,R_2) = (0.20)(0.20)(0.30) = 0.0120. $$

The first weighted variance term is:

$$ w_1^2\sigma_1^2 = (1.25)^2(0.0400) = 1.5625(0.0400) = 0.0625. $$

The second weighted variance term is:

$$ w_2^2\sigma_2^2 = (-0.25)^2(0.0900) = 0.0625(0.0900) = 0.005625. $$

The cross-term is negative because \(w_1w_2\) is negative:

$$ 2w_1w_2\operatorname{Cov}(R_1,R_2) = 2(1.25)(-0.25)(0.0120) = (-0.625)(0.0120) = -0.0075. $$

Therefore:

$$ \operatorname{Var}(R_p) = 0.0625+0.005625-0.0075 = 0.060625. $$

Check. The result is positive, as a variance must be. The covariance is \(0.0120\), which is consistent with the supplied correlation because \(0.20(0.20)(0.30)=0.0120\). The method avoids treating the short weight as positive in the cross-term or incorrectly squaring the entire portfolio expression term by term.

Checking the Formula Against Scenarios

When returns are given as a finite set of joint scenarios, the formula can be checked by calculating the portfolio return in each scenario and finding its variance directly. The scenarios must be joint: each row pairs the return on Asset A with the return on Asset B that occurs in the same state. Separate lists of asset outcomes without their pairing do not determine covariance.

Worked Example: Verifying the Formula With Three States

A hypothetical annual return model has three states. A weak state has probability 0.25, a stable state has probability 0.50, and a strong state has probability 0.25. Asset A returns 10%, 0%, and \(-10\%\) in those states; Asset B returns \(-4\%\), 2%, and 0%. A portfolio holds 40% in A and 60% in B. Find its variance using the two-asset formula, then verify it from the portfolio’s scenario returns. This fully specified discrete distribution is the model; no interest-rate or mortality assumption applies.

Method. Calculate each asset’s mean, variance, and covariance from the joint states, apply the formula, and compare with the direct portfolio scenario calculation. Use percentage points for this example, so variances and covariances are in squared percentage points.

Asset A’s expected return is:

$$ E[R_A] = 0.25(10)+0.50(0)+0.25(-10) = 2.5+0-2.5 = 0\%. $$

Asset B’s expected return is:

$$ E[R_B] = 0.25(-4)+0.50(2)+0.25(0) = -1+1+0 = 0\%. $$

Since both means are zero, the variance calculations use the weighted squared returns:

$$ \operatorname{Var}(R_A) = 0.25(10^2)+0.50(0^2)+0.25((-10)^2) = 25+0+25 = 50, $$ $$ \operatorname{Var}(R_B) = 0.25((-4)^2)+0.50(2^2)+0.25(0^2) = 4+2+0 = 6. $$

The covariance is the probability-weighted product of the returns’ deviations from their means. Both means are zero, so:

$$ \operatorname{Cov}(R_A,R_B) = 0.25(10)(-4)+0.50(0)(2)+0.25(-10)(0) = -10+0+0 = -10. $$

With \(w_A=0.40\) and \(w_B=0.60\), the formula gives:

$$ \operatorname{Var}(R_p) = (0.40)^2(50)+(0.60)^2(6)+2(0.40)(0.60)(-10) $$ $$ = 0.16(50)+0.36(6)+0.48(-10) = 8+2.16-4.8 = 5.36. $$

For the direct check, calculate the portfolio return in each state:

$$ R_{p,\text{weak}}=0.40(10)+0.60(-4)=4-2.4=1.6\%, $$ $$ R_{p,\text{stable}}=0.40(0)+0.60(2)=1.2\%, $$ $$ R_{p,\text{strong}}=0.40(-10)+0.60(0)=-4.0\%. $$

The portfolio mean is \(0.25(1.6)+0.50(1.2)+0.25(-4)=0.4+0.6-1.0=0\%\). Its direct variance is therefore:

$$ 0.25(1.6^2)+0.50(1.2^2)+0.25((-4)^2) = 0.25(2.56)+0.50(1.44)+0.25(16) $$ $$ = 0.64+0.72+4 = 5.36. $$

Check. Both methods produce \(5.36\) squared percentage points. The negative covariance is consistent with the paired state outcomes: when A’s return is high, B’s is low in the weak state, and the negative covariance contributes \(-4.8\) to portfolio variance. The calculation avoids pairing returns from different states or treating the two assets’ scenario lists as independent.

Common Exam Trap and Practical Checks

A frequent error is to omit the factor of 2 in the covariance contribution. Another is to multiply covariance by \(w_1w_2\) but forget that the expansion produces two cross-products. For instance, in the first example, the incorrect calculation would use a cross-term of \((0.60)(0.40)(0.0030)=0.00072\), giving \(0.0036+0.0036+0.00072=0.00792\). The correction is to include both cross-products: \(2(0.60)(0.40)(0.0030)=0.00144\), giving the correct variance \(0.00864\).

A second error is to confuse a standard deviation with a variance. If an asset’s standard deviation is 10%, its variance in decimal units is \((0.10)^2=0.0100\), not \(0.10\). Similarly, if the input is correlation, first convert it to covariance unless using the equivalent formula with both standard deviations explicitly included.

Before accepting a result, check that the inputs refer to the same return period and use the same units, that the weights in the cross-term retain their signs, and that the final variance is nonnegative. The formula does not require normally distributed returns, independent returns, or weights summing to one. It does require finite second moments and fixed weights during the return period.

Key takeaway: Portfolio variance is the sum of two weighted asset variances and a covariance contribution. The covariance enters with coefficient \(2w_1w_2\) because expanding the squared weighted deviation creates two equal cross-products.

Check Your Understanding

For each problem, use fixed weights and returns measured over the same period. Check that covariance and variance units are consistent.

  1. A hypothetical portfolio has weights \(0.70\) and \(0.30\), asset variances \(0.0225\) and \(0.0400\), and covariance \(0.0060\). Find the portfolio variance. (Answer: \(0.017145\))
  2. A portfolio has weights \(0.25\) and \(0.75\), asset variances \(0.0100\) and \(0.0625\), and covariance \(-0.0050\). Find the portfolio variance, retaining the negative covariance. (Answer: \(0.03390625\))
  3. Two assets have standard deviations \(0.08\) and \(0.12\), and correlation \(-0.25\). A portfolio invests equally in them. Find the covariance and then the portfolio variance. (Answer: covariance \(=-0.0024\); variance \(=0.0040\))
  4. A strategy has weights \(1.20\) and \(-0.20\). Its assets have variances \(0.0256\) and \(0.0625\), and covariance \(0.0160\). Find the portfolio variance and explain the sign of the cross-term. (Answer: variance \(=0.031684\); the cross-term is negative because the weights have opposite signs.)
  5. In two equally likely states, Asset A returns 6% and \(-2\%\), while Asset B returns \(-1\%\) and 3%, respectively. A portfolio holds 50% in each asset. Find the two asset means, variances, covariance, and portfolio variance using percentage points. (Answer: means \(2\%\) and \(1\%\); variances \(16\) and \(4\); covariance \(=-8\); portfolio variance \(=1\) squared percentage point.)
Clinical Biostats