Learn R Programming

highfrequency (version 0.7.0.1)

rSkew: Realized skewness of highfrequency return series.

Description

Function returns Realized skewness, defined in Amaya et al. (2011).

Assume there is \(N\) equispaced returns in period \(t\). Let \(r_{t,i}\) be a return (with \(i=1, \ldots,N\)) in period \(t\).

Then, the rSkew is given by $$ \mbox{rSkew}_{t}= \frac{\sqrt{N} \sum_{i=1}^{N}(r_{t,i})^3}{RV_{t}^{3/2}} $$

in which \(RV_{t}:\) realized variance

Usage

rSkew(rData, alignBy = NULL, alignPeriod = NULL, makeReturns = FALSE)

Arguments

rData

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

alignBy

a string, align the tick data to "seconds"|"minutes"|"hours".

alignPeriod

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.

Value

numeric

References

Amaya, D., Christoffersen, P., Jacobs, K. and Vasquez, A. (2011). Do realized skewness and kurtosis predict the cross-section of equity returns?. CREATES research paper. p. 3-7.

Examples

Run this code
# NOT RUN {
data(sampleTData)
rSkew(sampleTData$PRICE,alignBy ="minutes", alignPeriod =5, makeReturns = TRUE)

# }

Run the code above in your browser using DataLab