Difference between revisions of "SOCR EduMaterials Activities ApplicationsActivities Portfolio"

From SOCR
Jump to: navigation, search
(Portfolio Theory)
m
 
(37 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Portfolio Theory ==
+
== [[SOCR_EduMaterials_ApplicationsActivities | SOCR Applications Activities]] - Portfolio Theory ==
  
An investor has a certain amount of dollars to invest into two stocks  
+
===Description===
(<math>IBM</math> and <math>TEXACO</math>).  A portion of the available funds will be invested into  
+
You can access the portfolio applet at [http://www.socr.ucla.edu/htmls/app/ the SOCR Applications Site], select ''Financial Applications'' --> ''Portfolio''.
IBM (denote this portion of the funds with <math>x_A</math>) and the remaining funds  
+
 
into TEXACO (denote it with <math>x_B</math>) - so <math>x_A+x_B=1</math>.  The resulting portfolio  
+
* An investor has a certain amount of dollars to invest into two stocks (<math>IBM</math> and <math>TEXACO</math>).  A portion of the available funds will be invested into IBM (denote this portion of the funds with <math>x_A</math>) and the remaining funds into TEXACO (denote it with <math>x_B</math>) - so <math>x_A+x_B=1</math>.  The resulting portfolio will be <math>x_A R_A+x_B R_B</math>, where <math>R_A</math> is the monthly return of <math>IBM</math> and <math>R_B</math> is the monthly return of <math>TEXACO</math>.  The goal here is to find the most efficient portfolios given a certain amount of risk.   
will be <math>x_A R_A+x_B R_B</math>, where <math>R_A</math> is the monthly return of <math>IBM</math> and <math>R_B</math> is the  
+
 
monthly return of <math>TEXACO</math>.  The goal here is to  
+
: Using market data from January 1980 until February 2001 we compute that <math>E(R_A)=0.010</math>, <math>E(R_B)=0.013</math>, <math>Var(R_A)=0.0061</math>, <math>Var(R_B)=0.0046</math>, and <math>Cov(R_A,R_B)=0.00062</math>.  We first want to minimize the variance of the portfolio. This will be:
find the most efficient portfolios given a certain amount of risk.   
+
: <math>\mbox{Minimize} \ \ \mbox{Var}(x_A R_A+x_BR_B)</math>
Using market data from January 1980 until February 2001 we compute  
+
 
that <math>E(R_A)=0.010</math>, <math>E(R_B)=0.013</math>, <math>Var(R_A)=0.0061</math>, <math>Var(R_B)=0.0046</math>, and  
+
: <math>\mbox{subject to} \ \ x_A+x_B=1</math>
<math>Cov(R_A,R_B)=0.00062</math>.  We first want to minimize the variance of the portfolio.
+
: Or
This will be:
+
: <math>\mbox{Minimize} \ \ x_A^2 Var(R_A)+x_B^2 Var(R_B) + 2x_Ax_BCov(R_A,R_B) </math>
<math>
+
: <math>\mbox{subject to} \ \ x_A+x_B=1</math>
\mbox{Minimize} \ \ \mbox{Var}(x_A R_A+x_BR_B)  
 
\mbox{subject to} \ \ x_A+x_B=1
 
</math>
 
Or
 
<math>
 
\mbox{Minimize} \ \ x_A^2 Var(R_A)+x_B^2 Var(R_B) + 2x_Ax_BCov(R_A,R_B)  
 
\mbox{subject to} \ \ x_A+x_B=1
 
</math>
 
 
<br>
 
<br>
Therefore our goal is to find <math>x_A</math> and <math>x_B</math>, the percentage of the  
+
* Therefore our goal is to find <math>x_A</math> and <math>x_B</math>, the percentage of the available funds that will be invested in each stock.  Substituting <math>x_B=1-x_A</math> into the equation of the variance we get  
available funds that will be invested in each stock.  Substituting  
+
: <math>x_A^2 Var(R_A)+(1-x_A)^2 Var(R_B) + 2x_A(1-x_A)Cov(R_A,R_B).
<math>x_B=1-x_A</math> into the equation of the variance we get  
 
<math>
 
x_A^2 Var(R_A)+(1-x_A)^2 Var(R_B) + 2x_A(1-x_A)Cov(R_A,R_B).
 
 
</math>
 
</math>
 
<br>
 
<br>
To minimize the above exression we take the derivative with respect to  
+
* To minimize the above expression we take the derivative with respect to <math>x_A</math>, set it equal to zero and solve for <math>x_A</math>.  The result is:
<math>x_A</math>, set it equal to zero and solve for <math>x_A</math>.  The result is:
+
: <math> x_A=\frac{Var(R_B) - Cov(R_A,R_B)}{Var(R_A)+Var(R_B)-2Cov(R_A,R_B)}</math>,
<math>
+
: and therefore  
x_A=\frac{Var(R_B) - Cov(R_A,R_B)}{Var(R_A)+Var(R_B)-2Cov(R_A,R_B)}
+
: <math>x_B=\frac{Var(R_A) - Cov(R_A,R_B)}{Var(R_A)+Var(R_B)-2Cov(R_A,R_B)}</math>.
</math>
+
: The values of <math>x_A</math> and <math>x_B</math> are:
and therefore  
+
: <math>x_A=\frac{0.0046-0.0062}{0.0061+0.0046-2(0.00062)} \Rightarrow x_A=0.42,</math>
<math>
+
: and <math>x_B=1-x_A=1-0.42 \Rightarrow x_B=0.58</math>.  Therefore, if the investor invests <math>42 \%</math> of the available funds into <math>IBM</math> and the remaining <math>58 \%</math> into <math>TEXACO</math> the variance of the portfolio will be minimum and equal to:
x_B=\frac{Var(R_A) - Cov(R_A,R_B)}{Var(R_A)+Var(R_B)-2Cov(R_A,R_B)}
+
: <math>Var(0.42R_A+0.58R_B)=0.42^2(0.0061)+0.58^2(0.0046)+2(0.42)(0.58)(0.00062)=0.002926.</math>
</math>
+
: The corresponding expected return of this portfolio will be:
The values of <math>x_a</math> and <math>x_B</math> are:
+
: <math>E(0.42R_A+0.58R_B)=0.42(0.010)+0.58(0.013)=0.01174. </math>
<math>
+
* We can try many other combinations of <math>x_A</math> and <math>x_B</math> (but always <math>x_A+x_B=1</math>) and compute the risk and return for each resulting portfolio.  This is shown in the table and the graph below.  
x_a=\frac{0.0046-0.0062}{0.0061+0.0046-2(0.00062)} \Rightarrow x_A=0.42.
+
<center>
</math>
 
and <math>x_B=1-x_A=1-0.42 \Rightarrow x_B=0.58</math>.  Therefore if the investor invests  
 
<math>42 \%</math> of the available funds into <math>IBM</math> and the remaining <math>58 \%</math>  
 
into <math>TEXACO</math> the variance of the portfolio will be minimum and equal to:
 
<math>
 
Var(0.42R_A+0.58R_B)=0.42^2(0.0061)+0.58^2(0.0046)+2(0.42)(0.58)(0.00062)
 
=0.002926.
 
</math>
 
The corresponding expected return of this porfolio will be:
 
<math>
 
E(0.42R_A+0.58R_B)=0.42(0.010)+0.58(0.013)=0.01174.
 
</math>
 
We can try many other combinations of <math>x_A</math> and <math>x_B</math> (but always <math>x_A+x_B=1</math>)  
 
and compute the risk and return for each resulting portfolio.  This is  
 
shown in the table and the graph below.  
 
 
 
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 191: Line 164:
 
| 0.067823
 
| 0.067823
 
|}
 
|}
 +
</center>
  
For the above calculations short selling was not allowed (<math>0 \le x_A \le 1</math> and
+
<center>[[Image: Christou_two_stocks_portfolio.jpg|600px]]</center>
<math>0 \le x_B \le 1</math>, in addition to <math>x_A+x_B=1</math>).  We note here that the efficient portfolios are located on the top part of the graph between the minimum risk portfolio point and the maximum return portfolio point, which is called the efficient frontier (the blue portion of the graph).  Efficient portfolios should provide higher expected return for the same level of risk or lower risk for the same level of expected return.  <br>
 
  
If short sales are allowed, which means that the investor can sell a stock that he or she does not own the graph has the same shape but now with more possibilities.  The investor can have very large expected return but this will be associated with very large risk.  The constraint here is only <math>x_A+x_B=1</math>, since either <math>x_A<math> or <math>x_B</math> can be negativeThe snapshot below from the SOCR applet shows the ``short sales scenario" for the IBM and TEXACO stocks.  The blue portion of the portfolio possibilities curve occurs when short sales are allowed, while the red portion corresponds to the case when short sales are not allowed.  <br>
+
<br>
 +
* For the above calculations short selling was not allowed (<math>0 \le x_A \le 1</math> and <math>0 \le x_B \le 1</math>, in addition to <math>x_A+x_B=1</math>)We note here that the efficient portfolios are located on the top part of the graph between the minimum risk portfolio point and the maximum return portfolio point, which is called the efficient frontier (the blue portion of the graph).  Efficient portfolios should provide higher expected return for the same level of risk or lower risk for the same level of expected return.  <br>
  
When the investor faces the efficient frontier when short sales are allowed and he or she can lend or borrow at the risk-free interest rate the efficient frontier will change in the following way:  Let <math>x</math> be the portion of the investor's wealth invested in portfolio <math>A</math> that lies on the efficient frontier, and <math>1-x</math> the the portion invested in a risk-free asset.  This combination is a new portfolio and has
+
* If short sales are allowed, which means that the investor can sell a stock that he or she does not own the graph has the same shape but now with more possibilities.  The investor can have very large expected return but this will be associated with very large risk.  The constraint here is only <math>x_A+x_B=1</math>, since either <math>x_A</math> or <math>x_B</math> can be negative.  The snapshot below from the SOCR applet shows the ``short sales scenario" for the IBM and TEXACO stocks.  The blue portion of the portfolio possibilities curve occurs when short sales are allowed, while the red portion corresponds to the case when short sales are not allowed.  <br>
<math>
+
 
\bar R_p=x\bar R_A + (1-x)R_f
+
<center>[[Image: Christou_ibm_texaco_short_sales.jpg|600px]]</center>
</math>
+
 
 +
* When the investor faces the efficient frontier when short sales are allowed and he or she can lend or borrow at the risk-free interest rate the efficient frontier will change in the following way:  Let <math>x</math> be the portion of the investor's wealth invested in portfolio <math>A</math> that lies on the efficient frontier, and <math>1-x</math> the the portion invested in a risk-free asset.  This combination is a new portfolio and has
 +
: <math> \bar R_p=x\bar R_A + (1-x)R_f</math>
 
<br>
 
<br>
 
where <math>R_f</math> is the return of the risk-free asset.  The variance of this combination is simply
 
where <math>R_f</math> is the return of the risk-free asset.  The variance of this combination is simply
<math>
+
: <math> \sigma_p^2=x^2 \sigma_A^2 \Rightarrow x=\frac{\sigma_p}{\sigma_A}</math>
\sigma_p^2=x^2 \sigma_A^2 \Rightarrow x=\frac{\sigma_p}{\sigma_A}
 
</math>
 
 
<br>
 
<br>
 
From the last two equations we get
 
From the last two equations we get
<math>
+
: <math> \bar R_p = R_f + \left(\frac{\bar R_A-R_f}{\sigma_A}\right)\sigma_p</math>
\bar R_p = R_f + \left(\frac{\bar R_A-R_f}{\sigma_A}\right)\sigma_p
 
</math>
 
  
 
<br>
 
<br>
  
This is an equation of a straight line.  On this line we find all the possible combinations of portfolio <math>A</math> and the risk-free rate.  Another investor can choose to combine the risk-free rate with portfolio <math>B</math> or portfolio <math>C</math>.  Clearly, for the same level risk the combinations that lie on the <math>Rf-B</math> line have higher expected return than those on the line <math>Rf-A<math> (see figure below).  And <math>Rf-C</math> will produce combinations that have higher return than those on <math>Rf-B</math> for the same level of risk, etc.  <br>
+
* This is an equation of a straight line.  On this line we find all the possible combinations of portfolio <math>A</math> and the risk-free rate.  Another investor can choose to combine the risk-free rate with portfolio <math>B</math> or portfolio <math>C</math>.  Clearly, for the same level risk the combinations that lie on the <math>Rf-B</math> line have higher expected return than those on the line <math>Rf-A</math> (see figure below).  And <math>Rf-C</math> will produce combinations that have higher return than those on <math>Rf-B</math> for the same level of risk, etc.  <br>
 +
 
 +
<center>[[Image: Christou_portfolio_risk_free_asset.jpg|600px]]</center>
 +
 
 +
* The solution, therefore, is to find the point of tangency of this line to the efficient frontier.  Let's call this point <math>G</math>.  To find this point we want to maximize the slope of the line in (1) as follows:
 +
: <math> \mbox{max} \ \ \theta = \frac{\bar R_p - R_f}{\sigma_p} </math>
 +
: Subject to
 +
: <math> \sum_{i=1}^{n} x_i = 1 </math>
 +
: Since,
 +
: <math> R_f=\left(\sum_{i=1}^n x_i\right) R_f = \sum_{i=1}^n x_iR_f </math>
 +
 
 +
* We can write the maximization problem as
 +
: <math> \mbox{max} \ \ \theta=\frac{\sum_{i=1}^n x_i (\bar R_i - R_f)}
 +
{\left(\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}\right)^{\frac{1}{2}}} </math>
 +
: or
 +
: <math>\mbox{max} \ \ \theta=\left[\sum_{i=1}^n x_i (\bar R_i - R_f)\right]
 +
\left[\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}\right]^{-\frac{1}{2}}</math>
  
The solution, therefore, is to find the point of tangency of this line to the efficient frontier.  Let's call this point <math>G</math>.  To find this point we want to maximize the slope of the line in (1) as follows:
+
* Take now the partial derivative with respect to each <math>x_i, i=1, \cdots, n</math>, set them equal to zero and solve.  Let's find the partial derivative w.r.t. <math>x_k</math>:
<math>
+
: <math>
\mbox{max} \ \ \theta = \frac{\bar R_p - R_f}{\sigma_p}
 
</math>
 
Subject to
 
<math>
 
\sum_{i=1}^{n} x_i = 1
 
</math>
 
Since,
 
<math>
 
R_f=\left(\sum_{i=1}^n x_i\right) R_f = \sum_{i=1}^n x_iR_f
 
</math>
 
we can write the maximization problem as
 
<math>
 
\mbox{max} \ \ \theta=\frac{\sum_{i=1}^n x_i (\bar R_i - R_f)}
 
{\left(\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}\right)^{\frac{1}{2}}}
 
</math>
 
or
 
<math>
 
\mbox{max} \ \ \theta=\left[\sum_{i=1}^n x_i (\bar R_i - R_f)\right]
 
\left[\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}\right]^{-\frac{1}{2}}
 
</math>
 
Take now the partial derivative with respect to each <math>x_i, i=1, \cdots, n</math>, set them equal to zero and solve.  Let's find the partial derivative w.r.t. <math>x_k</math>:
 
<math>
 
 
\frac{\partial \theta}{\partial x_k} =
 
\frac{\partial \theta}{\partial x_k} =
 
(\bar R_k - R_f)\left[\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}\right]^{-\frac{1}{2}}  +
 
(\bar R_k - R_f)\left[\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}\right]^{-\frac{1}{2}}  +
Line 246: Line 212:
 
\left[\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}\right]^{-\frac{3}{2}} \times (-\frac{1}{2}) = 0
 
\left[\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}\right]^{-\frac{3}{2}} \times (-\frac{1}{2}) = 0
 
</math>
 
</math>
Multiply both sides by  
+
<br>
<math>
+
 
\left[\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}\right]^{\frac{1}{2}} \ \ \ \mbox{to get}
+
* Multiply both sides by  
</math>
+
: <math>\left[\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}\right]^{\frac{1}{2}} \ \ \ \mbox{to get}</math>
<math>
+
: <math> (\bar R_k - R_f) - \frac{\sum_{i=1}^n x_i(\bar R_i - R_f)}
(\bar R_k - R_f) -  
+
{\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}} (x_k \sigma_k^2 +\sum_{j=1, j \ne k}^n x_j \sigma_{kj}) =0 </math>
\frac{\sum_{i=1}^n x_i(\bar R_i - R_f)}
+
 
{\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}}
+
* Now, if we let  
(x_k \sigma_k^2 +\sum_{j=1, j \ne k}^n x_j \sigma_{kj}) =0
+
: <math> \lambda= \frac{\sum_{i=1}^n x_i(\bar R_i - R_f)}
</math>
+
{\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}} </math>
Now, if we let  
+
 
<math>
+
: the previous expression will be
\lambda=
+
: <math> (\bar R_k - R_f) - \lambda x_k \sigma_k^2 - \sum_{j=1, j \ne k}^n \lambda x_j \sigma_{kj} = 0 </math>
\frac{\sum_{i=1}^n x_i(\bar R_i - R_f)}
+
:or
{\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}}
+
: <math> \bar R_k - R_f = \lambda x_k \sigma_k^2 + \sum_{j=1, j \ne k}^n \lambda x_j \sigma_{kj} </math>
</math>
+
 
the previous expression will be
+
* Let's define now a new variable,  
<math>
+
: <math> z_k = \lambda x_k </math>
(\bar R_k - R_f) - \lambda x_k \sigma_k^2 - \sum_{j=1, j \ne k}^n \lambda x_j \sigma_{kj} = 0
+
<br>
</math>
+
: and finally
or
+
: <math> \bar R_k - R_f = z_k \sigma_k^2 + \sum_{j=1, j \ne k}^n z_j \sigma_{kj}
<math>
 
\bar R_k - R_f = \lambda x_k \sigma_k^2 + \sum_{j=1, j \ne k}^n \lambda x_j \sigma_{kj}
 
</math>
 
Let's define now a new variable,  
 
<math>
 
z_k = \lambda x_k
 
</math>
 
and finally
 
<math>
 
\bar R_k - R_f = z_k \sigma_k^2 + \sum_{j=1, j \ne k}^n z_j \sigma_{kj}
 
 
</math>
 
</math>
We have one equation like (2) for each <math>i=1, \cdots, n</math>.  Here they are:
+
* We have one such equation for each <math>k=1, \cdots, n</math>.  Here they are:
<math>
+
: <math>
 
\bar R_1 - R_f = z_1 \sigma_1^2 + z_2 \sigma_{12} + z_3 \sigma_{13} + \cdots + z_n \sigma_{1n}  
 
\bar R_1 - R_f = z_1 \sigma_1^2 + z_2 \sigma_{12} + z_3 \sigma_{13} + \cdots + z_n \sigma_{1n}  
 
</math>
 
</math>
<br>
+
 
<math>
+
: <math>
 
\bar R_2 - R_f = z_1 \sigma_{21} + z_2 \sigma_2^2 + z_3 \sigma_{23} + \cdots + z_n \sigma_{2n}   
 
\bar R_2 - R_f = z_1 \sigma_{21} + z_2 \sigma_2^2 + z_3 \sigma_{23} + \cdots + z_n \sigma_{2n}   
 
</math>
 
</math>
 +
 +
: <math>\cdots                \cdots </math>
 +
: <math>\cdots                \cdots  </math>
 +
: <math>\cdots                \cdots </math>
 +
 +
: <math> \bar R_n - R_f = z_1 \sigma_{n1} + z_2 \sigma_{n2} + z_3 \sigma_{n3} + \cdots + z_n \sigma_n^2 </math>
 +
 +
* The solution involves solving the system of these simultaneous equations, which can be written in matrix form as:
 +
: <math>\bar R = \Sigma Z</math>
 +
: where <math>\Sigma</math> is the variance-covariance matrix of the returns of the <math>n</math> stocks.  To solve for <math> Z</math>:
 +
: <math>{Z} = \Sigma^{-1} \bar R</math>
 +
 +
* Once we find the <math>z_i's</math> it is easy to find the <math>x_i's</math> (the fraction of funds to be invested in each security).  Earlier we defined
 +
: <math>z_k = \lambda x_k \Rightarrow x_k = \frac{z_k}{\lambda}</math>
 +
* We need to find <math>\lambda</math> as follows:
 +
: <math>z_1 + z_2 + \cdots + z_n = \sum_{i=1}^n z_i </math>
 +
 +
: <math>\lambda(x_1 + x_2 + \cdots + x_3) = \sum_{i=1}^n z_i  </math>
 +
: <math>\Rightarrow \lambda = \sum_{i=1}^n z_i</math>
 +
 +
* Therefore,
 +
: <math>x_1 = \frac{z_1}{\lambda}</math>
 +
: <math>x_2 = \frac{z_2}{\lambda} </math>
 +
 +
: <math>x_3 = \frac{z_3}{\lambda}  </math>
 +
: <math>\cdots  </math>
 +
: <math>\cdots  </math>
 +
: <math>\cdots  </math>
 +
: <math>x_n = \frac{z_n}{\lambda} </math>
 
<br>
 
<br>
<math>
+
 
\cdots                \cdots
+
* The snapshot form the SOCR portfolio applet shows an example with 5 stocks.  Again, the red points in the applet correspond to the case when short sales are not allowed.  The point of tangency can be found with a choice of the risk-free rate that can be entered in the input dialog box.
</math>
+
 
 +
<center>[[Image: Christou_tangent_point_5_stocks.jpg|600px]]</center>
 
<br>
 
<br>
<math>
 
\cdots                \cdots 
 
</math>
 
<br>
 
<math>
 
\cdots                \cdots
 
</math>
 
<br>
 
<math>
 
\bar R_n - R_f = z_1 \sigma_{n1} + z_2 \sigma_{n2} + z_3 \sigma_{n3} + \cdots + z_n \sigma_n^2
 
</math>
 
<br>
 
The solution involves solving the system of these simultaneous equations, which can be written in matrix form as:
 
<math>
 
{\bar R} = {\Sigma} {\boldface Z}, \ \ \mbox{where} \ {\bf \Sigma} \  \mbox{is the variance-covariance matrix of the returns of the <math>n</math> stocks.}
 
</math>
 
To solve for <math>\bf Z</math>:
 
<math>
 
{\bf Z} = {\bf \Sigma^{-1}} {\bf \bar R}
 
</math>
 
Once we find the <math>z_i'<math>s it is easy to find the <math>x_i'</math>s (the fraction of funds to be invested in each security).  Earlier we defined
 
<math>
 
z_k = \lambda x_k \Rightarrow x_k = \frac{z_k}{\lambda}
 
</math>
 
We need to find <math>\lambda</math> as follows:
 
<math>
 
z_1 + z_2 + \cdots + z_n &=& \sum_{i=1}^n z_i  \\
 
\lambda(x_1 + x_2 + \cdots + x_3) &=& \sum_{i=1}^n z_i  \\
 
\lambda &=& \sum_{i=1}^n z_i
 
</math>
 
Therefore,
 
<math>
 
x_1 &=& \frac{z_1}{\lambda}  \\
 
x_2 &=& \frac{z_2}{\lambda}  \\
 
x_3 &=& \frac{z_3}{\lambda}  \\
 
\vdots  \\
 
\vdots  \\
 
x_n &=& \frac{z_n}{\lambda}  \\
 
</math>
 
  
\noindent The snapshot form the SOCR portfolio applet shows an example with 5 stocks. Again, the red points in the applet correspond to the case when short sales are not allowed. The point of tangency can be found with a choice of the risk-free rate that can be entered in the input dialog box.
+
===References===
 +
* The materials above was partially taken from ''Modern Portfolio Theory'' by Edwin J. Elton, Martin J. Gruber, Stephen J. Brown, and William N. Goetzmann, Sixth Edition, Wiley, 2003.
 +
* [http://www.socr.ucla.edu/htmls/app/ SOCR Applications Site]
 +
 
 +
{{translate|pageName=http://wiki.stat.ucla.edu/socr/index.php?title=SOCR_EduMaterials_Activities_ApplicationsActivities_Portfolio}}

Latest revision as of 18:01, 8 July 2009

SOCR Applications Activities - Portfolio Theory

Description

You can access the portfolio applet at the SOCR Applications Site, select Financial Applications --> Portfolio.

  • An investor has a certain amount of dollars to invest into two stocks (\(IBM\) and \(TEXACO\)). A portion of the available funds will be invested into IBM (denote this portion of the funds with \(x_A\)) and the remaining funds into TEXACO (denote it with \(x_B\)) - so \(x_A+x_B=1\). The resulting portfolio will be \(x_A R_A+x_B R_B\), where \(R_A\) is the monthly return of \(IBM\) and \(R_B\) is the monthly return of \(TEXACO\). The goal here is to find the most efficient portfolios given a certain amount of risk.
Using market data from January 1980 until February 2001 we compute that \(E(R_A)=0.010\), \(E(R_B)=0.013\), \(Var(R_A)=0.0061\), \(Var(R_B)=0.0046\), and \(Cov(R_A,R_B)=0.00062\). We first want to minimize the variance of the portfolio. This will be:

\[\mbox{Minimize} \ \ \mbox{Var}(x_A R_A+x_BR_B)\]

\[\mbox{subject to} \ \ x_A+x_B=1\]

Or

\[\mbox{Minimize} \ \ x_A^2 Var(R_A)+x_B^2 Var(R_B) + 2x_Ax_BCov(R_A,R_B) \] \[\mbox{subject to} \ \ x_A+x_B=1\]

  • Therefore our goal is to find \(x_A\) and \(x_B\), the percentage of the available funds that will be invested in each stock. Substituting \(x_B=1-x_A\) into the equation of the variance we get

\[x_A^2 Var(R_A)+(1-x_A)^2 Var(R_B) + 2x_A(1-x_A)Cov(R_A,R_B). \]

  • To minimize the above expression we take the derivative with respect to \(x_A\), set it equal to zero and solve for \(x_A\). The result is:

\[ x_A=\frac{Var(R_B) - Cov(R_A,R_B)}{Var(R_A)+Var(R_B)-2Cov(R_A,R_B)}\],

and therefore

\[x_B=\frac{Var(R_A) - Cov(R_A,R_B)}{Var(R_A)+Var(R_B)-2Cov(R_A,R_B)}\].

The values of \(x_A\) and \(x_B\) are:

\[x_A=\frac{0.0046-0.0062}{0.0061+0.0046-2(0.00062)} \Rightarrow x_A=0.42,\]

and \(x_B=1-x_A=1-0.42 \Rightarrow x_B=0.58\). Therefore, if the investor invests \(42 \%\) of the available funds into \(IBM\) and the remaining \(58 \%\) into \(TEXACO\) the variance of the portfolio will be minimum and equal to:

\[Var(0.42R_A+0.58R_B)=0.42^2(0.0061)+0.58^2(0.0046)+2(0.42)(0.58)(0.00062)=0.002926.\]

The corresponding expected return of this portfolio will be:

\[E(0.42R_A+0.58R_B)=0.42(0.010)+0.58(0.013)=0.01174. \]

  • We can try many other combinations of \(x_A\) and \(x_B\) (but always \(x_A+x_B=1\)) and compute the risk and return for each resulting portfolio. This is shown in the table and the graph below.
\(x_A\) \(x_B\) Risk (\(\sigma^2\)) Return Risk (\(\sigma\))
1.00 0.00 0.006100 0.01000 0.078102
0.95 0.05 0.005576 0.01015 0.074670
0.90 0.10 0.005099 0.01030 0.071404
0.85 0.15 0.004669 0.01045 0.068329
0.80 0.20 0.004286 0.01060 0.065471
0.75 0.25 0.003951 0.01075 0.062859
0.70 0.30 0.003663 0.01090 0.060526
0.65 0.35 0.003423 0.01105 0.058505
0.60 0.40 0.003230 0.01120 0.056830
0.55 0.45 0.003084 0.01135 0.055531
0.50 0.50 0.002985 0.01150 0.054635
0.42 0.58 0.002926 0.01174 0.054088
0.40 0.60 0.002930 0.01180 0.054126
0.35 0.65 0.002973 0.01195 0.054524
0.30 0.70 0.003063 0.01210 0.055348
0.25 0.75 0.003201 0.01225 0.056580
0.20 0.80 0.003386 0.01240 0.058193
0.15 0.85 0.003619 0.01255 0.060157
0.10 0.90 0.003899 0.01270 0.062439
0.05 0.95 0.004226 0.01285 0.065005
0.00 1.00 0.004600 0.01300 0.067823
Christou two stocks portfolio.jpg


  • For the above calculations short selling was not allowed (\(0 \le x_A \le 1\) and \(0 \le x_B \le 1\), in addition to \(x_A+x_B=1\)). We note here that the efficient portfolios are located on the top part of the graph between the minimum risk portfolio point and the maximum return portfolio point, which is called the efficient frontier (the blue portion of the graph). Efficient portfolios should provide higher expected return for the same level of risk or lower risk for the same level of expected return.
  • If short sales are allowed, which means that the investor can sell a stock that he or she does not own the graph has the same shape but now with more possibilities. The investor can have very large expected return but this will be associated with very large risk. The constraint here is only \(x_A+x_B=1\), since either \(x_A\) or \(x_B\) can be negative. The snapshot below from the SOCR applet shows the ``short sales scenario" for the IBM and TEXACO stocks. The blue portion of the portfolio possibilities curve occurs when short sales are allowed, while the red portion corresponds to the case when short sales are not allowed.
Christou ibm texaco short sales.jpg
  • When the investor faces the efficient frontier when short sales are allowed and he or she can lend or borrow at the risk-free interest rate the efficient frontier will change in the following way: Let \(x\) be the portion of the investor's wealth invested in portfolio \(A\) that lies on the efficient frontier, and \(1-x\) the the portion invested in a risk-free asset. This combination is a new portfolio and has

\[ \bar R_p=x\bar R_A + (1-x)R_f\]
where \(R_f\) is the return of the risk-free asset. The variance of this combination is simply \[ \sigma_p^2=x^2 \sigma_A^2 \Rightarrow x=\frac{\sigma_p}{\sigma_A}\]
From the last two equations we get \[ \bar R_p = R_f + \left(\frac{\bar R_A-R_f}{\sigma_A}\right)\sigma_p\]


  • This is an equation of a straight line. On this line we find all the possible combinations of portfolio \(A\) and the risk-free rate. Another investor can choose to combine the risk-free rate with portfolio \(B\) or portfolio \(C\). Clearly, for the same level risk the combinations that lie on the \(Rf-B\) line have higher expected return than those on the line \(Rf-A\) (see figure below). And \(Rf-C\) will produce combinations that have higher return than those on \(Rf-B\) for the same level of risk, etc.
Error creating thumbnail: File missing
  • The solution, therefore, is to find the point of tangency of this line to the efficient frontier. Let's call this point \(G\). To find this point we want to maximize the slope of the line in (1) as follows:

\[ \mbox{max} \ \ \theta = \frac{\bar R_p - R_f}{\sigma_p} \]

Subject to

\[ \sum_{i=1}^{n} x_i = 1 \]

Since,

\[ R_f=\left(\sum_{i=1}^n x_i\right) R_f = \sum_{i=1}^n x_iR_f \]

  • We can write the maximization problem as

\[ \mbox{max} \ \ \theta=\frac{\sum_{i=1}^n x_i (\bar R_i - R_f)} {\left(\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}\right)^{\frac{1}{2}}} \]

or

\[\mbox{max} \ \ \theta=\left[\sum_{i=1}^n x_i (\bar R_i - R_f)\right] \left[\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}\right]^{-\frac{1}{2}}\]

  • Take now the partial derivative with respect to each \(x_i, i=1, \cdots, n\), set them equal to zero and solve. Let's find the partial derivative w.r.t. \(x_k\):

\[ \frac{\partial \theta}{\partial x_k} = (\bar R_k - R_f)\left[\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}\right]^{-\frac{1}{2}} + \left[\sum_{i=1}^n x_i(\bar R_i - R_f)\right] \left[2x_k\sigma_k^2 + 2 \sum_{j=1, j \ne k}^n x_j \sigma_{kj}\right] \times \left[\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}\right]^{-\frac{3}{2}} \times (-\frac{1}{2}) = 0 \]

  • Multiply both sides by

\[\left[\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}\right]^{\frac{1}{2}} \ \ \ \mbox{to get}\] \[ (\bar R_k - R_f) - \frac{\sum_{i=1}^n x_i(\bar R_i - R_f)} {\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}} (x_k \sigma_k^2 +\sum_{j=1, j \ne k}^n x_j \sigma_{kj}) =0 \]

  • Now, if we let

\[ \lambda= \frac{\sum_{i=1}^n x_i(\bar R_i - R_f)} {\sum_{i=1}^n x_i^2 \sigma_i^2 + \sum_{i=1}^n \sum_{j=1, j \ne i}^n x_i x_j \sigma_{ij}} \]

the previous expression will be

\[ (\bar R_k - R_f) - \lambda x_k \sigma_k^2 - \sum_{j=1, j \ne k}^n \lambda x_j \sigma_{kj} = 0 \]

or

\[ \bar R_k - R_f = \lambda x_k \sigma_k^2 + \sum_{j=1, j \ne k}^n \lambda x_j \sigma_{kj} \]

  • Let's define now a new variable,

\[ z_k = \lambda x_k \]

and finally

\[ \bar R_k - R_f = z_k \sigma_k^2 + \sum_{j=1, j \ne k}^n z_j \sigma_{kj} \]

  • We have one such equation for each \(k=1, \cdots, n\). Here they are:

\[ \bar R_1 - R_f = z_1 \sigma_1^2 + z_2 \sigma_{12} + z_3 \sigma_{13} + \cdots + z_n \sigma_{1n} \]

\[ \bar R_2 - R_f = z_1 \sigma_{21} + z_2 \sigma_2^2 + z_3 \sigma_{23} + \cdots + z_n \sigma_{2n} \]

\[\cdots \cdots \] \[\cdots \cdots \] \[\cdots \cdots \]

\[ \bar R_n - R_f = z_1 \sigma_{n1} + z_2 \sigma_{n2} + z_3 \sigma_{n3} + \cdots + z_n \sigma_n^2 \]

  • The solution involves solving the system of these simultaneous equations, which can be written in matrix form as:

\[\bar R = \Sigma Z\]

where \(\Sigma\) is the variance-covariance matrix of the returns of the \(n\) stocks. To solve for \( Z\):

\[{Z} = \Sigma^{-1} \bar R\]

  • Once we find the \(z_i's\) it is easy to find the \(x_i's\) (the fraction of funds to be invested in each security). Earlier we defined

\[z_k = \lambda x_k \Rightarrow x_k = \frac{z_k}{\lambda}\]

  • We need to find \(\lambda\) as follows:

\[z_1 + z_2 + \cdots + z_n = \sum_{i=1}^n z_i \]

\[\lambda(x_1 + x_2 + \cdots + x_3) = \sum_{i=1}^n z_i \] \[\Rightarrow \lambda = \sum_{i=1}^n z_i\]

  • Therefore,

\[x_1 = \frac{z_1}{\lambda}\] \[x_2 = \frac{z_2}{\lambda} \]

\[x_3 = \frac{z_3}{\lambda} \] \[\cdots \] \[\cdots \] \[\cdots \] \[x_n = \frac{z_n}{\lambda} \]

  • The snapshot form the SOCR portfolio applet shows an example with 5 stocks. Again, the red points in the applet correspond to the case when short sales are not allowed. The point of tangency can be found with a choice of the risk-free rate that can be entered in the input dialog box.
Christou tangent point 5 stocks.jpg


References

  • The materials above was partially taken from Modern Portfolio Theory by Edwin J. Elton, Martin J. Gruber, Stephen J. Brown, and William N. Goetzmann, Sixth Edition, Wiley, 2003.
  • SOCR Applications Site


Translate this page:

(default)
Uk flag.gif

Deutsch
De flag.gif

Español
Es flag.gif

Français
Fr flag.gif

Italiano
It flag.gif

Português
Pt flag.gif

日本語
Jp flag.gif

България
Bg flag.gif

الامارات العربية المتحدة
Ae flag.gif

Suomi
Fi flag.gif

इस भाषा में
In flag.gif

Norge
No flag.png

한국어
Kr flag.gif

中文
Cn flag.gif

繁体中文
Cn flag.gif

Русский
Ru flag.gif

Nederlands
Nl flag.gif

Ελληνικά
Gr flag.gif

Hrvatska
Hr flag.gif

Česká republika
Cz flag.gif

Danmark
Dk flag.gif

Polska
Pl flag.png

România
Ro flag.png

Sverige
Se flag.gif