I'm using python and Scrapy
What I am trying to do is calculate the growth rate of a stock (or rate of return) over a year, using monthly, weekly or daily data. Let's take this CAT data for example.
First on the list, is to calculate the rate of return at June 8, 2015. To do this, we use the formula (new - old)/old
, or (June 8 2015 - June 8 2014)/June 8 2014
. This would work fine, however there is no June 8, 2014 data! The closest is June 9th, or June 2nd.
Anyone have any ideas on how to tackle this accurately?