12.1 Portfolios with N Risky Assets
Consider a portfolio with N risky assets, where N can be a large number (e.g., N=1,000). Let Ri (i=1,…,N) denote the simple return on asset i (over some fixed time horizon such as one year) and assume that the constant expected return (GWN) model holds for all assets: Ri∼GWN(μi,σ2i),cov(Ri,Rj)=σij.
Let xi denote the share of wealth invested in asset i (i=1,…,N), and assume that all wealth is invested in the N assets so that ∑Ni=1xi=1. Assume that short sales are allowed so that some values of xi can be negative. The portfolio return, Rp,x, is the random variable Rp,x=∑Ni=1xiRi. The subscript “x” indicates that the portfolio is constructed using the “x-weights” x1,x2,…,xN. The expected return on the portfolio is: μp,x=N∑i=1xiμi, and the variance of the portfolio return is: σ2p,x=N∑i=1x2iσ2i+2N∑i=1∑j≠ixixjσij. Notice that variance of the portfolio return depends on N variance terms and N(N−1) covariance terms. Hence, with N assets there are many more covariance terms than variance terms contributing to portfolio variance. For example, with N=100 there are 100 variance terms and 100×99=9900 covariance terms. With N assets, the algebra representing the portfolio return and risk characteristics is cumbersome, especially for the variance. We can greatly simplify the portfolio algebra using matrix notation, and this was previewed in Chapter 3.
12.1.1 Portfolio return and risk characteristics using matrix notation
Define the following N×1 column vectors containing the asset returns and portfolio weights: R=(R1⋮RN), x=(x1⋮xN). In matrix notation we can lump multiple returns in a single vector which we denote by R. Since each of the elements in R is a random variable we call R a random vector. The probability distribution of the random vector R is simply the joint distribution of the elements of R. In the GWN model 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 N×1 vector of portfolio expected values is: E[R]=E[(R1⋮RN)]=(E[R1]⋮E[RN])=(μ1⋮μN)=μ, and the N×N covariance matrix of returns is:
var(R)=(var(R1)cov(R1,R2)⋯cov(R1,RN)cov(R1,R2)var(R2)⋯cov(R2,RN)⋮⋮⋱⋮cov(R1,RN)cov(R2,RN)⋯var(RN))=(σ21σ12⋯σ1Nσ12σ22⋯σ2N⋮⋮⋱⋮σ1Nσ2N⋯σ2N)=Σ.
Notice that the covariance matrix is symmetric (elements off the diagonal are equal so that Σ=Σ′, where Σ′ denotes the transpose of Σ) since cov(Ri,Rj)=cov(Rj,Ri) for i≠j. It will be positive definite provided no pair of assets is perfectly correlated (|ρij|≠1 for all i≠j) and no asset has a constant return (σ2i>0 for all i) .
The return on the portfolio using matrix notation is: Rp,x=x′R=(x1,⋯,xN)⋅(R1⋮RN)=x1R1+⋯+xNRN. Similarly, the expected return on the portfolio is: μp,x=E[x′R]=x′E[R]=x′μ=(x1,…,xN)⋅(μ1⋮μN)=x1μ1+⋯+xNμN. The variance of the portfolio is: σ2p,x=var(x′R)=x′Σx=(x1,…,xN)⋅(σ21⋯σ1N⋮⋱⋮σ1N⋯σ2N)(x1⋮xN)=N∑i=1x2iσ2i+2N∑i=1∑j≠ixixjσij. The condition that the portfolio weights sum to one can be expressed as: x′1=(x1,…,xN)⋅(1⋮1)=x1+⋯+xN=1, where 1 is a N×1 vector with each element equal to 1.
Consider another portfolio with weights y=(y1,…,yN)′≠x. The return on this portfolio is Rp,y=y′R. Later on we will need to compute the covariance between the return on portfolio x and the return on portfolio y, cov(Rp,x,Rp,y). Using matrix algebra, this covariance can be computed as: σxy=cov(Rp,x,Rp,y)=cov(x′R,y′R)=x′Σy=(x1,…,xN)⋅(σ21⋯σ1N⋮⋱⋮σ1N⋯σ2N)(y1⋮yN).
To illustrate portfolio calculations in R, table 12.1 gives example values on monthly means, variances and covariances for the simple returns on Microsoft, Nordstrom and Starbucks stock based on sample statistics computed over the five-year period January, 1995 through January, 2000. The risk-free asset is the monthly T-Bill with rate rf=0.005.
+———+———+————+————-+————-+————-+————-+ |Asset i|μi|σi| Pair (i,j) | | |σij| +=========+=========+============+=============+=============+=============+=============+ | MSFT | 0.0427 | 0.1000 | (MSFT,NORD) | | | 0.0018 | +———+———+————+————-+————-+————-+————-+ | NORD | 0.0015 | 0.1044 | (MSFT,SBUX) | | | 0.0011 | +———+———+————+————-+————-+————-+————-+ | SBUX | 0.0285 | 0.1411 | (NORD,SBUX) | | | 0.0026 | +———+———+————+————-+————-+————-+————-+ | T-Bill | 0.005 | 0 |(T-Bill,MSFT)|(T-Bill,NORD)|(T-Bill,SBUX)| 0 | +———+———+————+————-+————-+————-+————-+ Table: (#tab:Table-ThreeAssetExample) Three asset example data.
The example data in matrix notation is:
μ=(μMSFTμNORDμSBUX)=(0.04270.00150.0285),Σ=(var(RMSFT)cov(RMSFT,NORD)cov(RMSFT,SBUX)cov(RMSFT,NORD)var(RNORD)cov(RNORD,SBUX)cov(RMSFT,SBUX)cov(RNORD,SBUX)var(RSBUX))=(0.01000.00180.00110.00180.01090.00260.00110.00260.0199).
In R, the example data is created using:
c("MSFT", "NORD", "SBUX")
asset.names <- c(0.0427, 0.0015, 0.0285)
mu.vec =names(mu.vec) = asset.names
matrix(c(0.0100, 0.0018, 0.0011,
sigma.mat =0.0018, 0.0109, 0.0026,
0.0011, 0.0026, 0.0199),
nrow=3, ncol=3)
dimnames(sigma.mat) = list(asset.names, asset.names)
0.005 r.f=
The values of μi and σi (i=MSFT,NORD,SBUX) are shown in Figure 12.1, created with:
sqrt(diag(sigma.mat))
sd.vec = 1.5
cex.val =plot(sd.vec, mu.vec, ylim=c(0, 0.06), xlim=c(0, 0.20),
ylab=expression(mu[p]), xlab=expression(sigma[p]),
pch=16, col="blue", cex=cex.val, cex.lab=1.5)
text(sd.vec, mu.vec, labels=asset.names, pos=4, cex = cex.val)
text(0, r.f, labels=expression(r[f]), pos=4, cex = cex.val)

Figure 12.1: Risk-return characteristics of example data.
Clearly, Microsoft provides the best risk-return trade-off (i.e., has the highest Sharpe ratio) and Nordstorm provides with worst.
◼
Consider an equally weighted portfolio with xMSFT=xNORD=xSBUX=1/3. This portfolio has return Rp,x=x′R where x=(1/3,1/3,1/3)′. Using R, the portfolio mean and variance are:
rep(1,3)/3
x.vec =names(x.vec) = asset.names
sum(x.vec)
## [1] 1
crossprod(x.vec,mu.vec)
mu.p.x = t(x.vec)%*%sigma.mat%*%x.vec
sig2.p.x = sqrt(sig2.p.x)
sig.p.x = mu.p.x
## [,1]
## [1,] 0.0242
sig.p.x
## [,1]
## [1,] 0.0759
Next, consider another portfolio with weight vector y=(yMSFT,yNORD,ySBUX)′=(0.8,0.4,−0.2)′ and return Rp,y=y′R. The mean and volatility of this portfolio are:
c(0.8, 0.4, -0.2)
y.vec =names(y.vec) = asset.names
crossprod(y.vec,mu.vec)
mu.p.y = t(y.vec)%*%sigma.mat%*%y.vec
sig2.p.y = sqrt(sig2.p.y)
sig.p.y = mu.p.y
## [,1]
## [1,] 0.0291
sig.p.y
## [,1]
## [1,] 0.0966
The covariance and correlation between Rp,x and Rp,y are:
t(x.vec)%*%sigma.mat%*%y.vec
sig.xy = sig.xy/(sig.p.x*sig.p.y)
rho.xy = sig.xy
## [,1]
## [1,] 0.00391
rho.xy
## [,1]
## [1,] 0.533
The return and risk characteristics of the three assets together with portfolios x and y are illustrated in Figure 12.2. Notice that the equally weighted portfolio, portfolio x, has the smallest volatility.

Figure 12.2: Risk-return characteristics of example data and portfolios with weight vectors x=(0.333,0.333,0.333)′ and y=(0.8,0.4,−0.2)′.
◼
Figure 12.2 shows that the risk-return points associated with portfolios of three assets do not fall nicely on a bullet-shaped line, as they do with two asset portfolios. In fact, the set of risk-return points generated by varying the three portfolio weights is a solid area. To see this, consider creating a set of 200 randomly generated three-asset portfolios whose weights sum to one:
set.seed(123)
runif(200, min=-1.5, max=1.5)
x.msft = runif(200, min=-1.5, max=1.5)
x.nord = 1 - x.msft - x.nord
x.sbux =head(cbind(x.msft, x.nord, x.sbux))
## x.msft x.nord x.sbux
## [1,] -0.637 -0.7838 2.4211
## [2,] 0.865 1.3871 -1.2520
## [3,] -0.273 0.3041 0.9690
## [4,] 1.149 0.0451 -0.1941
## [5,] 1.321 -0.2923 -0.0291
## [6,] -1.363 1.1407 1.2226
Figure 12.3 shows the means and volatilities, as grey dots, of these 200 random portfolios of the three assets. Notice that the grey dots outline a bullet-shaped area (Markowitz bullet) that has an outer boundary that looks like the line characterizing the two-asset portfolio frontier. If we let the number of random portfolios get very large then the grey dots will fill in a solid area. At the tip of the Markowitz bullet is the minimum variance portfolio.
Recall the definition of a mean-variance efficient portfolio given in Chapter 11. For a fixed volatility σp,0 the efficient portfolio is the one with the highest expected return. From Figure 12.3, we can see that efficient portfolios will lie on the outer boundary (above the minimum variance portfolio at the tip of the Markowitz bullet) of the set of feasible portfolios.

Figure 12.3: Risk-return characteristics of 200 random portfolios of three assets.
◼
12.1.2 Large portfolios and diversification
One of the key benefits of forming large portfolios is risk reduction due to portfolio diversification. Generally, a diversified portfolio is one in which wealth is spread across many assets.
To illustrate the impact of diversification on the risk of large portfolios, consider an equally weighted portfolio of N risky assets where N is a large number (e.g., N>100). Here, xi=1/N and the N×1 portfolio weight vector is x=(1/N,1/N,…,1/N)′=(1/N)(1,1,…,1)′=(1/N)1 where 1 is an N×1 vector of ones. Let the N×1 return vector R be described by the GWN model so that R∼N(μ,Σ). The portfolio return is Rp,x=x′R=(1/N)1′R=(1/N)∑Ni=1Ri. The variance of this portfolio is: var(Rp,x)=var(x′R)=var(1N1′R)=1N21′Σ1. Now, 1′Σ1=(11…1)′(σ21σ12…σ1Nσ12σ22…σ2N⋮⋮⋱⋮σ1Nσ2N…σ2N)(11⋮1)= sum of all elements in Σ. As a result, we can write: 1′Σ1=N∑i=1σ2i+∑j≠iσij, which is the sum of the N diagonal variance terms plus the N(N−1) off-diagonal covariance terms. Define the average variance as the average of the diagonal terms of Σ: ¯var=1NN∑i=1σ2i, and the average covariance as the average of the off-diagonal terms of Σ: ¯cov=1N(N−1)∑j≠iσij. Then 1′Σ1=N¯var+N(N−1)¯cov and var(Rp,x) reduces to: var(Rp,x)=1N21′Σ1=1N¯var+N(N−1)N2¯cov=1N¯var+(1−1N)¯cov. If N is reasonably large (e.g. N>100) then 1N¯var≈0and1N¯cov≈0, so that var(Rp,x)≈¯cov. Hence, in a large diversified portfolio the portfolio variance is approximately equal to the average of the pairwise covariances. So what matters for portfolio risk is not the individual asset variances but rather the average of the asset covariances. In particular, portfolios with highly positively correlated returns will have higher portfolio variance than portfolios with less correlated returns.
Equation (12.1) also shows that portfolio variance should be a decreasing function of the number of assets in the portfolio, and that this function should level off at ¯cov for large N.