Asset Markets

Hal Varian
January 1992

Mean-Variance Frontier

Let's start out by deriving the mean-variance frontier used in the text.  We want to minimize variance subject to the constraint that we have a portfolio and that it has a given return.  If there are two risky assets, we have the following means and variances

var[x1_,x2_,s11_,s12_,s22_] := x1^2 s11 + 2 x1 x2 s12 + x2^2 s22
ER[x1_,x2_,R1_,R2_] := x1 R1 + x2 R2
L = var[x1,x2,s11,s12,s22] - lambda*(ER[x1,x2,R1,R2] - Rp) - 
   mu*(x1  + x2  - 1)

solution=Simplify[
		  Solve[{D[L,x1]==0,D[L,x2]==0,D[L,lambda]==0,D[L,mu]==0},
		        {x1,x2,lambda,mu}]][[1]]
portfolioVariance[Rp_,R1_,R2_,s11_,s12_,s22_] := 
     Evaluate[var[x1,x2,s11,s12,s22]/.solution]
portfolioVariance[Rp,R1,R2,s11,s12,s22]

Now let's plot the return and variance.  We use ParametricPlot.

ParametricPlot[{portfolioVariance[Rp,0.10,0.15,0.5,0.2,0.4],Rp},
                {Rp,-0.1,0.35},AxesOrigin->{0,0}]

In mean-standard-deviation space, the plot looks like this:

ParametricPlot[{Sqrt[portfolioVariance[Rp,0.10,0.15,0.5,0.2,0.4]],Rp},
                {Rp,-0.1,0.35},AxesOrigin->{0,0}]