Question
We construct a portfolio with four stocks: WMT (Walmart), BAC (Bank of America), XOM (Exxon), and PFE (Pfizer), with one constrant of LongOnly. Use R
We construct a portfolio with four stocks: WMT (Walmart), BAC (Bank of America), XOM (Exxon), and PFE (Pfizer), with one constrant of LongOnly. Use R to complete this question. Please include the code you run in the Rstudio console and the results from the console.
(a) Use R to extract daily closing prices starting from 2018-10-30 of those four stocks from Yahoo!Finance and calculate portfolio returns. (b) Locate the Global Minimum Variance Portfolio (GMVP), i.e., make ggplot (bar) of the weights of the four assets within the GMVP. Find the 1-day 99% percentage VaR of the GMVP. (c) Locate the tangency portfolio, i.e., make ggplot (pie) of the weights of the four assets within the tangency portfolio. Find the 1-day 95% percentage VaR of the tangency portfolio. (d) Plot the efficient frontier + GMVP + tangency portfolio together on one plot.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started