Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Concept: Portfolio optimization is an important task done by portfolio managers. Not to be confused with portfolio selection, this task is about finding optimal weights

Concept: Portfolio optimization is an important task done by portfolio managers. Not to be confused with portfolio selection, this task is about finding optimal weights for each of the selected securities in such a way that the portfolio is mean-variance efficient. That is, if there are multiple ways to structure the portfolio, find the optimal way such that the portfolio selected dominates (or is not dominated by) other choices. While there are analytical ways to determine the optimal portfolio, a particularly simple yet sound method is the simulation method. Using a random sampling of portfolio weights, portfolios are constructed and compared in mean-variance space. From this comparison, an optimal portfolio is chosen. Please note that the optimal portfolio is the point of tangency in the risky set when a line is plotted between the risk-free rate and feasible portfolios; most finance text books have this graphic. Computationally, the optimal portfolio is the one with the highest Sharpe ratio. There are two components to this project. First, you create an R function to analyze stock-return data to output mean-variance metrics for a collection of stocks as well as information about simulated portfolios. Second, you plot the simulated portfolios and identify the optimal portfolio use ggplot2 and format appropriately.

Requirement: 1. Write an R function (name it myMeanVarPort) to calculate useful portfolio optimization metrics for simulated portfolios. a. Inputs: vector of TICKERs, a begin date, an end date, (annualized) risk-free rate. b. Output: an appropriately formatted list containing (a) the vector of stock means; (b) the covariance matrix; (c) relevant information (weights, mean, sigma, SR) for each simulated portfolio. Use monthly values in your calculations. 2. Using the output from the above function produce a plot of the portfolios and clearly identify with annotation the optimal portfolio and the minimum variance portfolio. 3. Your code should reflect a procedure discussed in a lecture video wherein you simulate portfolio weights to construct 100N portfolios (that is, number of securities times 100) with random positive weights. Please use set.seed value (12). 4. Run your function using the following inputs: c(GE, XOM, GBX, SBUX, PFE, HMC, NVDA); 20140101; 20171231; 0.02. 5. Use R Markdown to construct your report. Among other things, the report should clearly discuss the pros and cons of the method displayed and give some perspective on the topic of portfolio optimization. 6. Create a pdf file for submission of length <= 10 pages.

Submission: pdf file. Additional explanation: 1. You may use getSymbols to obtain monthly adjusted prices and use periodReturns to calculate returns. If possible, for a better grade consideration, use similar functions using the newer yFR package, to demonstrate your ability to use updated information. 2. Your report should include elements such as an introduction (discussing the scope and relevance of your work), your coding approach and results, and a conclusion (exploring learnings and additional considerations related to your work)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Finance questions