Professional Documents
Culture Documents
Summary:
In this assignment you will create a python script that reads through a file of stock
data, compute returns, and compare the returns between stocks.
Homework Instructions:
3. For each stock DataFrame, create the following columns (aka pd.Series):
a. Symbol: DFname['symbol'] = 'TSLA'
b. X: DFname[X] = 'TSLA'
c. Returns: DFname['return'] = DFname.X - DFname.X.shift(1)
d. Time: DFname['time'] = pd.to_time(DFname['seconds'],unit='s')
or DFname['time'] = pd.to_time(DFname['seconds'],unit='s').dt.time
Grading Process
I will award points according the rubric in the syllabus. To determine whether the script
is correct and efficient, the program will be run on a separate stock-day file. The script, if
done correctly, will report accurate results for a random stock day file.
If you are unable to complete all the tasks above, at a minimum make sure your script can
run and produce some output. A script that doesn’t run receives the least amount of points.