rThresholdCov: Threshold Covariance

Description Usage Arguments Value Author(s) References Examples

View source: R/realized.R

Description

Function returns the treshold covariance matrix proposed in Gobbi and Mancini (2009). Unlike the rOWCov, the THRESCov uses univariate jump detection rules to truncate the effect of jumps on the covariance estimate. As such, it remains feasible in high dimensions, but it is less robust to small cojumps.

Let r_{t,i} be an intraday N x 1 return vector and i=1,...,M the number of intraday returns.

Then, the k,q-th element of the threshold covariance matrix is defined as

\mbox{tresholdcov}[k,q]_{t} = ∑_{i=1}^{M} r_{(k)t,i} 1_{\{r_{(k)t,i}^2 ≤q TR_{M}\}} \ \ r_{(q)t,i} 1_{\{r_{(q)t,i}^2 ≤q TR_{M}\}},

with the treshold value TR_{M} set to 9 Δ^{-1} times the daily realized bi-power variation of asset k, as suggested in Jacod and Todorov (2009).

Usage

1
2
rThresholdCov(rdata, cor = FALSE, align.by = NULL, align.period = NULL, 
               makeReturns = FALSE, ...)

Arguments

rdata

a (M x N) matrix/zoo/xts object containing the N return series over period t, with M observations during t.

cor

boolean, in case it is TRUE, the correlation is returned. FALSE 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

an N x N matrix

Author(s)

Jonathan Cornelissen and Kris Boudt

References

Barndorff-Nielsen, O. and N. Shephard (2004). Measuring the impact of jumps in multivariate price processes using bipower covariation. Discussion paper, Nuffield College, Oxford University.

Jacod, J. and V. Todorov (2009). Testing for common arrival of jumps in discretely-observed multidimensional processes. Annals of Statistics 37, 1792-1838.

Mancini, C. and F. Gobbi (2009). Identifying the covariation between the diffusion parts and the co-jumps given discrete observations. Mimeo.

Examples

1
2
3
4
5
6
7
 # Realized threshold  Variance/Covariance: 
 data(lltc.xts); 
 data(sbux.xts); 
 
 # Multivariate:
 rcThreshold = rThresholdCov(cbind(lltc.xts,sbux.xts), align.by="minutes",align.period=1); 
 rcThreshold  

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

             lltc.xts     sbux.xts
lltc.xts 2.872584e-05 4.312195e-06
sbux.xts 4.312195e-06 2.210521e-05

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