# How do I understand and calculate daily log returns? [closed]

I'm relatively new to the Quantitative community. I was trying to work with a dataset where I want to calculate daily log returns.

My dataset consists of multiple timestamps for each business day and I'm not sure how to compute this.

My dataset looks something of this sorts, where I have several days and each day several timestamps (non uniform):

---------------------
| dt | time | price |
| 01 | 0001 | 10.00 |
| 01 | 0003 | 10.50 |
....
| 01 | 0004 | 11.97 |
|....
| 02 | 0002 | 11.50 |
|....
| 02 | 0034 | 12.50 |
|....
| 02 | 0048 | 13.34 |
---------------------


I would appreciate some guidance as to understanding what is meant by calculating daily log returns.

The formulae I have seen online indicate doing log(price(t)/price(t-1)) but I'm a little confused for how I work when I have multiple prices in a day. Do I calculate the daily log returns as log(Price of last timestamp / Price of first timestamp) for each day in the dataset? Or would I need to calculate the log(Price of trade t / Price of trade t-1) and then take their mean?

Sorry if the question might be a bit confusing, but I'm just trying to understand the mathematics behind this.

When you have multiple timestamps for each business day, you can still calculate the daily log returns by using the formula you mentioned: $$log(Price(t) / Price(t-1))$$.