rBeta: Realized beta: a tool in measuring risk with respect to the...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/highfrequencyGSOC.R

Description

Depending on users' choices of estimator (realized covariance (RCOVestimator) and realized variance (RVestimator)), the function returns the realized beta, defined as the ratio between both.

The realized beta is given by

β_{jm} = \frac {RCOVestimator_{jm}}{RVestimator_{m}}

in which

RCOVestimator: Realized covariance of asset j and market index m.

RVestimator: Realized variance of market index m.

Usage

1
2
rBeta(rdata, rindex, RCOVestimator= "rCov", RVestimator= "RV", 
                makeReturns= FALSE,...)

Arguments

rdata

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

rindex

a zoo/xts object containing return in period t for an index.

RCOVestimator

can be chosen among realized covariance estimators: rCov, rAVGCov, rBPCov, rHYCov, rKernelCov, rOWCov, rRTSCov, rThresholdCov and rTSCov. rCov by default.

RVestimator

can be chosen among realized variance estimators: RV, minRV and medRV. RV by default. In case of missing RVestimator, RCOVestimator function applying for rindex will be used.

makeReturns

boolean, should be TRUE when rdata contains prices instead of returns. FALSE by default.

...

additional arguments.

Details

Suppose there are N equispaced returns on day t for the asset j and the index m. Denote r_{(j)i,t}, r_{(m)i,t} as the ith return on day t for asset j and index m (with i=1, …,N).

By default, the RCov is used and the realized beta coefficient is computed as:

\hat{β}_{(jm)t}= \frac{∑_{i=1}^{N} r_{(j)i,t} r_{(m)i,t}}{∑_{i=1}^{N} r_{(m)i,t}^2}

(Barndorff & Shephard (2004)).

Note: It is worth to note that the function does not support to calculate for data of multiple days.

Value

numeric

Author(s)

Giang Nguyen, Jonathan Cornelissen and Kris Boudt

References

Barndorff-Nielsen, O. E., & Shephard, N. (2004). Econometric analysis of realized covariation: High frequency based covariance, regression, and correlation in financial economics. Econometrica, 72(3), 885-925.

Examples

1
2
3
4
5
data(sample_5minprices_jumps)
a=sample_5minprices_jumps['2010-01-04',1]
b=sample_5minprices_jumps['2010-01-04',2]

rBeta(a,b,RCOVestimator="rBPCov",RVestimator="minRV",makeReturns=TRUE)

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