
56 The Capital Asset Pricing Model Chap. 3
1 %C MLplot.m
2 fu nction CMLplot(tlow,thigh,tinc,alpha0,alpha1,...
3 beta0,beta2,mu,Sigma,r)
4 EF MSDplot(tlow,thigh,tinc,alpha0,alpha1,beta0,beta2);
5 ho ld on
6 n = len gth(mu); el l = ones(1,n)';
7 co eff = (mu − r
*
ell)'
*
Sigmaˆ−1
*
(mu − r
*
ell)
8 co effsqrt = coeff.ˆ0.5
9 tm = 1. /(ell'
*
Sigmaˆ−1
*
(mu − r
*
ell))
10 xm = tm
*
Sigmaˆ−1
*
(mu − r
*
ell)
11 t = t low:tinc.ˆ2:tm;
12 mup = r + t
*
coeff;
13 sigmap = t
*
coeffsqrt;
14 plot(sigmap,mup,'k')
15 t = t m:tinc.ˆ2:3
*
tm;
16 mup = r + t
*
coeff;
17 sigmap = t
*
coeffsqrt;
18 plot(sigmap,mup,'k−.')
19 mup = r + tm
*
coeff; sigmap = tm
*
coeffsqrt;
20 xlabel('Portfolio S tandard D eviation ...