jonathancornelissen/highfrequency

Another issue in aggregatets

Closed this issue · 1 comments

This is not really up for interpretation as my other report, this is definitely a bug.

A rather contrived showcase where I insert duplicated observations with timestamps that coincides with the period we aggregate on:

timestamps = seq(34200, 57600, length.out = 23401 * 3)
timestamps = c(timestamps[1:35102], rep(timestamps[35102], 10), timestamps[35102:length(timestamps)])
price = xts(rnorm(length(timestamps))*sqrt(1/iT), anytime(timestamps))
which((timestamps %% 1) == 0)
foo = aggregatets(price, on = 'secs', k = 1) # Here we have duplicates of 13:45:00
foo["1970-01-01 13:45"] 

resolved in #39