rBeta {highfrequency} | R Documentation |
Realized beta
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
\beta_{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
rBeta(
rData,
rIndex,
RCOVestimator = "rCov",
RVestimator = "rRVar",
makeReturns = FALSE,
...
)
Arguments
rData |
a |
rIndex |
a |
RCOVestimator |
can be chosen among realized covariance estimators: |
RVestimator |
can be chosen among realized variance estimators: |
makeReturns |
boolean, should be |
... |
arguments passed to |
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 i
th return on day t
for asset j
and index m
(with i=1, \ldots,N
).
By default, the RCov is used and the realized beta coefficient is computed as:
\hat{\beta}_{(jm)t}= \frac{\sum_{i=1}^{N} r_{(j)i,t} r_{(m)i,t}}{\sum_{i=1}^{N} r_{(m)i,t}^2}.
Note: The function does not support to calculate betas across multiple days.
Value
numeric
Author(s)
Giang Nguyen, Jonathan Cornelissen, Kris Boudt, Onno Kleen, and Emil Sjoerup.
References
Barndorff-Nielsen, O. E. and Shephard, N. (2004). Econometric analysis of realized covariation: high frequency based covariance, regression, and correlation in financial economics. Econometrica, 72, 885-925.
Examples
## Not run:
library("xts")
a <- as.xts(sampleOneMinuteData[as.Date(DT) == "2001-08-04", list(DT, MARKET)])
b <- as.xts(sampleOneMinuteData[as.Date(DT) == "2001-08-04", list(DT, STOCK)])
rBeta(a, b, RCOVestimator = "rBPCov", RVestimator = "rMinRVar", makeReturns = TRUE)
## End(Not run)