Question: For this assignment you are to process a CSV file containing 5 years of historical data for IBM ( from 2 / 8 / 2
For this assignment you are to process a CSV file containing years of historical data
for IBM from through This file is in a CSV file format and can be
downloaded from canvas. Each line of the file represents the stock data for that day.
The format of the file is as follows shown with the first line of data:
Date Open High Low Close Volume Name
IBM
You are to write a Python program that will read in all of the data for IBM and compute
the average closing price Close for each year of data available. The output should be
displayed as follows:
STOCK TICKER: IBM
Average Closing Price: xxxxx
Average Closing Price: xxxxx
Average Closing Price: xxxxx
Average Closing Price: xxxxx
Average Closing Price: xxxxx
Average Closing Price: xxxxx
Program Requirements Rubric
points In your current project directory
create a new python file called
processticker.py
Call a function called processfile which
will read and process the data
pts
pts
The file is called processticker.py
The function is called processfile
points Program reads data from the
file successfully splitting line data into
individual token values.
pts Program reads file data and splits each line into
individual token values
points Program uses correct fields to
partition data into necessary fields
required to compute the averages, eg
date, close.
pts Program processes correct fields to compute the
required results, eg date, close.
points Program successfully
computes yearly averages using closing
price
pts Program uses closing price data for each date
range and computes the correct average closing
price by year.
points Program displays results as
shown above
pts Program displays results in required format, see
above.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
