I stumbled upon a problem of converting the returns and volatility of high frequency data to daily ones. I start with 1-minute returns, then calculate the 5-minute realized variance as the sum of the squared log returns over the 5 minute window. I also calculate the realized covariance with the benchmark. Ultimately, I want to calculate the 5-min volatility and beta using 1-minute data.

However, I am using a variety of products. Some of them are traded at NYSE, where trading takes place over 6,5h a day, some in London (8,5 hours of trading) and the indices are quoted 24/7. So my question is how I can bring all these measures to one frequency (daily)?

$\begingroup$@Giladbi I don't think that the function is what I need in this context. Also as I have large volumes of data, I would prefer to do it in SQL. So what I am ultimately interested in is the methodology.$\endgroup$
– abuMar 22 '18 at 9:11