Question: Submit your assignment in a single Python ( . py ) file on Avenue 2 Learn. Please name the file FirstName _ LastName.py . Answer

Submit your assignment in a single Python (.py) file on Avenue2Learn. Please name the file FirstName_LastName.py. Answer each question in a cell (use #%% to define a 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.
Download and import stock price data for
Amazon.com, Inc. (AMZN), NVIDIA Corporation (NVDA), and American Airlines Group Inc. (AAL) from the Yahoo Finance Website from Jan 2016 to Dec 2022 at the daily frequency. Use the Pandas DataReader / yFinance libraries and download data directly from Python.
Download the Fama French 3 factors from Kenneth French's website from Jan 2018 to Dec 2022 at the daily frequency, using the Pandas DataReader library. Run the function in Pandas DataReader to get the ticker list from this website and search through it for the symbol for the daily 3-factor model.
In a time-series dataFrame, find the daily returns for each stock from their adj close price data.
Merge the two dataFrames (i.e., stock returns and factors) in ONE time-series dataFrame. Notice that the date type between the two data vendors might not match and you need to convert them in the same date format (see the teaching note for more details).
Based on the FamaFrench 3-Factor model, choose the best stock to invest in. For this step, you are asked to
estimate the Sharpe ratio for each stock use merged dataset. Find the average or standard deviation of the daily return of each stock in excess of the daily risk-free rates. Then, calculate the Sharpe ratio with annualized values of these estimates. The one with the higher Sharpe ratio might be identified as the best choice. estimate the risk-adjusted excess return for each stock. Find the daily return of each stock in excess of the daily risk-free rates. Then, run the regressions of the threefactor CAPM using the excess returns of each stock as the dependent variables and the Market, Size, and Value factors. The one with the higher might be identified as the best choice.
Submit your assignment in a single Python ( . py

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 Programming Questions!