
Last chance! 50% off unlimited learning
Sale ends in
This function supplies information about standard error and confidence band of integrated variance (IV) estimators under Brownian semimartingales model such as: bipower variation, rMinRV, rMedRV. Depending on users' choices of estimator (integrated variance (IVestimator), integrated quarticity (IQestimator)) and confidence level, the function returns the result.(Barndorff (2002)) Function returns three outcomes: 1.value of IV estimator 2.standard error of IV estimator and 3.confidence band of IV estimator.
Assume there is
Then the IVinference is given by:
IVinference(
rData,
IVestimator = "RV",
IQestimator = "rQuar",
confidence = 0.95,
alignBy = NULL,
alignPeriod = NULL,
makeReturns = FALSE,
...
)
list
xts
object containing all returns in period t for one asset.
can be chosen among integrated variance estimators: RV, BV, rMinRV or rMedRV. RV by default.
can be chosen among integrated quarticity estimators: rQuar, realized tri-power quarticity (TPQ), quad-power quarticity (QPQ), rMinRQuar or rMedRQuar. TPQ by default.
confidence level set by users. 0.95 by default.
character, indicating the time scale in which alignPeriod
is expressed.
Possible values are: "ticks"
, "secs"
, "seconds"
, "mins"
, "minutes"
, "hours"
positive numeric, indicating the number of periods to aggregate over. E.g. to aggregate
based on a 5 minute frequency, set alignPeriod
to 5 and alignBy
to "minutes"
.
boolean, should be TRUE
when rData
contains prices instead of returns. FALSE
by default.
additional arguments.
Giang Nguyen, Jonathan Cornelissen and Kris Boudt
The theoretical framework is the logarithmic price process
Andersen, T. G., Dobrev, D., and Schaumburg, E. (2012). Jump-robust volatility estimation using nearest neighbor truncation. Journal of Econometrics, 169, 75-93.
Barndorff-Nielsen, O. E. (2002). Econometric analysis of realized volatility and its use in estimating stochastic volatility models. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 64, 253-280.
if (FALSE) {
library("xts") # This function only accepts xts data currently
ivInf <- IVinference(as.xts(sampleTData[, list(DT, PRICE)]), IVestimator= "rMinRV",
IQestimator = "rMedRQ", confidence = 0.95, makeReturns = TRUE)
ivInf
}
Run the code above in your browser using DataLab