Using python in google collab, could you please provide screenshots of the code used!
You will invest $ in the following assets:
Berkshire Hathaway Inc. BRKA
Microsoft Corporation MSFT
Starbucks Corporation SBUX
Apple Inc. AAPL
The Cheesecake Factory CAKE
Using the yfinance package, download the daily returns of these assets from May inclusive to May exclusive
Utilize the skfolio package to compute the optimal portfolio that maximizes the Sharpe Ratio, allowing shortselling with asset weights as low as
Assume that the daily riskfree rate is
Use the standard deviation of daily returns as the measure of risk.
Suppose you invested in the optimal portfolio on May
On that day, the close price of SBUX was $
How many shares of the Starbucks Corporation did you buy or borrow to invest in this portfolio?
Note that if you borrow shares, the investment amount will be negative.
Round your answer to one decimal place, as some brokers allow you to purchase fractional shares.
Thank you very much!!