modeling multiple securities. downloads today’s work is in: matlab_lec06.m functions we need...
TRANSCRIPT
Modeling Multiple Securities
Downloads
Today’s work is in: matlab_lec06.m
Functions we need today: crosssection.m
Diversification (no aggregate risk)
Lets create a large number of uncorrelated securities, then form portfolios
R(t,i)=µ(i)+σ(i)*x(t,i) We will see that by forming a large
enough portfolio, we can diversify away all risk
>>N=500; T=1000;>>mui=ones(1,N)*1.15;>>sigmai=.1+.55*rand(1,N);
Diversification (no aggregate risk)
>>for i=1:N; R(:,i)=mui(i)+sigmai(i)*randn(T,1); end;>>for i=2:N; P=mean(R(:,1:i)')'; portstd(i)=std(P); end;>>plot(portstd,'b'); hold on;
Diversification (with aggregate risk)
Now lets add a systematic element to the risk
R(t,i)=µ(i)+σ(i)*x(t,i)+βM*y(t) You can diversify away all idiosyncratic
risk, but not the aggregate risk>>N=500; T=1000;>>mui=ones(1,N)*1.15;>>sigmai=.1+.25*rand(1,N);>>betaM=ones(1,N); Y=.16*randn(T,1);
Diversification (with aggregate risk)
>>for i=1:N; RA(:,i)=mui(i)+sigmai(i)*randn(T,1)+betaM(i)*Y; end;>>for i=2:N; P=mean(RA(:,1:i)')'; portstdA(i)=std(P); end;>>plot(portstdA, 'r'); hold off; In the second case, individual securities are
rigged to be less volatile than in the first case Nevertheless, portfolio volatilities in the first
case are close to zero, in second case, above 16%!
Correlation of Securities
Many securities are correlated
This includes within industry (ie BT and O2), between industry (ie BT and BP), domestic, as well as international (ie BT and Ford)
Oftentimes we can narrow down the correlation to a small number of factors
This correlation represents aggregate risk
Correlation and Diversification
You cannot diversify away systematic correlation!
1000 uncorrelated securities, each with annual vol 30%; an equal weighted portfolio will have vol 0%
1000 perfectly correlated securities, each with annual vol 30%; equal weighted portfolio will have vol 30%!
Estimating correlation is extremely important for portfolio management but we are bad at it
This problem is more extreme during extreme times
Factor Models
There is a small number of relevant factors, ie F1 and F2
Each security loads on the factors in a different way
Rit=μi+B1iF1
t+B2iF2
t+εit
μi typically depends on the covariance of R with the factors, that is on B
CAPM is a one factor model, where the factor is the aggregate market return
Factors themselves may be correlated
More on Factors What are factors? Anything associated
with aggregate risk: Market, P/E, interest rate, HML, SMB, Momentum, GDP growth, consumption growth, volatility…
Note that they are contemporaneous, not predictive
They may have predictive power, if the factors themselves are predictable
How to model them? AR(1), log-normal…
One Factor Model
Let rM be our only factor, and lets model it as a normal process
>>T=1000; µ=1.1; σ=.16; x=randn(T,1); >>rM=µ+σ*x; Suppose a risk-free bond is available
in this economy, and it pays 2% annual interest
>>rf=1.02;
The Securities Lets model returns in the following
way: rt
i=µi+Bi(rtM-µ)+σiεt
i
What should E[rti]=µi be? There is
theoretical justification to let it be: µi=rf+Bi(µ-rf)
Create a function that will output a cross-section of securities, all of them load on the factor rt
M in a unique way Vector B will define the loadings for
each security
crosssection.mfunction R=crosssection(mu,sigma,rf,B,sigmai,T)[a nsec]=size(B);R=zeros(T,nsec); X=randn(T,1); Xi=randn(T,nsec);rm=mu+sigma*X;mui=rf+B*(mu-rf);for i=1:nsec; R(:,i)=mui(i)+(rm-mu).*B(i)+Xi(:,i)*sigmai(i);end;
SimulateCross-section
>>N=10000;>>B=-.5+2.5*rand(1,N);>>sigmai=.05+.55*rand(1,N);>>mui=rf+B*(mu-rf);>>R=crosssection(mu,sigma,rf,B,sigmai,T);
Mean-StDev Frontier
Form portfolios of assets, each portfolio will contain assets with a similar mean return
We will form portfolios of 2 assets with similar mean, 5 assets with similar mean, 10, 20, 50, and 100
We will then plot the mean of these portfolios against the standard deviation
All else equal, we prefer assets with lower volatility
Create Portfolios
A=[2 5 10 20 50 100];for j=1:6; for i=1:22; x(i)=(.98+.01*i); s=0; in=zeros(1,N); for k=1:N; if s<=A(j) & abs(mean(R(:,k))-x(i))<.005; s=s+1; in(k)=1; end; end; P=mean(R(:,in==1)') '; portmean(i,j)=mean(P); portstd(i,j)=std(P); end;end;
Plot Mean-StDevFrontier
>>plot(portstd(:,1),portmean(:,1),'c');>>hold on;>>plot(portstd(:,2),portmean(:,2),'r--');>>plot(portstd(:,3),portmean(:,3),'b');>>plot(portstd(:,4),portmean(:,4),'m--');>>plot(portstd(:,5),portmean(:,5),'g');>>plot(portstd(:,6),portmean(:,6),'k--');>>plot(0,rf,'rd');
Suggested Homework (4)
Model two securities with jumps Make the securities uncorrelated Allow for potential correlation of the jumps and
have a parameter which can set that correlation to high or low
Calculate the correlation of the two assets and the value at risk for this portfolio
How does correlation change when jump correlation increases? How does value at risk change?