# How to get daily returns from irregularly spaced price time-series?

I have a timeseries that has irregularly spaced time indices as below

data
>>>
Timestamp             price
2017-08-18 15:52:54   762.45
2017-08-18 15:59:27   762.98
2017-08-18 16:00:02   763.04


Usually a simple return (percent change in price) from regularly spaced (hourly, daily) prices can be calculated as

$$\frac{P_t}{P_{t-1}} - 1$$

But that assumes that $$\Delta t = const$$ for all time.

How do we calculate a daily return given prices and timestamps spaced out irregularly (in this case down to seconds), where $$\Delta t \neq const$$?

• What do you think about my answer? If it is helpful and clear, you may accept it by clicking on the tick mark to the left. Otherwise, you may ask for further clarification. This is how Cross Validated works. Jan 12 at 15:52

Take the closing price of each day and treat these as daily prices. From there on, the usual formulas such as $$\frac{P_t-P_{t-1}}{P_{t-1}}$$ or $$\log(P_t)-\log(P_{t-1})$$ apply.