4.two_stocks_example

4.two_stocks_example - University of California, Los...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: University of California, Los Angeles Department of Statistics Statistics C183/C283 Instructor: Nicolas Christou Portfolio possibilities curve Efficient frontier Example using R Means, variances, covariance are given: Suppose two stocks have the following expected return and variance: R A = 0 . 01 , R B = 0 . 013 , 2 A = . 061 , 2 B = 0 . 0046, and AB = 0 . 00062. The following simple R commands will read these inputs and construct the portfolio possibilities curve with and without short sales allowed. #Read expected returns, variances, and covariances: r1_bar <- 0.01 r2_bar <- 0.013 var1 <- 0.0061 var2 <- 0.0046 cov_12 <- 0.00062 #Short sales NOT allowed: a <- seq(0, 1, 0.01) b <- 1-a rp_bar_ns <- a*r1_bar+b*r2_bar var_p_ns <- a^2*var1+b^2*var2+2*a*b*cov_12 sd_p_ns <- var_p_ns^0.5 #Short sales allowed: a1 <- seq(-2,2, 0.01) b1 <- 1-a1 rp_bar_s <- a1*r1_bar+b1*r2_bar var_p_s <- a1^2*var1+b1^2*var2+2*a1*b1*cov_12 sd_p_s <- var_p_s^0.5 #Plot the two portfolio possibilities curves: #Green: Short sales allowed. #Blue: Short sales not allowed. plot(sd_p_s, rp_bar_s, col="green", xlab="Portfolio standard deviation", ylab="Portfolio expected return") points(sd_p_ns, rp_bar_ns, col="blue") 1 Portfolio possibilities curve:...
View Full Document

Page1 / 5

4.two_stocks_example - University of California, Los...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online