rMPV: Realized multipower variation (MPV), an estimator of...

Description Usage Arguments Value Author(s) References Examples

View source: R/highfrequencyGSOC.R

Description

Function returns the rMPV, defined in Andersen et al. (2012).

Assume there is N equispaced returns in period t. Let r_{t,i} be a return (with i=1, …,N) in period t.

Then, the rMPV is given by

\mbox{rMPV}_{N}(m,p)= d_{m,p} \frac{N^{p/2}}{N-m+1} ∑_{i=1}^{N-m+1}|r_{t,i}|^{p/m} … |r_{t,i+m-1}|^{p/m}

in which

d_{m,p}= μ_{p/m}^{-m}:

m: the window size of return blocks;

p: the power of the variation;

and m > p/2.

Usage

1
rMPV(rdata, m= 2, p=2, align.by= NULL, align.period= NULL, makeReturns= FALSE,...)

Arguments

rdata

a zoo/xts object containing all returns in period t for one asset.

m

the window size of return blocks. 2 by default.

p

the power of the variation. 2 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.

Value

numeric

Author(s)

Giang Nguyen, Jonathan Cornelissen and Kris Boudt

References

Andersen, T. G., D. Dobrev, and E. Schaumburg (2012). Jump-robust volatility estimation using nearest neighbor truncation. Journal of Econometrics, 169(1), 75- 93.

Examples

1
2
data(sample_tdata)
rMPV(sample_tdata$PRICE, m=2, p=3, align.by= "minutes", align.period=5,makeReturns= TRUE)

highfrequency documentation built on May 31, 2017, 4:34 a.m.

Search within the highfrequency package
Search all R packages, documentation and source code