I am calculating a single stock return as follow:
data = pd.read_csv(r'**file**.csv')
data.index = data.Date
data['Return %'] = data['AAPL'].pct_change(-1)*100
data
out put:
Date AAPL Return %
Data
2020-09-11 2020-09-11 56.00 0.000000
2020-09-10 2020-09-10 56.00 -3.879162
2020-09-09 2020-09-09 58.26 2.138850
2020-09-08 2020-09-08 57.04 -2.211555
2020-09-04 2020-09-04 58.33 0.882048
2020-09-03 2020-09-03 57.82 -3.585126
2020-09-02 2020-09-02 59.97 -0.133222
Now, I have many other csv files as stock symbols saved and I would like to use each of these symbols to perform same calculation above. On top of that, I would like to print a report for the best day of each of these symbols returns.
If more details needed, pls let me know.
Thanks in advance!