intradayJumpTest {highfrequency} | R Documentation |
Intraday jump tests
Description
This function can be used to test for jumps in intraday price paths.
The tests are of the form L(t) = (R(t) - mu(t))/sigma(t)
.
See spotVol
and spotDrift
for Estimators for \sigma(t)
and \mu(t)
, respectively.
Usage
intradayJumpTest(
pData,
volEstimator = "RM",
driftEstimator = "none",
alpha = 0.95,
alignBy = "minutes",
alignPeriod = 5,
marketOpen = "09:30:00",
marketClose = "16:00:00",
tz = NULL,
n = NULL,
...
)
Arguments
pData |
|
volEstimator |
character denoting which volatility estimator to use for the tests. See |
driftEstimator |
character denoting which drift estimator to use for the tests. See |
alpha |
numeric of length one determining what confidence level to use when constructing the critical values. |
alignBy |
character, indicating the time scale in which |
alignPeriod |
positive numeric, indicating the number of periods to aggregate over. E.g. to aggregate
based on a 5 minute frequency, set |
marketOpen |
the market opening time. This should be in the time zone
specified by |
marketClose |
the market closing time. This should be in the time zone
specified by |
tz |
fallback time zone used in case we we are unable to identify the timezone of the data, by default: |
n |
number of observation to use in the calculation of the critical values of the test statistic. If this is left as |
... |
extra arguments passed on to The null hypothesis of the tests in this function is that there are no jumps in the price series |
Author(s)
Emil Sjoerup
References
Christensen, K., Oomen, R. C. A., Podolskij, M. (2014): Fact or Friction: Jumps at ultra high frequency. Journal of Financial Economics, 144, 576-599
Examples
## Not run:
# 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)
## End(Not run)