rMPVar {highfrequency} | R Documentation |
Realized multipower variation
Description
Calculate the Realized Multipower Variation rMPVar, defined in Andersen et al. (2012).
Assume there are equispaced returns
in period
,
. Then, the rMPVar is given by
in which
:
: the window size of return blocks;
: the power of the variation;
and >
.
Usage
rMPVar(
rData,
m = 2,
p = 2,
alignBy = NULL,
alignPeriod = NULL,
makeReturns = FALSE,
...
)
Arguments
rData |
an |
m |
the window size of return blocks. 2 by default. |
p |
the power of the variation. 2 by default. |
alignBy |
character, indicating the time scale in which |
alignPeriod |
positive numeric, indicating the number of periods to aggregate over. For example, to aggregate
based on a 5-minute frequency, set |
makeReturns |
boolean, should be |
... |
used internally, do not change. |
Value
numeric
Author(s)
Giang Nguyen, Jonathan Cornelissen, Kris Boudt, and Emil Sjoerup.
References
Andersen, T. G., Dobrev, D., and Schaumburg, E. (2012). Jump-robust volatility estimation using nearest neighbor truncation. Journal of Econometrics, 169, 75-93.
See Also
IVar
for a list of implemented estimators of the integrated variance.
Examples
mpv <- rMPVar(sampleTData[, list(DT, PRICE)], m = 2, p = 3, alignBy = "minutes",
alignPeriod = 5, makeReturns = TRUE)
mpv