if (FALSE) {
# We can easily make a Lee-Mykland jump test.
LMtest <- intradayJumpTest(pData = sampleTData[, list(DT, PRICE)],
volEstimator = "RM", driftEstimator = "none",
RM = "rBPCov", lookBackPeriod = 20,
alignBy = "minutes", alignPeriod = 5, marketOpen = "09:30:00",
marketClose = "16:00:00")
plot(LMtest)
# We can just as easily use the pre-averaged version from the "Fact or Friction" paper
FoFtest <- intradayJumpTest(pData = sampleTData[, list(DT, PRICE)],
volEstimator = "PARM", driftEstimator = "none",
RM = "rBPCov", lookBackPeriod = 20, theta = 1.2,
marketOpen = "09:30:00", marketClose = "16:00:00")
plot(FoFtest)
}
Run the code above in your browser using DataLab