I have a list of the stock prices over 14 years and am required to calculate the daily returns as
Returns = log(today_s price/yesterday_s price)
Here's what my data looks like:
7/18/2008 19.57
7/17/2008 18.08
7/16/2008 14.27
How do I calculate this while reading the data from excel? I have split the string into a list, but don't know how to simultaneously use data from 2 different lines (I am reading one line at a time using a for loop)
Any help would be greatly appreciated, thank you!!