5.
Portfolios Mathematics (Dif weights)
Variance: σ (R ) = Var(R ) = E [{R -E(R )} ] = i=1nj=1nw w Cov(R ,R )
2
P P P P
2
i j i j
o Explanation: the double sum runs over every ordered pair (i,j) including i = j; since
Cov(Ri,Ri) = Var(Ri), this one formula automatically bundles each asset's own variance
together with every pairwise covariance, each weighted by wi×wj.
o Total n variances
Explanation: these are the n diagonal terms where i = j in the double sum.
o Ex. σ (Rp) = w σ (R ) + w σ (R ) + 2w w Cov(R ,R )
2
1
2
1
2
1 2
2 2
2 1 2 1 2
Explanation: two-asset case — 2 variance terms plus one covariance term that
appears twice, because the double sum counts both (i=1,j=2) and (i=2,j=1).
o Ex. σ (Rp) = w σ (R ) + w σ (R ) + w σ (R ) + 2w w Cov(R ,R ) + 2w w Cov(R ,R ) +
2
1
2
1
2
1 2
2 2
2 3
2x 2
3 1 2 1 2 1 3 1 3
2w w Cov(R ,R )
2 2 2 3
Explanation: three-asset case — 3 variance terms + 3 unique covariance pairs,
each counted twice = 6 covariance terms, matching the n(n-1)/2 rule below (3
unique pairs × 2).
Multiple assets:
σ = σ bar 2N + N-1N Cov bar
P
2
Where σ and Cov bar are average. If N is large, σ has largest impact on variance XY
o Explanation: as N grows large, the σ̄²/N term shrinks toward 0, so portfolio variance
converges to the average covariance — the mathematical reason diversification removes
asset-specific risk but not the risk from how assets co-move.
Covariance: σ = ρσ σ = ρ σ σ = σ (R ,R ) = E [(R -ER )(R -ER )] = ρ(R ,R ) [σ(R )σ(R )]
XY X Y ij i j XY i j i i j j i j i j
o Explanation: covariance is correlation scaled by both assets' SDs, so — unlike
correlation — it has no fixed range and its size depends on how volatile the two assets
are.
o Total n(n − 1)/2 covariances
o Explanation: this counts only unique pairs; e.g. 4 assets → 4×3/2 = 6 unique
covariances, but 12 terms total in the variance formula once each is doubled.
o Shows how joint variability & co-movements of returns affect aggregate portfolio
variance, directions
o -∞ ~ ∞
o Explanation: because covariance has no fixed scale, it's hard to compare across different
asset pairs directly — correlation (a standardized version) solves this.
Positive = Returns on 2 assets on same side of expected value at the same time
Explanation: when one asset's return is above its own mean, the other
tends to be above its mean too (and both below together) — that's what
'moving together' means mathematically.
0 = Independent
Explanation: zero covariance means knowing one asset's return gives no
information about the direction of the other's return, on average.
Lower σ = more diversification benefit
XY
Explanation: since the variance formula includes +2wiwjCov(Ri,Rj), a
smaller or negative covariance directly shrinks portfolio variance,
holding weights and individual variances fixed.
** Covariance with itself: used to find SD by rooting
Explanation: Cov(Ri,Ri) = E[(Ri-ERi)²] = Var(Ri), so σi = √Cov(Ri,Ri)
— this is why the diagonal of a covariance matrix always holds each
asset's own variance.
Correlation: ρ = σ / σ σ = ρ(R ,R ) = σ (R ,R )/[σ(R )σ(R )]
XY X Y i j XY i j i j
o Explanation: correlation standardizes covariance by dividing out both SDs, giving a
unitless number that's directly comparable across any pair of assets.
o -1 ~ 1, shows strength and direction
ρ = 1 = no reduction in risk, ↑ volatility of portfolio as ↓ diversification benefits
Explanation: at ρ=1 the two assets move in perfect lockstep, so portfolio SD
becomes the simple weighted average of the individual SDs — no risk-reduction
benefit from combining them.
0 = unrelated, most diversification benefit
Explanation: at ρ=0 the covariance term drops to 0, but portfolio SD is still
below the weighted average SD, since risk doesn't compound linearly across
uncorrelated assets.
-1 = lower portfolio risk / SD, can be made Rf
Explanation: at ρ=-1 you can solve for weights so portfolio variance = 0 exactly
— set w1σ1 = w2σ2 to make the risk terms cancel, producing a synthetic riskless
combination of two risky assets.
o measures linear relationship between two random variables
o Explanation: correlation only captures linear co-movement — two variables can be
strongly related in a non-linear way and still show correlation near 0.
If σ positive, ρ positive
XY
o Explanation: since ρ = σXY/(σXσY) and SDs are always positive, the sign of ρ always
matches the sign of the covariance.
Joint probability function P(X,Y): σ (R ,R ) = ij P(R ,R ) (R -ER ) (R -ER )
XY A B A,i B,j Ai A Bj B
o Explanation: this computes covariance directly from a joint probability table, without
first needing correlation — useful when you're given a full scenario/probability grid
rather than summary statistics.
o Probability of joint occurrences of values of X and Y
o Find probability for both cases, subtract that from the percentages, multiply together,
multiply w probability
Explanation: practically — for each (X,Y) outcome pair, multiply its joint
probability by the product of each variable's deviation from its own expected
value, then sum across all pairs.
o ER = Expected return, R = Return
o Ex.
o Independence: if P(X,Y) = P(X)P(Y)
* Stronger than uncorrelated
o Explanation: independence requires the joint probability to factor exactly into the
product of the marginal probabilities for every possible outcome pair — stricter than just
having zero correlation.
o Uncorrelated: if E(XY) = E(X)E(Y)
o Explanation: uncorrelated only requires Cov = 0 (equivalently E(XY)=E(X)E(Y)); two
variables can be uncorrelated yet still dependent through a non-linear relationship —
that's why independence implies uncorrelated but not the reverse.
Worked example (2 assets):
o w1 = 0.6, w2 = 0.4, σ1 = 20%, σ2 = 25%, ρ = 0.3
o Cov(1,2) = ρσ1σ2 = 0.3 × 0.20 × 0.25 = 0.015
o σP² = w1²σ1² + w2²σ2² + 2w1w2Cov(1,2) = (0.36×0.04) + (0.16×0.0625) +
(2×0.6×0.4×0.015) = 0.0144 + 0.01 + 0.0072 = 0.0316
o σP = √0.0316 ≈ 17.78%
o Compare undiversified weighted avg SD = 0.6(20%) + 0.4(25%) = 22% →
diversification cuts risk from 22% to 17.78% since ρ < 1