rcov: Realized Covariance

Description Usage Arguments Value Author(s) References Examples

View source: R/rcov.R

Description

Function returns the vectorization of the lowest triangular of the Realized Covariance matrices for different frequencies.

Usage

1
2
rcov(data, freq = c('daily', 'monthly', 'quarterly', 'yearly'), make.ret = TRUE,
    cholesky = FALSE)

Arguments

data

a (T x N) xts object containing the N price/return series over period T

freq

a string defining the desired frequency for the Realized Covariance matrices between "daily", "monthly", "quarterly" or "yearly"

make.ret

boolean, in case it is TRUE the data are converted in returns, FALSE otherwise

cholesky

boolean, in case it is TRUE the Cholesky factors of the Realized Covariance matrices are calculated, FALSE by default

Value

Realized Covariances

a M \times N(N+1)/2 matrix of realized covariances, where M is the number of lower frequency data

Cholesky Factors (optional)

a M \times N(N+1)/2 matrix of Cholesky factors of the realized covariance matrices, where M is the number of lower frequency data

returns (optional)

a M \times N matrix of returns, when make.ret = TRUE

Author(s)

The code was written by Andrea Bucci

References

Andersen T.G., Bollerslev T., Diebold F.X. and Labys P. (2003), Modeling and Forecasting Realized Volatility. Econometrica. 71: 579-625

Barndorff-Nielsen O.E. and Shephard N. (2002), Econometric analysis of realised volatility and its use in estimating stochastic volatility models Journal of the Royal Statistical Society. 64(2): 253-280

Examples

1
2
3
4
data(Sample5minutes)

rc <- rcov(Sample5minutes, freq = 'daily', cholesky = TRUE, make.ret = TRUE)
rc

starvars documentation built on Jan. 13, 2021, 9:02 a.m.