2. Mean and Variance
X: random variable with values x
MEAN(X) = =μX
1
n ∑
n
i=1 xi
VAR(X) = = ( −σX
2 1
n ∑
n
i=1 xi μX)2
VAR(X) = = ( − )( − )σX
2 1
n ∑
n
i=1 xi μX xi μX
2/7
3. Covariance
X: random variable with values x
Y: random variable with values y
COV(X, Y) = = = ( − )( − )σXY
2
σXY
1
n
∑n
i=1 xi μX yi μY
COV(X + Y) = + 2 ⋅ +σX
2
σXY σY
2
COV( ⋅ X + ⋅ Y) = + 2 ⋅ ⋅ ⋅ +wX wY ⋅wX
2
σX
2
wX wY σXY
⋅wY
2
σY
2
3/7
4. Matrix Algebra
2 random variables X and Y
covariance matrix
each element is
weight vector
C =
[ ]
σX
2
σXY
σXY
σY
2
σij
=ρij
σij
⋅σi σj
w =
[ ]
wX
wY
COV( ⋅ X + ⋅ Y) = ⋅ C ⋅ wwX wY wT
4/7
6. Portfolio of Assets
P is a portfolio with m assets with weights
and rates
Each asset has n return rates
[ , , . . .w1 w2 wm]T [ , , . . .r1 r2 rm]T
1 ≤ i ≤ m
= 1∑m
i=1 wi
0 ≤ ≤ 1wi
= ⋅ C ⋅ wσP
2
wT
= ⋅ rrP wT
6/7
7. Portfolio Optimization
Minimize:
Subject to:
Plot the efficient frontier varying portfolio return
rate, , from that if the lowest return asset to
the highest return asset
= ⋅ C ⋅ wσP
2
wT
= 1∑m
i=1 wi
0 ≤ ≤ 1wi
= ⋅ rr⎯⎯⎯
P wT
r⎯⎯⎯
P
7/7