3.7 Portfolio Math Using Matrix Algebra
Let Ri denote the return on asset i=A,B,C and assume that RA,RB and RC are jointly normally distributed with means, variances and covariances: μi=E[Ri], σ2i=var(Ri), cov(Ri,Rj)=σij. Let xi denote the share of wealth invested in asset i (i=A,B,C), and assume that all wealth is invested in the three assets so that xA+xB+xC=1. The portfolio return, Rp,x, is the random variable: Rp,x=xARA+xBRB+xCRC. The subscript “x” indicates that the portfolio is constructed using the x-weights xA,xB and xC. The expected return on the portfolio is: μp,x=E[Rp,x]=xAμA+xBμB+xCμC, and the variance of the portfolio return is: σ2p,x=var(Rp,x)=x2Aσ2A+x2Bσ2B+x2Cσ2C+2xAxBσAB+2xAxCσAC+2xBxCσBC. Notice that variance of the portfolio return depends on three variance terms and six covariance terms. Hence, with three assets there are twice as many covariance terms than variance terms contributing to portfolio variance. Even with three assets, the algebra representing the portfolio characteristics (3.9) - (3.11) is cumbersome. We can greatly simplify the portfolio algebra using matrix notation.
Define the following 3×1 column vectors containing the asset returns and portfolio weights: R=(RARBRC), x=(xAxBxC). The probability distribution of the random return vector R is simply the joint distribution of the elements of R. Here all returns are jointly normally distributed and this joint distribution is completely characterized by the means, variances and covariances of the returns. We can easily express these values using matrix notation as follows. The 3×1 vector of portfolio expected values is: E[R]=E[(RARBRC)]=(E[RA]E[RB]E[RC])=(μAμBμC)=μ, and the 3×3 covariance matrix of returns is, var(R)=(var(RA)cov(RA,RB)cov(RA,RC)cov(RB,RA)var(RB)cov(RB,RC)cov(RC,RA)cov(RC,RB)var(RC))=(σ2AσABσACσABσ2BσBCσACσBCσ2C)=Σ. Notice that the covariance matrix is symmetric (elements off the diagonal are equal so that Σ=Σ′, where Σ′ denotes the transpose of Σ) since cov(RA,RB)=cov(RB,RA), cov(RA,RC)=cov(RC,RA) and cov(RB,RC)=cov(RC,RB).
The return on the portfolio using vector notation is: Rp,x=x′R=(xA,xB,xC)⋅(RARBRC)=xARA+xBRB+xCRC. Similarly, the expected return on the portfolio is: μp,x=E[x′R]=x′E[R]=x′μ=(xA,xB,xC)⋅(μAμBμC)=xAμA+xBμB+xCμC. The variance of the portfolio is: σ2p,x=var(x′R)=x′Σx=(xA,xB,xC)⋅(σ2AσABσACσABσ2BσBCσACσBCσ2C)(xAxBxC)=x2Aσ2A+x2Bσ2B+x2Cσ2C+2xAxBσAB+2xAxCσAC+2xBxCσBC. Finally, the condition that the portfolio weights sum to one can be expressed as: x′1=(xA,xB,xB)⋅(111)=xA+xB+xC=1, where 1 is a 3×1 vector with each element equal to 1.
Consider another portfolio with weights y=(yA,yB,yC)′. The return on this portfolio is: Rp,y=y′R=yARA+yBRB+yCRC. We often need to compute the covariance between the return on portfolio x and the return on portfolio y, cov(Rp,x,Rp,y). This can be easily expressed using matrix algebra: σxy=cov(Rp,x,Rp,y)=cov(x′R,y′R)=E[(x′R−x′μ])(y′R−y′μ)]=E[x′(R−μ)(R−μ)′y]=x′E[(R−μ)(R−μ)′]y=x′Σy. Notice that, σxy=x′Σy=(xA,xB,xC)⋅(σ2AσABσACσABσ2BσBCσACσBCσ2C)(yAyByC)=xAyAσ2A+xByBσ2B+xCyCσ2C+(xAyB+xByA)σAB+(xAyC+xCyA)σAC+(xByC+xCyB)σBC, which is quite a messy expression!