Effect of the return target
This exercise will show the effect of increasing your target return on the volatility of your mean-variance efficient portfolio.
The function portfolio.optim has arguments that allow for more general specifications. The arguments are as follows:
portfolio.optim(x, pm = mean(x), shorts = FALSE, reshigh = NULL)
The argument pm
sets the target return, the argument reshigh
specifies the upper constraints on the portfolio weights, and the argument shorts
is a logical statement specifying whether negative weights are forbidden or not, by default shorts = FALSE
.
You will create a portfolio that is optimized for a target return that equals the average value of the return series returns
. Then you will create a portfolio that has a target return that is 10% higher than the mean return series and calculate the proportion change in risk.
This exercise is part of the course
Introduction to Portfolio Analysis in R
Exercise instructions
- Create a portfolio using
returns
where the target return is the mean ofreturns
. Store the output as the variablepf_mean
. - Create a portfolio using
returns
where the target return is 10% greater than the mean ofreturns
. Call thispf_10plus
. - Print the standard deviations of both
pf_mean
andpf_10plus
(2 lines of code). Remember that the portfolio standard deviation is stored in$ps
. - Calculate the proportion increase in standard deviation you get by increasing your target return.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Create portfolio with target return of average returns
pf_mean <- portfolio.optim(___, pm = mean(___))
# Create portfolio with target return 10% greater than average returns
pf_10plus <- portfolio.optim(___, pm = 1.1 * mean(___))
# Print the standard deviations of both portfolios
# Calculate the proportion increase in standard deviation
(___$ps - ___$ps) / (___$ps)