the \(n\)-th centered moment is calculated as
Return.centered(R, ...)centeredmoment(R, power)
centeredcomoment(Ra, Rb, p1, p2, normalize = FALSE)
an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns
any other passthru parameters
power or moment to calculate
an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns
an xts, vector, matrix, data frame, timeSeries or zoo object of index, benchmark, portfolio, or secondary asset returns to compare against
first power of the comoment
second power of the comoment
whether to standardize the calculation to agree with common usage, or leave the default mathematical meaning
Kris Boudt and Brian Peterson
$$.$$$$ \mu^{(n)}(R) = E\lbrack(R-E(R))^n\rbrack $$
These functions are used internally by PerformanceAnalytics to calculate centered moments for a multivariate distribution as well as the standardized moments of a portfolio distribution. They are exposed here for users who wish to use them directly, and we'll get more documentation written when we can.
These functions were first utilized in Boudt, Peterson, and Croux (2008), and have been subsequently used in our other research.
Boudt, Kris, Brian G. Peterson, and Christophe Croux. 2008. Estimation and Decomposition of Downside Risk for Portfolios with Non-Normal Returns. Journal of Risk. Winter.
Martellini, L. and Ziemann, V., 2010. Improved estimates of higher-order comoments and implications for portfolio selection. Review of Financial Studies, 23(4):1467-1502.
Ranaldo, Angelo, and Laurent Favre Sr. 2005. How to Price Hedge Funds: From Two- to Four-Moment CAPM. SSRN eLibrary.
Scott, Robert C., and Philip A. Horvath. 1980. On the Direction of Preference for Moments of Higher Order than the Variance. Journal of Finance 35(4):915-919.
data(managers)
Return.centered(managers[,1:3,drop=FALSE])
Run the code above in your browser using DataLab