Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php on line 580

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php on line 583

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php on line 586

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php on line 589

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php on line 592

Warning: Cannot modify header information - headers already sent by (output started at /home/calcul9/public_html/wp-content/themes/suffusion/functions/media.php:580) in /home/calcul9/public_html/wp-includes/feed-rss2-comments.php on line 8
Comments on: Calculating the Efficient Frontier: Part 2 https://www.calculatinginvestor.com/2011/06/14/efficient-frontier-part-2/ Wed, 01 Aug 2018 16:28:06 +0000 hourly 1 https://wordpress.org/?v=5.8.9 By: calcinv https://www.calculatinginvestor.com/2011/06/14/efficient-frontier-part-2/#comment-338519 Wed, 01 Aug 2018 16:28:06 +0000 http://www.calculatinginvestor.com/?p=3413#comment-338519 In reply to Andy.

The solution is not restricted to positive weights. It may be that the mean variance optimal portfolio requires shorting some of the assets. These shorted assets will have negative weights.

]]>
By: Andy https://www.calculatinginvestor.com/2011/06/14/efficient-frontier-part-2/#comment-338512 Wed, 01 Aug 2018 06:31:51 +0000 http://www.calculatinginvestor.com/?p=3413#comment-338512 Eh, I’m getting negative weights- what gives?

]]>
By: Andy https://www.calculatinginvestor.com/2011/06/14/efficient-frontier-part-2/#comment-338511 Wed, 01 Aug 2018 06:21:50 +0000 http://www.calculatinginvestor.com/?p=3413#comment-338511 The i,j element of the covariance matrix is the covariance of the ith and jth assets, hence the diagonal is just the variance of each asset.

]]>
By: Martin https://www.calculatinginvestor.com/2011/06/14/efficient-frontier-part-2/#comment-312666 Mon, 04 Jul 2016 03:22:29 +0000 http://www.calculatinginvestor.com/?p=3413#comment-312666 Elegant solution, one question though: How do you deal with the special case when no short selling is allowed? What will the formulas look like then? Thanks in advance.

]]>
By: Layard https://www.calculatinginvestor.com/2011/06/14/efficient-frontier-part-2/#comment-196154 Wed, 06 Nov 2013 22:38:06 +0000 http://www.calculatinginvestor.com/?p=3413#comment-196154 Could you steer me to the matrix equation that calculates S? It is said S=cov(x) but x is not defined. The cov(sigma)=S
Thanks

]]>
By: jkp https://www.calculatinginvestor.com/2011/06/14/efficient-frontier-part-2/#comment-133556 Mon, 13 Feb 2012 17:44:12 +0000 http://www.calculatinginvestor.com/?p=3413#comment-133556 Indeed there was no scale effect observed, so you are absolutely correct.

On another note, I am using means (u_j), s.d.’s (s_j), covariance matrix based on 5 years of log[S(t+1)/S(t)] for daily price returns of 8 stocks (assets). For CAPM, I am regressing these 8 returns on the log return of the SP500 index to obtain the beta_j (j=1,1,…,8) for each. Then I set the expected excess annual return to 10%, or E(u)=0.000397 for the per/day return (0.1/sqrt(252) = 0.000397). The individual u_j’s for the stock then set to u_j = 0.000397 * beta_j

On the efficient frontier plot, the expected return (y-value) for each stock is determined as 0.000397 * beta_j, while the x-axis volatility or s.d. is simply the s_j for the stock’s 5-year log return. The efficient frontier line (efficient portfolios) is determined by incrementing E(u)=min(u_j) + i*delta, (delta= [max(u_j)-min(u_j)]/100), calculating w* for each increment using the Lagrangians, and then determining u_p and s_p via the matrix-vector and vector-matrix-vector operations on w*.

Thus far I can obtain the efficient frontier curve, and there is agreement between the greatest y-value for the curve and the stock with the greatest y=0.000397 * beta_j. However, the x-values of all of the stocks are shifted to the right and the frontier line is to the left. I have observed in the literature that for a CAPM model, the y-value plotted for each stock should be set to the fixed expected excess return you call “u” times the beta_j for each stock. Under this model, the only question becomes: how far back in the matrix algebra do you have to go for the s_j calculations when using the y=E(u)*beta_j approach to get the right values of s_j on the x-axis, that is, so the s_j’s for the frontier line directly overshadow the s_j’s for the set of stocks. There is one final point noticed on most EF plots: both the x- and y-values of the EF curve and the stock with the greatest excess return (on the far right) are always the same. So it begs, the question, when transforming u_j to u_j=E(u)*beta_j, what changes are needed to the matrix algebra above to ensure that at least both the x- and y-value for the max(y) of the EF curve and the x- and y-value for the stock with the greatest u_j are the same?

For some reason, plotting y=u*beta_j for each stock and the straightforward s_j for each stock’s 5 year log returns, the matrix algebra for w* and Lagrangians for obtaining u_p and s_p for each increment of fixed excess u

]]>
By: calcinv https://www.calculatinginvestor.com/2011/06/14/efficient-frontier-part-2/#comment-131994 Mon, 06 Feb 2012 18:54:37 +0000 http://www.calculatinginvestor.com/?p=3413#comment-131994 In reply to jkp.

The program and formulas will work for any range of data. You can use the decimal values for the means and variances/covariances, and the results will be valid.

]]>
By: jkp https://www.calculatinginvestor.com/2011/06/14/efficient-frontier-part-2/#comment-131824 Sun, 05 Feb 2012 19:41:07 +0000 http://www.calculatinginvestor.com/?p=3413#comment-131824 The methods above work for the scale/range of your percentages, but for average mu in the order of e.f. 0.0003, which are averages of log[S(t+1)/S(t)] for 5 years of data, the means are very low. Also, the standard deviations take on values of 0.01 to 0.05. Thus, the formulation appears to be range/scale dependent(?)

]]>