\HeaderA{Return.centered}{calculate centered Returns}{Return.centered}
\aliasA{centeredcomoment}{Return.centered}{centeredcomoment}
\aliasA{centeredmoment}{Return.centered}{centeredmoment}
\keyword{ts}{Return.centered}
\keyword{multivariate}{Return.centered}
\keyword{distribution}{Return.centered}
\keyword{models}{Return.centered}
\begin{Description}\relax
the \eqn{n}{}-th centered moment is calculated as
\deqn{
\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.
\end{Description}
\begin{Usage}
\begin{verbatim}
centeredcomoment (Ra, Rb, p1, p2, normalize = FALSE)
centeredmoment (R, power)
Return.centered (R, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{R}] an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns 
\item[\code{Ra}] an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns 
\item[\code{Rb}] an xts, vector, matrix, data frame, timeSeries or zoo object of index, benchmark, portfolio, or secondary asset returns to compare against 
\item[\code{power}] power or moment to calculate 
\item[\code{p1}] first power of the comoment 
\item[\code{p2}] second power of the comoment 
\item[\code{normalize}] whether to standardize the calculation to agree with common usage, or leave the default mathematical meaning 
\item[\code{...}] any other passthru parameters 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
These functions were first utilized in Boudt, Peterson, and Croux (2008), and have been subsequently used in our other research.

\textasciitilde{}\textasciitilde{} Additional Details will be added to documentation as soon as we have time to write them. \textasciitilde{}\textasciitilde{}
\end{Details}
\begin{Author}\relax
Kris Boudt and Brian Peterson
\end{Author}
\begin{References}\relax
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, Lionel, and Volker Ziemann. 2007. Improved Forecasts of Higher-Order Comoments and Implications for Portfolio Selection. EDHEC Risk and Asset Management Research Centre working paper.

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.
\end{References}
\begin{Examples}
\begin{ExampleCode}

data(managers)
Return.centered(managers[,1:3,drop=FALSE])

\end{ExampleCode}
\end{Examples}

