I was able to obtain some tick data on a particular asset and I wanted to calculate the daily realized variance of the asset. After browsing through a few threads here, it seems the formula to calculate daily realized variance is simply (assuming you have constant time intervals):
Where R^2 is the squared log returns from the constant time interval t, with a total of m time intervals during the day. If I had minute to minute tick data, I would ideally sample every minute and the calculation would be straightforward.
However, my tick data is slightly sporadic ranging from 30 second intervals to 2-3 hours over the course of a trading day. Can I still use the same formula to calculate daily realized variance and just take the sum of squared log returns? Or will I have to account for the varying time differences?