Question: 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.)
 Problem 1(50 points) Consider the log-returns of 8 popular stocks including

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!