Skip to content
Prev 8924 / 15274 Next

Aggregating tick data

Hi,

I have tick data for trade durations between 9:30 and 4:00 over the 
course of a month which I want to aggregate into 5 minute bins, starting 
from 9:30. What I currently have tried is

Durations.5min = 
period.apply(Data[,'Duration'],endpoints(Data[,'Duration'],on='minutes',k=5),FUN=mean)

however this returns bins starting from the first trade occurring on 
that day, and therefore my bins are not all the same over the course of 
the month.

Any suggestions are much appreciated.

Thanks,
Matt