Answered step by step
Verified Expert Solution
Question
1 Approved Answer
NEED ALL STEPS and IN [ ]: answered. All details are provided by pictures. Appreciate any help. Step 1 - Imports (5 points) Write All
NEED ALL STEPS and IN [ ]: answered. All details are provided by pictures. Appreciate any help.
Step 1 - Imports (5 points) Write All the imports needed for the Notebook in the following cell (Non-used imports will be penalized): In [ ]: Step 2 - Stock / Commodities Data Gatering (10 points) Download 2 Stocks or Commodities from either Yahoo Finacial, Quandl, an API server or other websites (whichever has what you need to complete the notebook) seperately and place each into an approiately named Dataframe. The data MUST consist of the past 10 years of data. Too much or too little will be penalized. . Only use free services to gather data. Do not use datafiles to bring in data (seperate additional files -ie. CSVS). Your code should bring in the data from the Internet. Helpful Hint: Try to select similar stock/commodities that have similar price ranges and industries. Similar prices graphs nicer in the Raw Data form. Similar industries allows easier analysis of the two data sets. ***Do not select any of the following Stock/Commodities: Corn, Soybean, Gold, Silver, Platinum, Apple, Microsoft, Intel, AMD, Novell, Exxon, Shell, Coca Cola, Pepsi, Nike, Home Depot, Lowes, Walmart, Target, Any automobile stock, Any bank stock or Any airline stock In [ ]: Step 3 - Organizing the Data (10 points) . Only use one column (per DataFrame): Either use the 'Adj Close','Cash Price' or obviously logical column. Remove all other unused columns. o DataFrame should consist of one index and one column in each DataFrame. Rename the single column in the DataFrame to the stock ticker symbol or commodity name. Add a comment that shows the company/industry name behind each ticker/commodity symbol. That way the grade knows what you have selected. If there is no index already set, set 'Date' as the index and make sure it is a datetype. In [ ]: Step 4 - Checking the Data (5 points) Show the head, tail and graph with legend each DataFrame seperately (First one then the other - do not mixed together) In [5]: # head, tail and graph with Legend: Choice 1 DataFrame In [6]: # head, tail and graph with Legend: Choice 2 DataFrame Step 5 - Combining the Data (10 points) . Combine both DataFrames into a single appropriately named DataFrame. The new DataFrame to include the phrase'_Raw_Data' at the end. Set a logical index if needed. Print the head, tail and graph with legend of the new Raw Data DataFrame Should be just one index and two columns n [ ]: Step 6 - Pickling the Data (5 points) Pickle (using Pandas) the new Raw Data DataFrame using the DataFrame label as the pickle filename n [ ]: Step 7 - Checking the Pickled Data (5 points) Read (using Pandas) the new Raw Data DataFrame pickle back into the orignial DataFrame that created it. Display the head, tail and graph with legend of the new Raw Data DataFrame (to check that it was loaded correctly). . Should be identical in output to Step 5 prior to the pickle and unpickle. In [ ]: Step 8 - Your thoughts on the data gathering, organizing and storing process (5 points) . In the following markdown cell write your view of Python/Pandas/Jupyter Notebooks. --> Place your response in this markdown cell Step 9 - Percent Change - Point to Point (10 points) Convert the Dataframe containing both raw data stocks to a percent change (Point to Point) and place the data into a new DataFrame which should end in the phrase'_Pct_P2P_A'. (The converted Dataframe should have the appropriate columns and index) Print out only the first 10 rows Pickle (using Pandas) the new percent change DataFrame using the DataFrame name as the pickle filename In [ ]: Step 10 - Visually Check the Percent Change - Point to Point and save the Dataframe (5 points) 1 Load (using Pandas) the new Pct_P2P pickle into a new Dataframe ending in 'Pct_P2P_B'. 2 Print out only the last 10 rows. 3 Graph both both percent change columns SEPERATELY with a legend (two graphs in total in seperate charts). 4 Graph both percent change prices TOGETHER on one graph with legend (two graph in total in one chart). In [ ]: Step 11 - Percent Change - Single Starting point (5 points) From the combined _Raw_Data Dataframe (Step 5), convert the data to Percent Change from a Single Starting Point and place the data into a new DataFrame which should end in '_Pct_SSP_A'. Print the first 8 rows only. Pickle (using Pandas) the new percent change DataFrame using the DataFrame name as the pickle filename In [ ]: Step 12 - Visually Checking the Percent Change - Single Starting point and saving the Dataframe (5 points) 1 Load (using Pandas) the pickled '_Pct_SSP_A' data into a new Dataframe ending in '_Pct_SSP_B'. 2 Print the last 8 rows only. 3 Graph both both percent change columns SEPERATELY with a legend (two graphs in total in seperate charts). 4 Graph both percent change prices TOGETHER on one graph with legend (two graph in total in one chart). In [ ]: Step 13 - Stock/Commodity Selected Correlation Examiniation (5 points) Create a correlation table using the 'Raw' DataFrame that contains both columns Display the Correlation table . In [ ]: Step 14 - Data Description - Examining the make up the Data (5 points) Display the data description of the 'Raw' DataFrame that contains both columns In [ ]: Step 15 - Based on Steps 13 and 14 outputs, comment your initial analysis of both companies preformance (compare and contrast to each other). (5 points) Respond with at least one complete paragraphs of your analysis. . Sentence structure, spelling and grammar counts. --> Place your response in this markdown cell Comments, if needed: (Place your comments in the next cell) (03/17/2021) ---> Place your comments in this markdown cell Step 1 - Imports (5 points) Write All the imports needed for the Notebook in the following cell (Non-used imports will be penalized): In [ ]: Step 2 - Stock / Commodities Data Gatering (10 points) Download 2 Stocks or Commodities from either Yahoo Finacial, Quandl, an API server or other websites (whichever has what you need to complete the notebook) seperately and place each into an approiately named Dataframe. The data MUST consist of the past 10 years of data. Too much or too little will be penalized. . Only use free services to gather data. Do not use datafiles to bring in data (seperate additional files -ie. CSVS). Your code should bring in the data from the Internet. Helpful Hint: Try to select similar stock/commodities that have similar price ranges and industries. Similar prices graphs nicer in the Raw Data form. Similar industries allows easier analysis of the two data sets. ***Do not select any of the following Stock/Commodities: Corn, Soybean, Gold, Silver, Platinum, Apple, Microsoft, Intel, AMD, Novell, Exxon, Shell, Coca Cola, Pepsi, Nike, Home Depot, Lowes, Walmart, Target, Any automobile stock, Any bank stock or Any airline stock In [ ]: Step 3 - Organizing the Data (10 points) . Only use one column (per DataFrame): Either use the 'Adj Close','Cash Price' or obviously logical column. Remove all other unused columns. o DataFrame should consist of one index and one column in each DataFrame. Rename the single column in the DataFrame to the stock ticker symbol or commodity name. Add a comment that shows the company/industry name behind each ticker/commodity symbol. That way the grade knows what you have selected. If there is no index already set, set 'Date' as the index and make sure it is a datetype. In [ ]: Step 4 - Checking the Data (5 points) Show the head, tail and graph with legend each DataFrame seperately (First one then the other - do not mixed together) In [5]: # head, tail and graph with Legend: Choice 1 DataFrame In [6]: # head, tail and graph with Legend: Choice 2 DataFrame Step 5 - Combining the Data (10 points) . Combine both DataFrames into a single appropriately named DataFrame. The new DataFrame to include the phrase'_Raw_Data' at the end. Set a logical index if needed. Print the head, tail and graph with legend of the new Raw Data DataFrame Should be just one index and two columns n [ ]: Step 6 - Pickling the Data (5 points) Pickle (using Pandas) the new Raw Data DataFrame using the DataFrame label as the pickle filename n [ ]: Step 7 - Checking the Pickled Data (5 points) Read (using Pandas) the new Raw Data DataFrame pickle back into the orignial DataFrame that created it. Display the head, tail and graph with legend of the new Raw Data DataFrame (to check that it was loaded correctly). . Should be identical in output to Step 5 prior to the pickle and unpickle. In [ ]: Step 8 - Your thoughts on the data gathering, organizing and storing process (5 points) . In the following markdown cell write your view of Python/Pandas/Jupyter Notebooks. --> Place your response in this markdown cell Step 9 - Percent Change - Point to Point (10 points) Convert the Dataframe containing both raw data stocks to a percent change (Point to Point) and place the data into a new DataFrame which should end in the phrase'_Pct_P2P_A'. (The converted Dataframe should have the appropriate columns and index) Print out only the first 10 rows Pickle (using Pandas) the new percent change DataFrame using the DataFrame name as the pickle filename In [ ]: Step 10 - Visually Check the Percent Change - Point to Point and save the Dataframe (5 points) 1 Load (using Pandas) the new Pct_P2P pickle into a new Dataframe ending in 'Pct_P2P_B'. 2 Print out only the last 10 rows. 3 Graph both both percent change columns SEPERATELY with a legend (two graphs in total in seperate charts). 4 Graph both percent change prices TOGETHER on one graph with legend (two graph in total in one chart). In [ ]: Step 11 - Percent Change - Single Starting point (5 points) From the combined _Raw_Data Dataframe (Step 5), convert the data to Percent Change from a Single Starting Point and place the data into a new DataFrame which should end in '_Pct_SSP_A'. Print the first 8 rows only. Pickle (using Pandas) the new percent change DataFrame using the DataFrame name as the pickle filename In [ ]: Step 12 - Visually Checking the Percent Change - Single Starting point and saving the Dataframe (5 points) 1 Load (using Pandas) the pickled '_Pct_SSP_A' data into a new Dataframe ending in '_Pct_SSP_B'. 2 Print the last 8 rows only. 3 Graph both both percent change columns SEPERATELY with a legend (two graphs in total in seperate charts). 4 Graph both percent change prices TOGETHER on one graph with legend (two graph in total in one chart). In [ ]: Step 13 - Stock/Commodity Selected Correlation Examiniation (5 points) Create a correlation table using the 'Raw' DataFrame that contains both columns Display the Correlation table . In [ ]: Step 14 - Data Description - Examining the make up the Data (5 points) Display the data description of the 'Raw' DataFrame that contains both columns In [ ]: Step 15 - Based on Steps 13 and 14 outputs, comment your initial analysis of both companies preformance (compare and contrast to each other). (5 points) Respond with at least one complete paragraphs of your analysis. . Sentence structure, spelling and grammar counts. --> Place your response in this markdown cell Comments, if needed: (Place your comments in the next cell) (03/17/2021) ---> Place your comments in this markdown cellStep 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