Last chance! 50% off unlimited learning
Sale ends in
minrv
and medrv
respectively compute the MinRV and MedRV estimators introduced in Andersen, Dobrev and Schaumburg (2012).
minrv.test
and medrv.test
respectively perform Haussman type tests for the null hypothesis that the realized path has no jump using the MinRV and MedRV estimators.
See Section 4.4 in Andersen, Dobrev and Schaumburg (2014) for a concise discussion.
minrv(yuima)
medrv(yuima)minrv.test(yuima, type = "ratio", adj = TRUE)
medrv.test(yuima, type = "ratio", adj = TRUE)
an object of yuima-class
or yuima.data-class
.
type of the test statistic to use. ratio
is default.
logical; if TRUE
, the maximum adjustment suggested in Barndorff-Nielsen and Shephard (2004) is applied to the test statistic when type
is equal to either “log
” or “ratio
”. See also Section 2.5 in Dumitru and Urga (2012).
minrv
and medrv
return a numeric vector with the same length as dim(yuima)
. Each component of the vector is a volatility estimate for the corresponding component of yuima
.
minrv.test
and medrv.test
return a list with the same length as dim(yuima)
. Each component of the list has class “htest
” and contains the following components:
the value of the test statistic of the corresponding component of yuima
.
an approximate p-value for the test of the corresponding component.
the character string “Andersen-Dobrev-Schaumburg jump test based on xxx
”, where xxx is either MinRV or MedRV.
the character string “xi
”, where i
is the number of the component.
Andersen, T. G., Dobrev D. and Schaumburg, E. (2012) Jump-robust volatility estimation using nearest neighbor truncation. Journal of Econometrics, 169, 75--93.
Andersen, T. G., Dobrev D. and Schaumburg, E. (2014) A robust neighborhood truncation approach to estimation of integrated quarticity. Econometric Theory, 30, 3--59.
Dumitru, A.-M. and Urga, G. (2012) Identifying jumps in financial assets: A comparison between nonparametric jump tests. Journal of Business and Economic Statistics, 30, 242--255.
Maneesoonthorn, W., Martin, G. M. and Forbes, C. S. (2020) High-frequency jump tests: Which test should we use? Journal of Econometrics, 219, 478--487.
Theodosiou, M. and Zikes, F. (2011) A comprehensive comparison of alternative tests for jumps in asset prices. Central Bank of Cyprus Working Paper 2011-2.
mpv
, cce
, bns.test
, lm.jumptest
, pz.test
# NOT RUN {
set.seed(123)
# One-dimensional case
## Model: dXt=t*dWt+t*dzt,
## where zt is a compound Poisson process with intensity 5
## and jump sizes distribution N(0,1).
model <- setModel(drift=0,diffusion="t",jump.coeff="t",measure.type="CP",
measure=list(intensity=5,df=list("dnorm(z,0,1)")),
time.variable="t")
yuima.samp <- setSampling(Terminal = 1, n = 390)
yuima <- setYuima(model = model, sampling = yuima.samp)
yuima <- simulate(yuima)
plot(yuima) # The path evidently has some jumps
## Volatility estimation
minrv(yuima) # minRV (true value = 1/3)
medrv(yuima) # medRV (true value = 1/3)
## Jump test
minrv.test(yuima, type = "standard")
minrv.test(yuima,type="log")
minrv.test(yuima,type="ratio")
medrv.test(yuima, type = "standard")
medrv.test(yuima,type="log")
medrv.test(yuima,type="ratio")
# Multi-dimensional case
## Model: Bivariate standard BM + CP
## Only the first component has jumps
mod <- setModel(drift = c(0, 0), diffusion = diag(2),
jump.coeff = diag(c(1, 0)),
measure = list(intensity = 5,
df = "dmvnorm(z,c(0,0),diag(2))"),
jump.variable = c("z"), measure.type=c("CP"),
solve.variable=c("x1","x2"))
samp <- setSampling(Terminal = 1, n = 390)
yuima <- setYuima(model = model, sampling = yuima.samp)
yuima <- simulate(object = mod, sampling = samp)
plot(yuima)
## Volatility estimation
minrv(yuima) # minRV (true value = c(1, 1))
medrv(yuima) # medRV (true value = c(1, 1))
## Jump test
minrv.test(yuima) # test is performed component-wise
medrv.test(yuima) # test is performed component-wise
# }
Run the code above in your browser using DataLab