mergeTradesSameTimestamp: Merge multiple transactions with the same time stamp

Description Usage Arguments Value Author(s)

View source: R/realized.R


Function replaces multiple transactions that have the same time stamp by a single one and returns an xts object with unique time stamps only.





an xts object containing the time series data, with one column named "PRICE" indicating the transaction price and one column "SIZE" indicating the number of shares traded.


indicates how the price for a certain time stamp should be calculated in case of multiple observation for a certain time stamp. By default, selection="median", and the median price is taken. Alternatively:

  • selection = "maxvolume": use the price of the transaction with largest volume.

  • selection = "weightedaverage": take the weighted average of all prices.


xts object


Jonathan Cornelissen and Kris Boudt

highfrequency documentation built on May 19, 2017, 11:49 a.m.
Search within the highfrequency package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.