Question
Grab the data using yahoofinancials and convert them into a pandas dataframe. Grab stock data for 5 different stocks from the S&P500 Index and print
Grab the data using yahoofinancials and convert them into a pandas dataframe.
Grab stock data for 5 different stocks from the S&P500 Index and print the first few rows for each of 5 stocks.
Explain why you pick these 5 stocks.
And calculate
Returns from Price Data (for each of the 5 stocks)
Average of Returns (for each of the 5 stocks)
Mode of Returns (for each of the 5 stocks)
Standard Deviation of Returns (for each of the 5 stocks)
Correlation Matrix of Returns (for all of the 5 stocks together)
Note: Please use monthly price data for past 3 years, January 2020 - December 2022.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started