[Returnanalytics-commits] r1962 - in pkg/PerformanceAnalytics: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu May 24 18:02:34 CEST 2012
Author: braverock
Date: 2012-05-24 18:02:34 +0200 (Thu, 24 May 2012)
New Revision: 1962
Added:
pkg/PerformanceAnalytics/man/CoMoments.Rd
Removed:
pkg/PerformanceAnalytics/man/CoVariance.Rd
Modified:
pkg/PerformanceAnalytics/R/CoMoments.R
Log:
- roxygenize CoMoments Rd
Modified: pkg/PerformanceAnalytics/R/CoMoments.R
===================================================================
--- pkg/PerformanceAnalytics/R/CoMoments.R 2012-05-23 19:57:02 UTC (rev 1961)
+++ pkg/PerformanceAnalytics/R/CoMoments.R 2012-05-24 16:02:34 UTC (rev 1962)
@@ -143,6 +143,66 @@
###############################################################################
+#' Functions for calculating comoments of financial time series
+#'
+#' calculates coskewness and cokurtosis as the skewness and kurtosis of two
+#' assets with reference to one another.
+#'
+#' Ranaldo and Favre (2005) define coskewness and cokurtosis as the skewness
+#' and kurtosis of a given asset analysed with the skewness and kurtosis of the
+#' reference asset or portfolio. Adding an asset to a portfolio, such as a
+#' hedge fund with a significant level of coskewness to the portfolio, can
+#' increase or decrease the resulting portfolio's skewness. Similarly, adding a
+#' hedge fund with a positive cokurtosis coefficient will add kurtosis to the
+#' portfolio.
+#'
+#' The co-moments are useful for measuring the marginal contribution of each
+#' asset to the portfolio's resulting risk. As such, comoments of asset return
+#' distribution should be useful as inputs for portfolio optimization in
+#' addition to the covariance matrix. Martellini and Ziemann (2007) point out
+#' that the problem of portfolio selection becomes one of selecting tangency
+#' points in four dimensions, incorporating expected return, second, third and
+#' fourth centered moments of asset returns.
+#'
+#' Even outside of the optimization problem, measuring the co-moments should be
+#' a useful tool for evaluating whether or not an asset is likely to provide
+#' diversification potential to a portfolio, not only in terms of normal risk
+#' (i.e. volatility) but also the risk of assymetry (skewness) and extreme
+#' events (kurtosis).
+#' @name CoMoments
+#' @concept co-moments
+#' @concept moments
+#' @aliases CoMoments CoVariance CoSkewness CoKurtosis
+#' @param Ra an xts, vector, matrix, data frame, timeSeries or zoo object of
+#' asset returns
+#' @param Rb an xts, vector, matrix, data frame, timeSeries or zoo object of
+#' index, benchmark, portfolio, or secondary asset returns to compare against
+#' @author Kris Boudt, Peter Carl, Brian Peterson
+#' @seealso \code{\link{BetaCoSkewness}} \cr \code{\link{BetaCoKurtosis}} \cr
+#' \code{\link{BetaCoMoments}} \cr % \code{\link{MultivariateMoments}}
+#' @references 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.
+#' @keywords ts multivariate distribution models
+#' @examples
+#'
+#' data(managers)
+#' CoVariance(managers[, "HAM2", drop=FALSE], managers[, "SP500 TR", drop=FALSE])
+#' CoSkewness(managers[, "HAM2", drop=FALSE], managers[, "SP500 TR", drop=FALSE])
+#' CoKurtosis(managers[, "HAM2", drop=FALSE], managers[, "SP500 TR", drop=FALSE])
+#'
+#'
CoVariance<- function(Ra,Rb)
{# @author Kris Boudt, Peter Carl
Ra= checkData(Ra)
@@ -199,7 +259,7 @@
}
}
-
+#' @rdname CoMoments
CoSkewness <- function(Ra,Rb)
{# @author Kris Boudt, Peter Carl
Ra= checkData(Ra)
@@ -271,6 +331,7 @@
}
}
+#' @rdname CoMoments
CoKurtosis <- function(Ra,Rb)
{# @author Kris Boudt, Peter Carl
Ra= checkData(Ra)
Copied: pkg/PerformanceAnalytics/man/CoMoments.Rd (from rev 1959, pkg/PerformanceAnalytics/man/CoVariance.Rd)
===================================================================
--- pkg/PerformanceAnalytics/man/CoMoments.Rd (rev 0)
+++ pkg/PerformanceAnalytics/man/CoMoments.Rd 2012-05-24 16:02:34 UTC (rev 1962)
@@ -0,0 +1,97 @@
+\name{CoMoments}
+\alias{CoKurtosis}
+\alias{CoMoments}
+\alias{CoSkewness}
+\alias{CoVariance}
+\title{Functions for calculating comoments of financial time series}
+\usage{
+ CoVariance(Ra, Rb)
+
+ CoSkewness(Ra, Rb)
+
+ CoKurtosis(Ra, Rb)
+}
+\arguments{
+ \item{Ra}{an xts, vector, matrix, data frame, timeSeries
+ or zoo object of asset returns}
+
+ \item{Rb}{an xts, vector, matrix, data frame, timeSeries
+ or zoo object of index, benchmark, portfolio, or
+ secondary asset returns to compare against}
+}
+\description{
+ calculates coskewness and cokurtosis as the skewness and
+ kurtosis of two assets with reference to one another.
+}
+\details{
+ Ranaldo and Favre (2005) define coskewness and cokurtosis
+ as the skewness and kurtosis of a given asset analysed
+ with the skewness and kurtosis of the reference asset or
+ portfolio. Adding an asset to a portfolio, such as a
+ hedge fund with a significant level of coskewness to the
+ portfolio, can increase or decrease the resulting
+ portfolio's skewness. Similarly, adding a hedge fund with
+ a positive cokurtosis coefficient will add kurtosis to
+ the portfolio.
+
+ The co-moments are useful for measuring the marginal
+ contribution of each asset to the portfolio's resulting
+ risk. As such, comoments of asset return distribution
+ should be useful as inputs for portfolio optimization in
+ addition to the covariance matrix. Martellini and
+ Ziemann (2007) point out that the problem of portfolio
+ selection becomes one of selecting tangency points in
+ four dimensions, incorporating expected return, second,
+ third and fourth centered moments of asset returns.
+
+ Even outside of the optimization problem, measuring the
+ co-moments should be a useful tool for evaluating whether
+ or not an asset is likely to provide diversification
+ potential to a portfolio, not only in terms of normal
+ risk (i.e. volatility) but also the risk of assymetry
+ (skewness) and extreme events (kurtosis).
+}
+\examples{
+data(managers)
+CoVariance(managers[, "HAM2", drop=FALSE], managers[, "SP500 TR", drop=FALSE])
+CoSkewness(managers[, "HAM2", drop=FALSE], managers[, "SP500 TR", drop=FALSE])
+CoKurtosis(managers[, "HAM2", drop=FALSE], managers[, "SP500 TR", drop=FALSE])
+}
+\author{
+ Kris Boudt, Peter Carl, Brian Peterson
+}
+\references{
+ 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.
+}
+\seealso{
+ \code{\link{BetaCoSkewness}} \cr
+ \code{\link{BetaCoKurtosis}} \cr
+ \code{\link{BetaCoMoments}} \cr %
+ \code{\link{MultivariateMoments}}
+}
+\concept{
+ co-moments
+
+ moments
+}
+\keyword{distribution}
+\keyword{models}
+\keyword{multivariate}
+\keyword{ts}
+
Deleted: pkg/PerformanceAnalytics/man/CoVariance.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/CoVariance.Rd 2012-05-23 19:57:02 UTC (rev 1961)
+++ pkg/PerformanceAnalytics/man/CoVariance.Rd 2012-05-24 16:02:34 UTC (rev 1962)
@@ -1,57 +0,0 @@
-\name{Co-Moments}
-\alias{CoMoments}
-\alias{CoVariance}
-\alias{CoSkewness}
-\alias{CoKurtosis}
-\title{ Functions for calculating comoments of financial time series }
-\description{
-calculates coskewness and cokurtosis as the skewness and kurtosis of two assets with reference to one another.
-}
-\usage{
-CoVariance(Ra,Rb)
-CoSkewness(Ra,Rb)
-CoKurtosis(Ra,Rb)
-}
-%- maybe also 'usage' for other objects documented here.
-\arguments{
- \item{Ra}{ an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns }
- \item{Rb}{ an xts, vector, matrix, data frame, timeSeries or zoo object of index, benchmark, portfolio, or secondary asset returns to compare against }
-}
-\details{
-Ranaldo and Favre (2005) define coskewness and cokurtosis as the skewness and kurtosis of a given asset analysed with the skewness and kurtosis of the reference asset or portfolio. Adding an asset to a portfolio, such as a hedge fund with a significant level of coskewness to the portfolio, can increase or decrease the resulting portfolio's skewness. Similarly, adding a hedge fund with a positive cokurtosis coefficient will add kurtosis to the portfolio.
-
-The co-moments are useful for measuring the marginal contribution of each asset to the portfolio's resulting risk. As such, comoments of asset return distribution should be useful as inputs for portfolio optimization in addition to the covariance matrix. Martellini and Ziemann (2007) point out that the problem of portfolio selection becomes one of selecting tangency points in four dimensions, incorporating expected return, second, third and fourth centered moments of asset returns.
-
-Even outside of the optimization problem, measuring the co-moments should be a useful tool for evaluating whether or not an asset is likely to provide diversification potential to a portfolio, not only in terms of normal risk (i.e. volatility) but also the risk of assymetry (skewness) and extreme events (kurtosis).
-}
-\references{
-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.
-}
-\author{ Kris Boudt, Peter Carl, Brian Peterson }
-\seealso{ \code{\link{BetaCoSkewness}} \cr
- \code{\link{BetaCoKurtosis}} \cr
- \code{\link{BetaCoMoments}} \cr
-% \code{\link{MultivariateMoments}}
-}
-\examples{
-data(managers)
-CoVariance(managers[, "HAM2", drop=FALSE], managers[, "SP500 TR", drop=FALSE])
-CoSkewness(managers[, "HAM2", drop=FALSE], managers[, "SP500 TR", drop=FALSE])
-CoKurtosis(managers[, "HAM2", drop=FALSE], managers[, "SP500 TR", drop=FALSE])
-
-}
-% Add one or more standard keywords, see file 'KEYWORDS' in the
-% R documentation directory.
-\keyword{ ts }
-\keyword{ multivariate }
-\keyword{ distribution }
-\keyword{ models }
More information about the Returnanalytics-commits
mailing list