Description Usage Arguments Details Value Author(s) References Examples
View source: R/highfrequencyGSOC.R
This function supplies information about standard error and confidence band of integrated variance (IV) estimators under Brownian semimartingales model such as: bipower variation, minRV, medRV. 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 N equispaced returns in period t.
Then the ivInference is given by:
\mbox{standard error}= \frac{1}{√{N}} *sd
\mbox{confidence band}= \hat{IV} \pm cv*se
in which,
\mbox{sd}= √{θ \times \hat{IQ}}
cv: critical value.
se: standard error.
θ: depending on IQestimator, θ can take different value (Andersen et al. (2012)).
\hat{IQ} integrated quarticity estimator.
1 2 | ivInference (rdata, IVestimator="RV", IQestimator="TPQ", confidence=0.95,
align.by= NULL, align.period = NULL, makeReturns = FALSE, ...)
|
rdata |
a zoo/xts object containing all returns in period t for one asset. |
IVestimator |
can be chosen among integrated variance estimators: RV, BV, minRV or medRV. RV by default. |
IQestimator |
can be chosen among integrated quarticity estimators: rQuar, realized tri-power quarticity (TPQ), quad-power quarticity (QPQ), minRQ or medRQ. TPQ by default. |
confidence |
confidence level set by users. 0.95 by default. |
align.by |
a string, align the tick data to "seconds"|"minutes"|"hours" |
align.period |
an integer, align the tick data to this many [seconds|minutes|hours]. |
makeReturns |
boolean, should be TRUE when rdata contains prices instead of returns. FALSE by default. |
... |
additional arguments. |
The theoretical framework is the logarithmic price process X_t belongs to the class of Brownian semimartingales, which can be written as:
\mbox{X}_{t}= \int_{0}^{t} a_udu + \int_{0}^{t}σ_{u}dW_{u}
where a is the drift term, σ denotes the spot volatility process, W is a standard Brownian motion (assume that there are no jumps).
list
Giang Nguyen, Jonathan Cornelissen and Kris Boudt
Andersen, T. G., D. Dobrev, and E. Schaumburg (2012). Jump-robust volatility estimation using nearest neighbor truncation. Journal of Econometrics, 169(1), 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(2), 253-280.
1 2 3 | data(sample_tdata)
ivInference(sample_tdata$PRICE, IVestimator= "minRV", IQestimator= "medRQ",
confidence=0.95, makeReturns = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.