Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1 ( 5 0 points ) Consider the log - returns of 8 popular stocks including 'AAPL', 'AMZN', 'GOOGL', 'META', ' MSFT ' ,

Problem 1(50 points)
Consider the log-returns of 8 popular stocks including 'AAPL', 'AMZN', 'GOOGL', 'META',
'MSFT','NFLX', 'NVDA' and TSLA', from 2015-81-01 to 2023-12-31.
The price data can be acquired using the following code:
from pandas_datareader inport data as pdr
import yfinance as yf
yf.pdr_override()
stocks =['AAPL', 'AMZN', 'GOOGL', 'META', 'MSFT','NFLX', 'NVDA', 'TSLA']
prices = pdr_get_data_yahoo(stocks, start="2015-81-01", end="2023-12-31")[['Adj C]
(a) Compute the log-returns of the stocks and divide the data into 70% training and 30% test.
Consider the Markowitz's Mean-Variance Portfolio (MVP) formulated as
mamizew,wTT-wTTw
subject tow0,wTT1=1
where is the expected value (mean), and is the covariance matrix of the log-returns (on
the training data). Choose 100 evenly spaced values of in[0.1,100] in logarithmic scale
(using np.logapace) and plot the efficient frontier, or the curve of expected return w***?TT
versus volatility w***TTw***2(where w*** is the solution to (1)).
(b) Design the IVP, GMVP, MDCP and MSRP- portfolios based on the training (in-sample)
data. You may use the cvxpy package for portfolio optimization.
(c) Compute the (in-sample) expected retum and volatility for each of the designed portfolios
and plot them on the (return, volatility) trade-off curve. Which portfolios are on the efficient
frontier? Which portfolio has the highest (in-sample) Sharpe ratio? Can you choose a proper
value of via the MVP portfolio to achieve the same performance?
(d) Plot the weight allocation of the assets (on training data) for each portfolio (similar to the
figure below) and compare with the EWP (1N) portfolio.
(e) Compute the out-of-sample annualized Sharpe ratio, annualized return and annualized
volatility for the designed portfolios and compare with the EWP. Which portfolio scheme
would you choose then? (You may use the empyrical module.)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Cases In Financial Reporting

Authors: Ellen Engel, D. Eric Hirst, Mary Lea McAnally

8th Edition

1618531220, 9781618531223

More Books

Students also viewed these Finance questions

Question

What does it mean when the explanatory variables are collinear?

Answered: 1 week ago

Question

Solve for the unknown in each of the following:

Answered: 1 week ago