# NOT RUN {
# Consider you have raw trade data for 1 stock for 2 days
tDataAfterFirstCleaning <- tradesCleanup(tDataRaw = sampleTDataRawMicroseconds,
exchanges = "N", report = FALSE)
#
qData <- quotesCleanup(qDataRaw = sampleQDataRawMicroseconds,
exchanges = "N", report = FALSE)
dim(tDataAfterFirstCleaning)
tDataAfterFinalCleaning <-
tradesCleanupUsingQuotes(qData = qData[as.Date(DT) == "2018-01-02"],
tData = tDataAfterFirstCleaning[as.Date(DT) == "2018-01-02"])
dim(tDataAfterFinalCleaning)
#In case you have more data it is advised to use the on-disk functionality
#via the "tradeDataSource", "quoteDataSource", and "dataDestination" arguments
# }
Run the code above in your browser using DataLab