| rKurt {highfrequency} | R Documentation |
Realized kurtosis of highfrequency return series.
Description
Calculate the realized kurtosis as defined in Amaya et al. (2015).
Assume there are N equispaced returns in period t. Let r_{t,i} be a return (with i=1, \ldots,N) in period t.
Then, rKurt is given by
\mbox{rKurt}_{t} = \frac{N \sum_{i=1}^{N}(r_{t,i})^4}{\left( \sum_{i=1}^N r_{t,i}^2 \right)^2}.
Usage
rKurt(rData, alignBy = NULL, alignPeriod = NULL, makeReturns = FALSE)
Arguments
rData |
an |
alignBy |
character, indicating the time scale in which |
alignPeriod |
positive numeric, indicating the number of periods to aggregate over. For example, to aggregate
based on a 5-minute frequency, set |
makeReturns |
boolean, should be |
Value
In case the input is an
xtsobject with data from one day, a numeric of the same length as the number of assets.If the input data spans multiple days and is in
xtsformat, anxtswill be returned.If the input data is a
data.tableobject, the function returns adata.tablewith the same column names as the input data, containing the date and the realized measures.
Author(s)
Giang Nguyen, Jonathan Cornelissen, Kris Boudt, Onno Kleen, and Emil Sjoerup.
References
Amaya, D., Christoffersen, P., Jacobs, K., and Vasquez, A. (2015). Does realized skewness and kurtosis predict the cross-section of equity returns? Journal of Financial Economics, 118, 135-167.
Examples
rk <- rKurt(sampleTData[, list(DT, PRICE)], alignBy = "minutes",
alignPeriod = 5, makeReturns = TRUE)
rk