medRV: medRV

Description Usage Arguments Value Details Author(s) References Examples

View source: R/realized.R

Description

Function returns the medRV, defined in Andersen et al. (2009).

Let r_{t,i} be a return (with i=1,…,M) in period t.

Then, the medRV is given by

\mbox{medRV}_{t}=\frac{π}{6-4√{3}+π}≤ft(\frac{M}{M-2}\right) ∑_{i=2}^{M-1} \mbox{med}(|r_{t,i-1}|,|r_{t,i}|, |r_{t,i+1}|)^2

Usage

1
medRV(rdata,align.by=NULL,align.period=NULL,makeReturns=FALSE,...)

Arguments

rdata

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

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

Details

The medRV belongs to the class of realized volatility measures in this package that use the series of high-frequency returns r_{t,i} of a day t to produce an ex post estimate of the realized volatility of that day t. medRV is designed to be robust to price jumps. The difference between RV and medRV is an estimate of the realized jump variability. Disentangling the continuous and jump components in RV can lead to more precise volatility forecasts, as shown in Andersen et al. (2007) and Corsi et al. (2010).

Author(s)

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.

Andersen, T.G., T. Bollerslev, and F. Diebold (2007). Roughing it up: including jump components in the measurement, modelling and forecasting of return volatility. The Review of Economics and Statistics 89 (4), 701-720.

Corsi, F., D. Pirino, and R. Reno (2010). Threshold Bipower Variation and the Impact of Jumps on Volatility Forecasting. Journal of Econometrics 159 (2), 276-288.

Examples

1
2
3
4
 data(sample_tdata);  
 medrv = medRV( rdata = sample_tdata$PRICE, align.by ="minutes", 
            align.period =5, makeReturns=TRUE); 
 medrv 

Example output

Loading required package: xts
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

[1] 0.0003997029

highfrequency documentation built on May 2, 2019, 6:09 p.m.