computeDurations(transactions, open = "10:00:00", close = "18:25:00",
rm0dur = TRUE, type = "trade", priceDiff = .1, cumVol = 10000)TRUE zero-durations will be removed and transactions done on the same second will be aggregated, e.g. price will then be the volume weighted avrage price of the aggregated transactions.
type = "price". Price durtions are (here) defind as the duration until the price has changed by at least 'priceDiff' in absolute value.
type = "cumVol". Volume durtions are (here) defind as the duration until the cumulative traded volume since the last duration has surpassed 'cumVol'.
priceDiff and cumVol)
## Not run:
# #only the first 3 days of data:
# durDataShort <- computeDurations(transData[1:56700, ])
# str(durDataShort)
# head(durDataShort)## End(Not run)
Run the code above in your browser using DataLab