I'm looking to compute intraday correlation for 2 tick by tick intraday commodity price time series.

The tick times do not line up across the 2 time series. I'm thinking of converting the time series to a frequency of second and then forward fill to compute correlation.

Also, one of the time series is much more frequent than the other. Hence by forward filling, A lot of similar values will get copied over.

Dummy data to illustrate:

Dummy Data

As illustrated, the 2 time series are moving together. But if I backfill and compute correlation, it'll show a small correlation value because most returns in Series1 will be 0.


I would start with dropping all records with NS. In your example you'll end up with only 2 records. The reason is that by doing anything else, such as backfilling, you will not add additional information, but risk overstating the significance of information about correlation by propping up the p-values through artificially inflating the sample size.

For instance, what if series 1 were very volatile, and the trues values were 3,2,2,2,5,4,5 and the true values of series 2 were 3,4,4,4,3,5,5 ?

This is in the absence of the time series model. If you somehow know the process that generates the timeseries, then things are different. Using this model you could recover some information that is hidden behind NAs. For instance, you know that the process is a random walk with a drift. In this case you could estimate the parameters, such as the drift, and use them to impute the missing values. You're still risking to inflate the significance of correlation this way. So, I'd be very careful with this approach.

  • $\begingroup$ thanks. records with observations present from both series are very infrequent (primarily because one of the series is illiquid). If I were to select the infrequent series, drop the nas; lookup corresponding values (or latest values) from frequent series to construct series2; then would that make sense? $\endgroup$ – behold Apr 22 '19 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.