Final Data Analysis1

docx

School

Binghamton University *

*We aren’t endorsed by this school

Course

311

Subject

Computer Science

Date

Jan 9, 2024

Type

docx

Pages

3

Uploaded by JusticeJellyfish31029

Report
DATA ANALYSIS SECTION You are doing an analysis on the meme stock craze with an emphasis on GameStop. SECTION 1: GameStop (20 points) Import the following file to Python. This file has data about GameStop from Yahoo Finance. The ‘Date’ column should be imported in datetime format. o GME. csv You will only need ‘Date’, ‘Adj Close’, and ‘Volume’. Drop the other variables. Rename ‘Adj Close’ to ‘GME_Price’ Sort the values by ‘Date’ and print this dataframe Save this dataframe (with sorted values) as GME_new. txt Print summary statistics (mean, std, etc.) for price and volume from your dataframe Create a time series plot of the price of GME o Use plt.show() to “print” your plot Create a time series plot of the price and volume of GME (with different y axis) o Use plt.show() to “print” your plot Print your first name SECTION 2: Other Meme Stocks (15 points) Import the following files to Python. These files have data from Yahoo finance about meme stocks (GameStop, AMC, Bed Bath & Beyond, and Dogecoin). The ‘Date’ columns should be imported in datetime format. o GME_new. txt (the file you created from SECTION 1) o AMC .csv o BBBY .csv o DOGE .csv You will only need ‘Adj Price’ and ‘Date’ in each file. Drop the other variables. Merge the gamestop dataframe with all of the new dataframes. Your resulting dataframe should have stock information about Gamestop, AMC, BBBY, and DOGE. Calculate the returns for each stock and print this dataframe Print summary statistics (mean, std, etc.) for the returns of each stock in your dataframe o Should have mean, std, etc. for returns for GME, AMC, BBBY, and DOGE. Print a correlation matrix for the returns of the stocks in your dataframe Print a correlation matrix for the returns of the stocks in your dataframe using data BEFORE January 1 2021 (this was the first month GME went to the moon). Print a correlation matrix for the returns of the stocks in your dataframe using data AFTER January 31 2021 .
SECTION 3: Google Searches (10 points) Import the following files to Python. The new files have data on Google searches about ‘meme stocks’, ‘short squeeze’, and ‘stimulus’. The ‘Week’ columns should be imported in datetime format. o GME_new. txt (the file you created from SECTION 1) o meme. csv o short. csv o stimulus. csv Merge the gamestop dataframe with all of the new dataframes and print this dataframe. Your resulting dataframe should have stock information about Gamestop and Google Trends data for ‘meme stocks’, ‘short squeeze’, and ‘stimulus’. o Hint: be careful, because the dates have different names Print summary statistics (mean, std, etc.) for price, volume, and each of the Google Trends data from your dataframe Print the date with the highest return and the return on that date. Print the date with the highest trading volume and the trading volume on that date. Print the date with the highest ‘meme stocks’ searches and the value of ‘meme stocks’ searches on that date. Print the date with the highest ‘short squeeze’ searches and the value of ‘short squeeze’ searches on that date. Print the date with the highest ‘stimulus’ searches and the value of ‘stimulus’ searches on that date. Create a time series plot of the price of GME and searches about ‘meme stocks’ (with different y axis) Create a time series plot of the price of GME and searches about ‘short squeeze’ (with different y axis) Create a time series plot of the price of GME and searches about ‘stimulus’ (with different y axis) Create a time series plot of the price of GME and searches about ‘meme stocks’, ‘short squeeze’, and ‘stimulus’ all together. Create one y axis with the price of GME. The other y axis should be shared for all the Google searches. Create a legend that denotes each line on your time series plot Print your last name
SUMMARY – to check your work Running your code should print the following: Sorted dataframe Summary statistics – GME Price Time Series Plot – GME Price Time Series Plot – GME Price and Volume Your first name Dataframe with returns (and prices) for all stocks Summary statistics – meme stock returns (GME, AMC, BBBY, DOGE) Correlation matrix – meme stock returns (GME, AMC, BBBY, DOGE) Correlation matrix – meme stock returns (GME, AMC, BBBY, DOGE) before Jan 1 2021 Correlation matrix – meme stock returns (GME, AMC, BBBY, DOGE) after Jan 31 2021 Dataframe with GME info and Google searches Summary statistics – GME info and Google searches Date of highest return Date of highest volume Date of highest ‘Meme Stock’ searches Date of highest ‘Short Squeeze’ searches Date of highest ‘Stimulus’ searches Time Series Plot – GME Price and ‘Meme Stock’ searches Time Series Plot – GME Price and ‘Short Squeeze’ searches Time Series Plot – GME Price and ‘Stimulus’ searches Time Series Plot – GME Price and all Google searches Your last name
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help