I have 1 min prices for each day begining 09:30 to 4:00pm and i need to calculate daily log return i.e. log(close price on the day / opening price on the day)?
Since its possible that some day may not have 09:30 or 4:00 , then i want it to take next time 9:31 if 9:30 is not there and 3:59 if 4:00 pm time is not there . How to do it ? If i split my data into days and wish to calculate log return i.e log(last observation in that day/first observation in that day). How to code this in matlab R2016a?
my data looks like
2014-02-03 09:30:00 10.4500002014-02-03 09:31:00 10.4500002014-02-03 09:32:00 10.3266002014-02-03 09:33:00 10.290000..2014-02-03 04:00:00 10.326500...2014-07-31 09:30:00 15.85002014-07-31 09:31:00 15.86002014-07-31 09:32:00 15.8600.2014-07-31 03:50:00 15.91012014-07-31 04:00:00 15.9300
Best Answer