Question: need a soultion for this one in Python cell). Use # to add extra notes to your code. Make sure that all cells can be
cell). Use # to add extra notes to your code. Make sure that all cells can be executed without any errors. All functions that you need are listed in the TeachingNote_Python.pdf file but you are allowed to use other functions that do the task. 1. Download and import stock price data for Amazon.com Inc. (AMZN), Walmart Inc. (WMT), and JPMorgan Chase & Co. (JPM) from Yahoo Finance from Jan 2018 to Dec 2022 at a daily frequency. You may either: a. use the Pandas DataReader/YFinance libraries and download data directly to Python, b. or download prices from the Yahoo Finance Website's Historical tab, export them in CSV files, then import them to Pandas dataFrames, merge them into one dataFrame, and convert it to a timeseries dataFrame 2. Find the monthly returns for each stock. 3. In the same dataFrame, construct 4 portfolios from the above returns with the following weights: a. AMZN and WMT b. AMZN and JPM c. WMT and JPM d. AMZN 33%, WMT 33% and JPM 33% 4. Calculate the expected return and volatility of these 4 portfolios and compare them with those of the 3 stocks. Show that the expected return of a portfolio is equal to the value-weighted average of its ingredient but not the volatility
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
