# Correlation between two high frequency time series

I have two time series, both at a high-frequency level.

My question has two parts:

1. How do I calculate correlation in a high-frequency setting? I assume that the normal correlation theory would not suffice.
2. I also need to estimate the lag at which the correlation between the two series is the highest. If the series $A$ has values $a_1, a_2, a_3, \dotsc$ and series $B$ is $b_1, b_2, b_3, \dotsc$ for times $t_1, t_2, t_3, \dotsc$, I need to find the lag $t$ for which the correlation between the two series $a_i, a_{i+1}, \dotsc$ and $b_{i+t}, b_{i+t+1}, \dotsc$ is the highest.

Can you please share some resources and insights?

1. The property of high frequency has no statistical content per se. If I have a time series $x_t$ with values $(x_1,x_2,x_3,\dotsc)$ and change the time index from years $(2001,2002,2003,\dotsc)$ to seconds $(1,2,3,\dotsc)$, that does not change anything from a statistical point of view. However, high-frequency data may tend to have certain statistical characteristics that make application of correlation problematic. You would need to specify those characteristics if you want a concrete answer.
2. If you do not have subject-matter knowledge on what the time lag should be, cross-correlation analysis could help. That is, you could just examine a bunch of different lags and see which one yields the highest correlation. The ccf funcion in R can do that. That would not automatically give you a confidence interval for which lag has the highest correlation in population, though.