Computing portfolio variance

By the end of this lesson, you can derive the variance of a two-asset portfolio, convert it to volatility and explain why averaging the two asset volatilities usually gives the wrong answer. You will change correlation while keeping the holdings and their individual volatilities unchanged.

Before you start: returns, averages and spread

Use simple total returns: each asset’s gain or loss including investment income, divided by its initial value. Both returns cover exactly the same one-year period, in the same currency, before fees, taxes and inflation. Assume no deposits, withdrawals or trading during that year, and include income in the terminal value. Write returns as decimals: 10% = 0.10.

E[R] is an expected return, the probability-weighted mean across possible outcomes. A deviation R − E[R] says how far one outcome lies from that mean. Variance is the expected squared deviation: Var(R) = E[(R − E[R])²]. Squaring prevents positive and negative deviations cancelling. Standard deviation σ = √Var(R), often called return volatility, converts that spread back to return units. This is the variance of a return, not the variance of a sample mean used to estimate expected return.

Covariance C = E[(RA − E[RA]) × (RB − E[RB])] uses the two returns in the same possible outcome. Correlation ρ = C ÷ (σA × σB) expresses that linear association without units when both volatilities are positive. It ranges from −1 to +1. Thus C = ρ × σA × σB. Zero correlation does not establish independence: nonlinear relationships can remain.

Step 1: write the portfolio as a weighted sum

A weight is the fraction of initial portfolio value assigned to a holding. Let wA and wB be nonnegative initial weights with wA + wB = 1; this example uses no borrowing or short positions. Portfolio return is RP = wA × RA + wB × RB. The weights are fixed initial fractions, so they are constants in this calculation. Market movements can change the ending fractions; we are not assuming continuous rebalancing to constant current weights.

Because expectations add and fixed weights can be taken outside the average, E[RP] = wA × E[RA] + wB × E[RB]. Define DA = RA − E[RA] and DB = RB − E[RB]. Subtracting the portfolio mean gives RP − E[RP] = wA × DA + wB × DB.

Step 2: square the deviation and average

Expand the square: (wA × DA + wB × DB)² = wA² × DA² + wB² × DB² + 2 × wA × wB × DA × DB. The cross-product appears twice when multiplying the sum by itself. Take the expected value of every term. The squared deviations become the asset variances; the product of deviations becomes covariance.

Therefore Var(RP) = wA² × σA² + wB² × σB² + 2 × wA × wB × C. Substituting correlation gives Var(RP) = wA² × σA² + wB² × σB² + 2 × wA × wB × ρ × σA × σB. Portfolio volatility is √Var(RP). No normal-distribution or independence assumption is needed for this identity, provided these variances exist.

Step 3: compute the equal-weight illustration

Assume wA = wB = 0.50, one-year volatilities σA = 0.10 and σB = 0.20, and correlation ρ = 0. These are chosen inputs, not historical estimates. Covariance is 0 × 0.10 × 0.20 = 0. The first contribution is 0.50² × 0.10² = 0.0025. The second is 0.50² × 0.20² = 0.0100. The cross-term is zero.

Add them: Var(RP) = 0.0025 + 0.0100 = 0.0125 decimal return squared. In percentage-point units the same calculation is 0.50² × 10² + 0.50² × 20² = 125 percentage-point-squared. Take the square root: σP = √0.0125 ≈ 0.111803 = 11.1803%, equivalently √125 ≈ 11.1803 percentage points of return. Do not read the variance 0.0125 as a 1.25% volatility.

The simple weighted average of the volatilities is 0.50 × 10% + 0.50 × 20% = 15%. It misses the way deviations combine. With these positive weights, 15% is the result for perfect positive correlation, not zero correlation.

Step 4: change how the holdings move together

Keep every illustrative input except correlation unchanged. At ρ = +1, covariance is 0.10 × 0.20 = 0.02. The cross-term is 2 × 0.50 × 0.50 × 0.02 = 0.0100. Variance becomes 0.0125 + 0.0100 = 0.0225, so volatility is √0.0225 = 0.15 = 15%. Perfect positive correlation means deviations move together proportionally; these holdings provide no volatility reduction relative to their weighted-average volatility.

At zero correlation, the lower 11.1803% spread reflects a zero covariance term; neither asset needs to be independent of the other for that calculation. A lower standard deviation does not promise a gain, limit the worst loss or describe liquidity, default or extreme-loss risk.

Check your understanding: try perfect negative correlation

Keep the same one-year volatilities and equal initial weights, but set ρ = −1. What are covariance, portfolio variance and volatility? Does perfect negative correlation make this particular portfolio’s volatility zero?

Answer: C = −1 × 0.10 × 0.20 = −0.02. The cross-term is −0.0100. Var(RP) = 0.0025 + 0.0100 − 0.0100 = 0.0025, or 25 percentage-point-squared. Volatility is √0.0025 = 0.05 = 5%. Equal weights do not cancel unequal volatility contributions: 0.50 × 20% exceeds 0.50 × 10% by 5 percentage points. Perfect negative correlation alone therefore does not give zero volatility at these weights.

Keep the calculation inside its assumptions

In practice, volatilities and correlations are estimated with uncertainty and can change, including during stress. Use paired observations, a common horizon and consistent currency, income and cost conventions. Rebalanced strategies or changing exposures require a return model matching that strategy.

The inputs here already describe one-year returns. We have not multiplied a daily or monthly volatility by a square root of time. Such conversions require additional assumptions about returns across time. This lesson establishes a variance identity, not a forecast, optimal allocation or complete account of investment risk.

General education, not investment advice. All weights, volatilities and correlations below are illustrative assumptions, not observed market data or Quantustik forecasts. This calculation does not select an allocation, predict a return or establish a safe level of risk.

Where this comes from

Frequently asked questions

Do I need expected return numbers to use this formula?

Not if the asset variances and covariance are already supplied consistently. Their definitions refer to expected returns, but those means disappear from the final formula after deviations are formed.

Is a lower variance always a better investment?

No. Variance measures spread around the mean and counts gains and losses. It leaves expected return, extreme losses, liquidity, costs and personal circumstances unresolved.

Related glossary terms

Continue this course

Investor education only — not investment advice, and never a promise of profit. Every investment can lose value.