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.
Diese Übung ist Teil des Kurses
Introduction to Portfolio Analysis in R
Anleitung zur Übung
- Create a portfolio using 
returnswhere the target return is the mean ofreturns. Store the output as the variablepf_mean. - Create a portfolio using 
returnswhere the target return is 10% greater than the mean ofreturns. Call thispf_10plus. - Print the standard deviations of both 
pf_meanandpf_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.
 
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# 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)