[Returnanalytics-commits] r3332 - in pkg/PerformanceAnalytics: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Feb 23 13:51:49 CET 2014
Author: braverock
Date: 2014-02-23 13:51:48 +0100 (Sun, 23 Feb 2014)
New Revision: 3332
Modified:
pkg/PerformanceAnalytics/DESCRIPTION
pkg/PerformanceAnalytics/NAMESPACE
pkg/PerformanceAnalytics/R/DownsideDeviation.R
pkg/PerformanceAnalytics/R/Return.calculate.R
pkg/PerformanceAnalytics/R/StdDev.annualized.R
pkg/PerformanceAnalytics/R/chart.Events.R
pkg/PerformanceAnalytics/R/table.CaptureRatios.R
pkg/PerformanceAnalytics/R/table.UpDownRatios.R
pkg/PerformanceAnalytics/man/ActivePremium.Rd
pkg/PerformanceAnalytics/man/AdjustedSharpeRatio.Rd
pkg/PerformanceAnalytics/man/AppraisalRatio.Rd
pkg/PerformanceAnalytics/man/AverageDrawdown.Rd
pkg/PerformanceAnalytics/man/BernardoLedoitRatio.Rd
pkg/PerformanceAnalytics/man/BetaCoMoments.Rd
pkg/PerformanceAnalytics/man/BurkeRatio.Rd
pkg/PerformanceAnalytics/man/CAPM.RiskPremium.Rd
pkg/PerformanceAnalytics/man/CAPM.alpha.Rd
pkg/PerformanceAnalytics/man/CAPM.beta.Rd
pkg/PerformanceAnalytics/man/CAPM.dynamic.Rd
pkg/PerformanceAnalytics/man/CAPM.epsilon.Rd
pkg/PerformanceAnalytics/man/CAPM.jensenAlpha.Rd
pkg/PerformanceAnalytics/man/CDD.Rd
pkg/PerformanceAnalytics/man/CalmarRatio.Rd
pkg/PerformanceAnalytics/man/CoMoments.Rd
pkg/PerformanceAnalytics/man/DRatio.Rd
pkg/PerformanceAnalytics/man/DownsideDeviation.Rd
pkg/PerformanceAnalytics/man/DownsideFrequency.Rd
pkg/PerformanceAnalytics/man/DrawdownDeviation.Rd
pkg/PerformanceAnalytics/man/DrawdownPeak.Rd
pkg/PerformanceAnalytics/man/ES.Rd
pkg/PerformanceAnalytics/man/FamaBeta.Rd
pkg/PerformanceAnalytics/man/Frequency.Rd
pkg/PerformanceAnalytics/man/HurstIndex.Rd
pkg/PerformanceAnalytics/man/InformationRatio.Rd
pkg/PerformanceAnalytics/man/Kappa.Rd
pkg/PerformanceAnalytics/man/KellyRatio.Rd
pkg/PerformanceAnalytics/man/M2Sortino.Rd
pkg/PerformanceAnalytics/man/MSquared.Rd
pkg/PerformanceAnalytics/man/MSquaredExcess.Rd
pkg/PerformanceAnalytics/man/MarketTiming.Rd
pkg/PerformanceAnalytics/man/MartinRatio.Rd
pkg/PerformanceAnalytics/man/MeanAbsoluteDeviation.Rd
pkg/PerformanceAnalytics/man/Modigliani.Rd
pkg/PerformanceAnalytics/man/NetSelectivity.Rd
pkg/PerformanceAnalytics/man/Omega.Rd
pkg/PerformanceAnalytics/man/OmegaExcessReturn.Rd
pkg/PerformanceAnalytics/man/OmegaSharpeRatio.Rd
pkg/PerformanceAnalytics/man/PainIndex.Rd
pkg/PerformanceAnalytics/man/PainRatio.Rd
pkg/PerformanceAnalytics/man/ProspectRatio.Rd
pkg/PerformanceAnalytics/man/Return.Geltner.Rd
pkg/PerformanceAnalytics/man/Return.annualized.Rd
pkg/PerformanceAnalytics/man/Return.annualized.excess.Rd
pkg/PerformanceAnalytics/man/Return.calculate.Rd
pkg/PerformanceAnalytics/man/Return.clean.Rd
pkg/PerformanceAnalytics/man/Return.cumulative.Rd
pkg/PerformanceAnalytics/man/Return.excess.Rd
pkg/PerformanceAnalytics/man/Return.portfolio.Rd
pkg/PerformanceAnalytics/man/Return.read.Rd
pkg/PerformanceAnalytics/man/Return.relative.Rd
pkg/PerformanceAnalytics/man/Selectivity.Rd
pkg/PerformanceAnalytics/man/SharpeRatio.Rd
pkg/PerformanceAnalytics/man/SharpeRatio.annualized.Rd
pkg/PerformanceAnalytics/man/SkewnessKurtosisRatio.Rd
pkg/PerformanceAnalytics/man/SmoothingIndex.Rd
pkg/PerformanceAnalytics/man/SortinoRatio.Rd
pkg/PerformanceAnalytics/man/SpecificRisk.Rd
pkg/PerformanceAnalytics/man/StdDev.Rd
pkg/PerformanceAnalytics/man/StdDev.annualized.Rd
pkg/PerformanceAnalytics/man/SystematicRisk.Rd
pkg/PerformanceAnalytics/man/TotalRisk.Rd
pkg/PerformanceAnalytics/man/TrackingError.Rd
pkg/PerformanceAnalytics/man/TreynorRatio.Rd
pkg/PerformanceAnalytics/man/UlcerIndex.Rd
pkg/PerformanceAnalytics/man/UpDownRatios.Rd
pkg/PerformanceAnalytics/man/UpsideFrequency.Rd
pkg/PerformanceAnalytics/man/UpsidePotentialRatio.Rd
pkg/PerformanceAnalytics/man/UpsideRisk.Rd
pkg/PerformanceAnalytics/man/VaR.Rd
pkg/PerformanceAnalytics/man/VolatilitySkewness.Rd
pkg/PerformanceAnalytics/man/apply.fromstart.Rd
pkg/PerformanceAnalytics/man/apply.rolling.Rd
pkg/PerformanceAnalytics/man/centeredmoments.Rd
pkg/PerformanceAnalytics/man/chart.ACF.Rd
pkg/PerformanceAnalytics/man/chart.Bar.Rd
pkg/PerformanceAnalytics/man/chart.BarVaR.Rd
pkg/PerformanceAnalytics/man/chart.Boxplot.Rd
pkg/PerformanceAnalytics/man/chart.CaptureRatios.Rd
pkg/PerformanceAnalytics/man/chart.Correlation.Rd
pkg/PerformanceAnalytics/man/chart.CumReturns.Rd
pkg/PerformanceAnalytics/man/chart.Drawdown.Rd
pkg/PerformanceAnalytics/man/chart.ECDF.Rd
pkg/PerformanceAnalytics/man/chart.Events.Rd
pkg/PerformanceAnalytics/man/chart.Histogram.Rd
pkg/PerformanceAnalytics/man/chart.QQPlot.Rd
pkg/PerformanceAnalytics/man/chart.Regression.Rd
pkg/PerformanceAnalytics/man/chart.RelativePerformance.Rd
pkg/PerformanceAnalytics/man/chart.RiskReturnScatter.Rd
pkg/PerformanceAnalytics/man/chart.RollingCorrelation.Rd
pkg/PerformanceAnalytics/man/chart.RollingMean.Rd
pkg/PerformanceAnalytics/man/chart.RollingPerformance.Rd
pkg/PerformanceAnalytics/man/chart.RollingRegression.Rd
pkg/PerformanceAnalytics/man/chart.Scatter.Rd
pkg/PerformanceAnalytics/man/chart.SnailTrail.Rd
pkg/PerformanceAnalytics/man/chart.StackedBar.Rd
pkg/PerformanceAnalytics/man/chart.TimeSeries.Rd
pkg/PerformanceAnalytics/man/chart.VaRSensitivity.Rd
pkg/PerformanceAnalytics/man/charts.PerformanceSummary.Rd
pkg/PerformanceAnalytics/man/charts.RollingPerformance.Rd
pkg/PerformanceAnalytics/man/checkData.Rd
pkg/PerformanceAnalytics/man/clean.boudt.Rd
pkg/PerformanceAnalytics/man/findDrawdowns.Rd
pkg/PerformanceAnalytics/man/kurtosis.Rd
pkg/PerformanceAnalytics/man/legend.Rd
pkg/PerformanceAnalytics/man/lpm.Rd
pkg/PerformanceAnalytics/man/maxDrawdown.Rd
pkg/PerformanceAnalytics/man/mean.geometric.Rd
pkg/PerformanceAnalytics/man/skewness.Rd
pkg/PerformanceAnalytics/man/sortDrawdowns.Rd
pkg/PerformanceAnalytics/man/table.AnnualizedReturns.Rd
pkg/PerformanceAnalytics/man/table.Arbitrary.Rd
pkg/PerformanceAnalytics/man/table.Autocorrelation.Rd
pkg/PerformanceAnalytics/man/table.CAPM.Rd
pkg/PerformanceAnalytics/man/table.CalendarReturns.Rd
pkg/PerformanceAnalytics/man/table.CaptureRatios.Rd
pkg/PerformanceAnalytics/man/table.Correlation.Rd
pkg/PerformanceAnalytics/man/table.Distributions.Rd
pkg/PerformanceAnalytics/man/table.DownsideRisk.Rd
pkg/PerformanceAnalytics/man/table.DownsideRiskRatio.Rd
pkg/PerformanceAnalytics/man/table.Drawdowns.Rd
pkg/PerformanceAnalytics/man/table.DrawdownsRatio.Rd
pkg/PerformanceAnalytics/man/table.HigherMoments.Rd
pkg/PerformanceAnalytics/man/table.InformationRatio.Rd
pkg/PerformanceAnalytics/man/table.MonthlyReturns.Rd
pkg/PerformanceAnalytics/man/table.RollingPeriods.Rd
pkg/PerformanceAnalytics/man/table.SpecificRisk.Rd
pkg/PerformanceAnalytics/man/table.Variability.Rd
pkg/PerformanceAnalytics/man/textplot.Rd
pkg/PerformanceAnalytics/man/zerofill.Rd
Log:
- updates ahead of CRAN release
Modified: pkg/PerformanceAnalytics/DESCRIPTION
===================================================================
--- pkg/PerformanceAnalytics/DESCRIPTION 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/DESCRIPTION 2014-02-23 12:51:48 UTC (rev 3332)
@@ -1,7 +1,7 @@
Package: PerformanceAnalytics
Type: Package
Title: Econometric tools for performance and risk analysis.
-Version: 1.1.3
+Version: 1.1.4
Date: $Date$
Author: Peter Carl, Brian G. Peterson
Maintainer: Brian G. Peterson <brian at braverock.com>
@@ -21,7 +21,7 @@
Suggests:
Hmisc,
MASS,
- tseries,
+ quantmod,
quadprog,
gamlss,
robustbase,
Modified: pkg/PerformanceAnalytics/NAMESPACE
===================================================================
--- pkg/PerformanceAnalytics/NAMESPACE 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/NAMESPACE 2014-02-23 12:51:48 UTC (rev 3332)
@@ -34,6 +34,7 @@
export(DRatio)
export(DownsideDeviation)
export(DownsideFrequency)
+export(DownsidePotential)
export(DrawdownDeviation)
export(DrawdownPeak)
export(ES)
@@ -181,6 +182,8 @@
export(rich8equal)
export(risk.dates)
export(risk.labels)
+export(sd.annualized)
+export(sd.multiperiod)
export(set6equal)
export(set8equal)
export(skewness)
@@ -203,6 +206,7 @@
export(table.SpecificRisk)
export(table.Stats)
export(table.TrailingPeriods)
+export(table.UpDownRatios)
export(table.Variability)
export(textplot)
export(tim10equal)
@@ -225,6 +229,7 @@
export(tol7qualitative)
export(tol8qualitative)
export(tol9qualitative)
+export(zerofill)
importFrom(stats,sd)
importFrom(utils,packageDescription)
importFrom(zoo,rollapply)
Modified: pkg/PerformanceAnalytics/R/DownsideDeviation.R
===================================================================
--- pkg/PerformanceAnalytics/R/DownsideDeviation.R 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/R/DownsideDeviation.R 2014-02-23 12:51:48 UTC (rev 3332)
@@ -156,6 +156,8 @@
}
}
+#' @rdname DownsideDeviation
+#' @export
DownsidePotential <-
function (R, MAR=0)
{ # @author Peter Carl, Matthieu Lestel
Modified: pkg/PerformanceAnalytics/R/Return.calculate.R
===================================================================
--- pkg/PerformanceAnalytics/R/Return.calculate.R 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/R/Return.calculate.R 2014-02-23 12:51:48 UTC (rev 3332)
@@ -41,8 +41,8 @@
#' @examples
#'
#' \dontrun{
-#' require(tseries)
-#' prices = get.hist.quote("IBM", start = "1999-01-01", end = "2007-01-01", quote = "AdjClose", compression = "d")
+#' require(quantmod)
+#' prices = getSymbols("IBM", from = "1999-01-01", to = "2007-01-01")
#' }
#' \dontshow{
#' data(prices)
Modified: pkg/PerformanceAnalytics/R/StdDev.annualized.R
===================================================================
--- pkg/PerformanceAnalytics/R/StdDev.annualized.R 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/R/StdDev.annualized.R 2014-02-23 12:51:48 UTC (rev 3332)
@@ -44,7 +44,8 @@
#' # now for three periods:
#' sd.multiperiod(edhec[,6,drop=FALSE],scale=3)
#'
-#' @export
+#' @export StdDev.annualized sd.annualized sd.multiperiod
+#' @alias StdDev.annualized sd.annualized sd.multiperiod
#' @rdname StdDev.annualized
StdDev.annualized <- sd.annualized <- sd.multiperiod <-
function (x, scale = NA, ...)
Modified: pkg/PerformanceAnalytics/R/chart.Events.R
===================================================================
--- pkg/PerformanceAnalytics/R/chart.Events.R 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/R/chart.Events.R 2014-02-23 12:51:48 UTC (rev 3332)
@@ -33,17 +33,17 @@
#' \code{\link{par}}
#' @keywords ts hplot
#' @examples
-#'
+#' \dontrun{
#' data(managers)
-#' R = Drawdowns(managers[,2,drop=FALSE])
+#' R = PerformanceAnalytics:::Drawdowns(managers[,2,drop=FALSE])
#' n = table.Drawdowns(managers[,2,drop=FALSE])
-#' chart.Events(Drawdowns(managers[,2,drop=FALSE]),
+#' chart.Events(PerformanceAnalytics:::Drawdowns(managers[,2,drop=FALSE]),
#' dates = n$Trough,
#' prior=max(na.omit(n$"To Trough")),
#' post=max(na.omit(n$Recovery)),
#' lwd=2, colorset=redfocus, legend.loc=NULL,
#' main = "Worst Drawdowns")
-#'
+#' }
#' @export
chart.Events <-
function (R, dates, prior=12, post=12, main = NULL, xlab=NULL, ...)
Modified: pkg/PerformanceAnalytics/R/table.CaptureRatios.R
===================================================================
--- pkg/PerformanceAnalytics/R/table.CaptureRatios.R 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/R/table.CaptureRatios.R 2014-02-23 12:51:48 UTC (rev 3332)
@@ -9,7 +9,6 @@
#' \code{table.UpDownRatios} shows three: the capture ratio, the number ratio,
#' and the percentage ratio.
#'
-#' @aliases table.CaptureRatios table.UpDownRatios
#' @param Ra a vector of returns to test, e.g., the asset to be examined
#' @param Rb a matrix, data.frame, or timeSeries of benchmark(s) to test the
#' asset against.
@@ -28,6 +27,8 @@
#' textplot(result, rmar = 0.8, cmar = 1.5, max.cex=.9, halign = "center", valign = "top", row.valign="center", wrap.rownames=15, wrap.colnames=10, mar = c(0,0,3,0)+0.1)
#' title(main="Capture Ratios for EDHEC LS EQ")
#'
+#' @aliases table.CaptureRatios table.UpDownRatios
+#'
#' @export
table.CaptureRatios <-
function (Ra, Rb, digits = 4)
Modified: pkg/PerformanceAnalytics/R/table.UpDownRatios.R
===================================================================
--- pkg/PerformanceAnalytics/R/table.UpDownRatios.R 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/R/table.UpDownRatios.R 2014-02-23 12:51:48 UTC (rev 3332)
@@ -1,3 +1,5 @@
+#' @rdname table.CaptureRatios
+#' @export
table.UpDownRatios <-
function (Ra, Rb, digits = 4)
{# @author Peter Carl
Modified: pkg/PerformanceAnalytics/man/ActivePremium.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/ActivePremium.Rd 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/man/ActivePremium.Rd 2014-02-23 12:51:48 UTC (rev 3332)
@@ -3,7 +3,7 @@
\alias{ActiveReturn}
\title{Active Premium or Active Return}
\usage{
- ActiveReturn(Ra, Rb, scale = NA)
+ActiveReturn(Ra, Rb, scale = NA)
}
\arguments{
\item{Ra}{return vector of the portfolio}
@@ -14,14 +14,14 @@
252, monthly scale = 12, quarterly scale = 4)}
}
\description{
- The return on an investment's annualized return minus the
- benchmark's annualized return.
+The return on an investment's annualized return minus the
+benchmark's annualized return.
}
\details{
- Active Premium = Investment's annualized return -
- Benchmark's annualized return
+Active Premium = Investment's annualized return -
+Benchmark's annualized return
- Also commonly referred to as 'active return'.
+Also commonly referred to as 'active return'.
}
\examples{
data(managers)
@@ -31,16 +31,15 @@
ActivePremium(managers[,1:6], managers[,8:7,drop=FALSE])
}
\author{
- Peter Carl
+Peter Carl
}
\references{
- Sharpe, W.F. The Sharpe Ratio,\emph{Journal of Portfolio
- Management},Fall 1994, 49-58.
+Sharpe, W.F. The Sharpe Ratio,\emph{Journal of Portfolio
+Management},Fall 1994, 49-58.
}
\seealso{
- \code{\link{InformationRatio}}
- \code{\link{TrackingError}}
- \code{\link{Return.annualized}}
+\code{\link{InformationRatio}} \code{\link{TrackingError}}
+\code{\link{Return.annualized}}
}
\keyword{distribution}
\keyword{models}
Modified: pkg/PerformanceAnalytics/man/AdjustedSharpeRatio.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/AdjustedSharpeRatio.Rd 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/man/AdjustedSharpeRatio.Rd 2014-02-23 12:51:48 UTC (rev 3332)
@@ -2,7 +2,7 @@
\alias{AdjustedSharpeRatio}
\title{Adjusted Sharpe ratio of the return distribution}
\usage{
- AdjustedSharpeRatio(R, Rf = 0, ...)
+AdjustedSharpeRatio(R, Rf = 0, ...)
}
\arguments{
\item{R}{an xts, vector, matrix, data frame, timeSeries
@@ -13,18 +13,18 @@
\item{\dots}{any other passthru parameters}
}
\description{
- Adjusted Sharpe ratio was introduced by Pezier and White
- (2006) to adjusts for skewness and kurtosis by
- incorporating a penalty factor for negative skewness and
- excess kurtosis.
+Adjusted Sharpe ratio was introduced by Pezier and White
+(2006) to adjusts for skewness and kurtosis by
+incorporating a penalty factor for negative skewness and
+excess kurtosis.
}
\details{
- \deqn{Adjusted Sharpe Ratio = SR * [1 + (\frac{S}{6}) *
- SR - (\frac{K - 3}{24}) * SR^2]}{Adjusted Sharpe ratio =
- SR x [1 + (S/6) x SR - ((K-3) / 24) x SR^2]}
+\deqn{Adjusted Sharpe Ratio = SR * [1 + (\frac{S}{6}) * SR
+- (\frac{K - 3}{24}) * SR^2]}{Adjusted Sharpe ratio = SR x
+[1 + (S/6) x SR - ((K-3) / 24) x SR^2]}
- where \eqn{SR} is the sharpe ratio with data annualized,
- \eqn{S} is the skewness and \eqn{K} is the kurtosis
+where \eqn{SR} is the sharpe ratio with data annualized,
+\eqn{S} is the skewness and \eqn{K} is the kurtosis
}
\examples{
data(portfolio_bacon)
@@ -35,11 +35,11 @@
print(AdjustedSharpeRatio(managers['1996',1]))
}
\author{
- Matthieu Lestel
+Matthieu Lestel
}
\references{
- Carl Bacon, \emph{Practical portfolio performance
- measurement and attribution}, second edition 2008 p.99
+Carl Bacon, \emph{Practical portfolio performance
+measurement and attribution}, second edition 2008 p.99
}
\keyword{distribution}
\keyword{models}
Modified: pkg/PerformanceAnalytics/man/AppraisalRatio.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/AppraisalRatio.Rd 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/man/AppraisalRatio.Rd 2014-02-23 12:51:48 UTC (rev 3332)
@@ -2,9 +2,8 @@
\alias{AppraisalRatio}
\title{Appraisal ratio of the return distribution}
\usage{
- AppraisalRatio(Ra, Rb, Rf = 0,
- method = c("appraisal", "modified", "alternative"),
- ...)
+AppraisalRatio(Ra, Rb, Rf = 0, method = c("appraisal", "modified",
+ "alternative"), ...)
}
\arguments{
\item{Ra}{an xts, vector, matrix, data frame, timeSeries
@@ -22,32 +21,31 @@
\item{\dots}{any other passthru parameters}
}
\description{
- Appraisal ratio is the Jensen's alpha adjusted for
- specific risk. The numerator is divided by specific risk
- instead of total risk.
+Appraisal ratio is the Jensen's alpha adjusted for specific
+risk. The numerator is divided by specific risk instead of
+total risk.
}
\details{
- Modified Jensen's alpha is Jensen's alpha divided by
- beta.
+Modified Jensen's alpha is Jensen's alpha divided by beta.
- Alternative Jensen's alpha is Jensen's alpha divided by
- systematic risk.
+Alternative Jensen's alpha is Jensen's alpha divided by
+systematic risk.
- \deqn{Appraisal ratio =
- \frac{\alpha}{\sigma_{\epsilon}}}{Appraisal ratio =
- Jensen's alpha / specific risk}
+\deqn{Appraisal ratio =
+\frac{\alpha}{\sigma_{\epsilon}}}{Appraisal ratio =
+Jensen's alpha / specific risk}
- \deqn{Modified Jensen's alpha =
- \frac{\alpha}{\beta}}{Modified Jensen's alpha = Jensen's
- alpha / beta}
+\deqn{Modified Jensen's alpha =
+\frac{\alpha}{\beta}}{Modified Jensen's alpha = Jensen's
+alpha / beta}
- \deqn{Alternative Jensen's alpha =
- \frac{\alpha}{\sigma_S}}{Alternative Jensen's alpha =
- Jensen's alpha / systematic risk}
+\deqn{Alternative Jensen's alpha =
+\frac{\alpha}{\sigma_S}}{Alternative Jensen's alpha =
+Jensen's alpha / systematic risk}
- where \eqn{alpha} is the Jensen's alpha,
- \eqn{\sigma_{epsilon}} is the specific risk,
- \eqn{\sigma_S} is the systematic risk.
+where \eqn{alpha} is the Jensen's alpha,
+\eqn{\sigma_{epsilon}} is the specific risk, \eqn{\sigma_S}
+is the systematic risk.
}
\examples{
data(portfolio_bacon)
@@ -60,11 +58,11 @@
print(AppraisalRatio(managers['1996',1:5], managers['1996',8]))
}
\author{
- Matthieu Lestel
+Matthieu Lestel
}
\references{
- Carl Bacon, \emph{Practical portfolio performance
- measurement and attribution}, second edition 2008 p.77
+Carl Bacon, \emph{Practical portfolio performance
+measurement and attribution}, second edition 2008 p.77
}
\keyword{distribution}
\keyword{models}
Modified: pkg/PerformanceAnalytics/man/AverageDrawdown.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/AverageDrawdown.Rd 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/man/AverageDrawdown.Rd 2014-02-23 12:51:48 UTC (rev 3332)
@@ -3,9 +3,9 @@
\alias{AverageRecovery}
\title{Calculates the average of the observed drawdowns.}
\usage{
- AverageDrawdown(R, ...)
+AverageDrawdown(R, ...)
- AverageRecovery(R, ...)
+AverageRecovery(R, ...)
}
\arguments{
\item{R}{an xts, vector, matrix, data frame, timeSeries
@@ -14,8 +14,8 @@
\item{\dots}{any other passthru parameters}
}
\description{
- ADD = abs(sum[j=1,2,...,d](D_j/d)) where D'_j = jth
- drawdown over entire period d = total number of drawdowns
- in the entire period
+ADD = abs(sum[j=1,2,...,d](D_j/d)) where D'_j = jth
+drawdown over entire period d = total number of drawdowns
+in the entire period
}
Modified: pkg/PerformanceAnalytics/man/BernardoLedoitRatio.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/BernardoLedoitRatio.Rd 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/man/BernardoLedoitRatio.Rd 2014-02-23 12:51:48 UTC (rev 3332)
@@ -2,7 +2,7 @@
\alias{BernardoLedoitRatio}
\title{Bernardo and Ledoit ratio of the return distribution}
\usage{
- BernardoLedoitRatio(R, ...)
+BernardoLedoitRatio(R, ...)
}
\arguments{
\item{R}{an xts, vector, matrix, data frame, timeSeries
@@ -11,19 +11,19 @@
\item{\dots}{any other passthru parameters}
}
\description{
- To calculate Bernardo and Ledoit ratio we take the sum of
- the subset of returns that are above 0 and we divide it
- by the opposite of the sum of the subset of returns that
- are below 0
+To calculate Bernardo and Ledoit ratio we take the sum of
+the subset of returns that are above 0 and we divide it by
+the opposite of the sum of the subset of returns that are
+below 0
}
\details{
- \deqn{BernardoLedoitRatio(R) =
- \frac{\frac{1}{n}\sum^{n}_{t=1}{max(R_{t},0)}}{\frac{1}{n}\sum^{n}_{t=1}{max(-R_{t},0)}}}{BernardoLedoitRatio(R)
- = 1/n*sum(t=1..n)(max(R(t),0)) /
- 1/n*sum(t=1..n)(max(-R(t),0))}
+\deqn{BernardoLedoitRatio(R) =
+\frac{\frac{1}{n}\sum^{n}_{t=1}{max(R_{t},0)}}{\frac{1}{n}\sum^{n}_{t=1}{max(-R_{t},0)}}}{BernardoLedoitRatio(R)
+= 1/n*sum(t=1..n)(max(R(t),0)) /
+1/n*sum(t=1..n)(max(-R(t),0))}
- where \eqn{n} is the number of observations of the entire
- series
+where \eqn{n} is the number of observations of the entire
+series
}
\examples{
data(portfolio_bacon)
@@ -34,11 +34,11 @@
print(BernardoLedoitRatio(managers['1996',1])) #expected 4.598
}
\author{
- Matthieu Lestel
+Matthieu Lestel
}
\references{
- Carl Bacon, \emph{Practical portfolio performance
- measurement and attribution}, second edition 2008 p.95
+Carl Bacon, \emph{Practical portfolio performance
+measurement and attribution}, second edition 2008 p.95
}
\keyword{distribution}
\keyword{models}
Modified: pkg/PerformanceAnalytics/man/BetaCoMoments.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/BetaCoMoments.Rd 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/man/BetaCoMoments.Rd 2014-02-23 12:51:48 UTC (rev 3332)
@@ -3,15 +3,13 @@
\alias{BetaCoMoments}
\alias{BetaCoSkewness}
\alias{BetaCoVariance}
-\alias{SystematicKurtosis}
-\alias{SystematicSkewness}
\title{Functions to calculate systematic or beta co-moments of return series}
\usage{
- BetaCoVariance(Ra, Rb)
+BetaCoVariance(Ra, Rb)
- BetaCoSkewness(Ra, Rb, test = FALSE)
+BetaCoSkewness(Ra, Rb, test = FALSE)
- BetaCoKurtosis(Ra, Rb)
+BetaCoKurtosis(Ra, Rb)
}
\arguments{
\item{Ra}{an xts, vector, matrix, data frame, timeSeries
@@ -24,8 +22,8 @@
\item{test}{condition not implemented yet}
}
\description{
- calculate higher co-moment betas, or 'systematic'
- variance, skewness, and kurtosis
+calculate higher co-moment betas, or 'systematic' variance,
+skewness, and kurtosis
}
\examples{
data(managers)
@@ -37,112 +35,109 @@
BetaCoKurtosis(managers[,1:6], managers[,8:7])
}
\author{
- Kris Boudt, Peter Carl, Brian Peterson
+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.
+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.
+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.
}
\seealso{
- \code{\link{CoMoments}}
+\code{\link{CoMoments}}
}
\concept{
- beta co-moments
+beta co-moments
- moments
+moments
- The co-moments, including covariance, coskewness, and
- cokurtosis, do not allow the marginal impact of an asset
- on a portfolio to be directly measured. Instead,
- Martellini and Zieman (2007) develop a framework that
- assesses the potential diversification of an asset
- relative to a portfolio. They use higher moment betas to
- estimate how much portfolio risk will be impacted by
- adding an asset, in terms of symmetric risk (i.e.,
- volatility), in asymmetry risk (i.e., skewness), and
- extreme risks (i.e. kurtosis). That allows them to show
- that adding an asset to a portfolio (or benchmark) will
- reduce the portfolio's variance to be reduced if the
- second-order beta of the asset with respect to the
- portfolio is less than one. They develop the same
- concepts for the third and fourth order moments. The
- authors offer these higher moment betas as a measure of
- the diversification potential of an asset.
+The co-moments, including covariance, coskewness, and
+cokurtosis, do not allow the marginal impact of an asset on
+a portfolio to be directly measured. Instead, Martellini
+and Zieman (2007) develop a framework that assesses the
+potential diversification of an asset relative to a
+portfolio. They use higher moment betas to estimate how
+much portfolio risk will be impacted by adding an asset, in
+terms of symmetric risk (i.e., volatility), in asymmetry
+risk (i.e., skewness), and extreme risks (i.e. kurtosis).
+That allows them to show that adding an asset to a
+portfolio (or benchmark) will reduce the portfolio's
+variance to be reduced if the second-order beta of the
+asset with respect to the portfolio is less than one. They
+develop the same concepts for the third and fourth order
+moments. The authors offer these higher moment betas as a
+measure of the diversification potential of an asset.
- Higher moment betas are defined as proportional to the
- derivative of the covariance, coskewness and cokurtosis
- of the second, third and fourth portfolio moment with
- respect to the portfolio weights. The beta co-variance is
- calculated as:
+Higher moment betas are defined as proportional to the
+derivative of the covariance, coskewness and cokurtosis of
+the second, third and fourth portfolio moment with respect
+to the portfolio weights. The beta co-variance is
+calculated as:
- \deqn{ BetaCoV(Ra,Rb) = \beta^{(2)}_{a,b} =
- \frac{CoV(R_a,R_b)}{\mu^{(2)}(R_b)} }{BetaCoV(Ra,Rb) =
- CoV(Ra,Rb)/centeredmoment(Rb,2)}
+\deqn{ BetaCoV(Ra,Rb) = \beta^{(2)}_{a,b} =
+\frac{CoV(R_a,R_b)}{\mu^{(2)}(R_b)} }{BetaCoV(Ra,Rb) =
+CoV(Ra,Rb)/centeredmoment(Rb,2)}
- Beta co-skewness is given as:
+Beta co-skewness is given as:
- \deqn{ BetaCoS(Ra,Rb) = \beta^{(3)}_{a,b}=
- \frac{CoS(R_a,R_b)}{\mu^{(3)}(R_b)} }{BetaCoS(Ra,Rb) =
- CoS(Ra,Rb)/centeredmoment(Rb,3)}
+\deqn{ BetaCoS(Ra,Rb) = \beta^{(3)}_{a,b}=
+\frac{CoS(R_a,R_b)}{\mu^{(3)}(R_b)} }{BetaCoS(Ra,Rb) =
+CoS(Ra,Rb)/centeredmoment(Rb,3)}
- Beta co-kurtosis is:
+Beta co-kurtosis is:
- \deqn{ BetaCoK(Ra,Rb)=\beta^{(4)}_{a,b} =
- \frac{CoK(R_a,R_b)}{\mu^{(4)}(R_b)} }{BetaCoK(Ra,Rb) =
- CoK(Ra,Rb)/centeredmoment(Rb,4)}
+\deqn{ BetaCoK(Ra,Rb)=\beta^{(4)}_{a,b} =
+\frac{CoK(R_a,R_b)}{\mu^{(4)}(R_b)} }{BetaCoK(Ra,Rb) =
+CoK(Ra,Rb)/centeredmoment(Rb,4)}
- where the \eqn{n}-th centered moment is calculated as
+where the \eqn{n}-th centered moment is calculated as
- \deqn{ \mu^{(n)}(R) = E\lbrack(R-E(R))^n\rbrack
- }{moment^n(R) = E[R-E(R)^n]}
+\deqn{ \mu^{(n)}(R) = E\lbrack(R-E(R))^n\rbrack
+}{moment^n(R) = E[R-E(R)^n]}
- A beta is greater than one indicates that no
- diversification benefits should be expected from the
- introduction of that asset into the portfolio.
- Conversely, a beta that is less than one indicates that
- adding the new asset should reduce the resulting
- portfolio's volatility and kurtosis, and to an increase
- in skewness. More specifically, the lower the beta the
- higher the diversification effect on normal risk (i.e.
- volatility). Similarly, since extreme risks are generally
- characterised by negative skewness and positive kurtosis,
- the lower the beta, the higher the diversification effect
- on extreme risks (as reflected in Modified Value-at-Risk
- or ER).
+A beta is greater than one indicates that no
+diversification benefits should be expected from the
+introduction of that asset into the portfolio. Conversely,
+a beta that is less than one indicates that adding the new
+asset should reduce the resulting portfolio's volatility
+and kurtosis, and to an increase in skewness. More
+specifically, the lower the beta the higher the
+diversification effect on normal risk (i.e. volatility).
+Similarly, since extreme risks are generally characterised
+by negative skewness and positive kurtosis, the lower the
+beta, the higher the diversification effect on extreme
+risks (as reflected in Modified Value-at-Risk or ER).
- The addition of a small fraction of a new asset to a
- portfolio leads to a decrease in the portfolio's second
- moment (respectively, an increase in the portfolio's
- third moment and a decrease in the portfolio's fourth
- moment) if and only if the second moment (respectively,
- the third moment and fourth moment) beta is less than one
- (see Martellini and Ziemann (2007) for more details).
+The addition of a small fraction of a new asset to a
+portfolio leads to a decrease in the portfolio's second
+moment (respectively, an increase in the portfolio's third
+moment and a decrease in the portfolio's fourth moment) if
+and only if the second moment (respectively, the third
+moment and fourth moment) beta is less than one (see
+Martellini and Ziemann (2007) for more details).
- For skewness, the interpretation is slightly more
- involved. If the skewness of the portfolio is negative,
- we would expect an increase in portfolio skewness when
- the third moment beta is lower than one. When the
- skewness of the portfolio is positive, then the condition
- is that the third moment beta is greater than, as opposed
- to lower than, one.
+For skewness, the interpretation is slightly more involved.
+If the skewness of the portfolio is negative, we would
+expect an increase in portfolio skewness when the third
+moment beta is lower than one. When the skewness of the
+portfolio is positive, then the condition is that the third
+moment beta is greater than, as opposed to lower than, one.
- %Because the interpretation of beta coskewness is made
- difficult by the need to condition on it's skewness, we
- deviate from the more widely used measure slightly. To
- make the interpretation consistent across all three
- measures, the beta coskewness function tests the skewness
- and multiplies the result by the sign of the skewness.
- That allows an analyst to review the metric and interpret
- it without needing additional information. To use the
- more widely used metric, simply set the parameter
- \code{test = FALSE}.
+%Because the interpretation of beta coskewness is made
+difficult by the need to condition on it's skewness, we
+deviate from the more widely used measure slightly. To
+make the interpretation consistent across all three
+measures, the beta coskewness function tests the skewness
+and multiplies the result by the sign of the skewness.
+That allows an analyst to review the metric and interpret
+it without needing additional information. To use the more
+widely used metric, simply set the parameter \code{test =
+FALSE}.
}
\keyword{distribution}
\keyword{models}
Modified: pkg/PerformanceAnalytics/man/BurkeRatio.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/BurkeRatio.Rd 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/man/BurkeRatio.Rd 2014-02-23 12:51:48 UTC (rev 3332)
@@ -2,7 +2,7 @@
\alias{BurkeRatio}
\title{Burke ratio of the return distribution}
\usage{
- BurkeRatio(R, Rf = 0, modified = FALSE, ...)
+BurkeRatio(R, Rf = 0, modified = FALSE, ...)
}
\arguments{
\item{R}{an xts, vector, matrix, data frame, timeSeries
@@ -16,26 +16,25 @@
\item{\dots}{any other passthru parameters}
}
\description{
- To calculate Burke ratio we take the difference between
- the portfolio return and the risk free rate and we divide
- it by the square root of the sum of the square of the
- drawdowns. To calculate the modified Burke ratio we just
- multiply the Burke ratio by the square root of the number
- of datas.
+To calculate Burke ratio we take the difference between the
+portfolio return and the risk free rate and we divide it by
+the square root of the sum of the square of the drawdowns.
+To calculate the modified Burke ratio we just multiply the
+Burke ratio by the square root of the number of datas.
}
\details{
- \deqn{Burke Ratio = \frac{r_P -
- r_F}{\sqrt{\sum^{d}_{t=1}{D_t}^2}}}{Burke Ratio = (Rp -
- Rf) / (sqrt(sum(t=1..n)(Dt^2)))}
+\deqn{Burke Ratio = \frac{r_P -
+r_F}{\sqrt{\sum^{d}_{t=1}{D_t}^2}}}{Burke Ratio = (Rp - Rf)
+/ (sqrt(sum(t=1..n)(Dt^2)))}
- \deqn{Modified Burke Ratio = \frac{r_P -
- r_F}{\sqrt{\sum^{d}_{t=1}\frac{{D_t}^2}{n}}}}{Modified
- Burke Ratio = (Rp - Rf) / (sqrt(sum(t=1..n)(Dt^2 / n)))}
+\deqn{Modified Burke Ratio = \frac{r_P -
+r_F}{\sqrt{\sum^{d}_{t=1}\frac{{D_t}^2}{n}}}}{Modified
+Burke Ratio = (Rp - Rf) / (sqrt(sum(t=1..n)(Dt^2 / n)))}
- where \eqn{n} is the number of observations of the entire
- series, \eqn{d} is number of drawdowns, \eqn{r_P} is the
- portfolio return, \eqn{r_F} is the risk free rate and
- \eqn{D_t} the \eqn{t^{th}} drawdown.
+where \eqn{n} is the number of observations of the entire
+series, \eqn{d} is number of drawdowns, \eqn{r_P} is the
+portfolio return, \eqn{r_F} is the risk free rate and
+\eqn{D_t} the \eqn{t^{th}} drawdown.
}
\examples{
data(portfolio_bacon)
@@ -49,11 +48,11 @@
print(BurkeRatio(managers['1996',1], modified = TRUE))
}
\author{
- Matthieu Lestel
+Matthieu Lestel
}
\references{
- Carl Bacon, \emph{Practical portfolio performance
- measurement and attribution}, second edition 2008 p.90-91
+Carl Bacon, \emph{Practical portfolio performance
+measurement and attribution}, second edition 2008 p.90-91
}
\keyword{distribution}
\keyword{models}
Modified: pkg/PerformanceAnalytics/man/CAPM.RiskPremium.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/CAPM.RiskPremium.Rd 2014-02-22 03:32:41 UTC (rev 3331)
+++ pkg/PerformanceAnalytics/man/CAPM.RiskPremium.Rd 2014-02-23 12:51:48 UTC (rev 3332)
@@ -11,13 +11,13 @@
\alias{SFM.utils}
\title{utility functions for single factor (CAPM) CML, SML, and RiskPremium}
\usage{
- CAPM.CML.slope(Rb, Rf = 0)
+CAPM.CML.slope(Rb, Rf = 0)
- CAPM.CML(Ra, Rb, Rf = 0)
+CAPM.CML(Ra, Rb, Rf = 0)
- CAPM.RiskPremium(Ra, Rf = 0)
+CAPM.RiskPremium(Ra, Rf = 0)
- CAPM.SML.slope(Rb, Rf = 0)
+CAPM.SML.slope(Rb, Rf = 0)
}
\arguments{
\item{Ra}{an xts, vector, matrix, data frame, timeSeries
@@ -28,71 +28,69 @@
\item{Rf}{risk free rate, in same period as your returns}
}
\description{
- The Capital Asset Pricing Model, from which the popular
- \code{\link{SharpeRatio}} is derived, is a theory of
- market equilibrium. These utility functions provide
- values for various measures proposed in the CAPM.
+The Capital Asset Pricing Model, from which the popular
+\code{\link{SharpeRatio}} is derived, is a theory of market
+equilibrium. These utility functions provide values for
+various measures proposed in the CAPM.
}
\details{
- At it's core, the CAPM is a single factor linear model.
- In light of the general ustility and wide use of single
- factor model, all functions in the CAPM suite will also
- be available with SFM (single factor model) prefixes.
+At it's core, the CAPM is a single factor linear model. In
+light of the general ustility and wide use of single factor
+model, all functions in the CAPM suite will also be
+available with SFM (single factor model) prefixes.
- The CAPM provides a justification for passive or index
- investing by positing that assets that are not on the
- efficient frontier will either rise or lower in price
- until they are on the efficient frontier of the market
- portfolio.
+The CAPM provides a justification for passive or index
+investing by positing that assets that are not on the
+efficient frontier will either rise or lower in price until
+they are on the efficient frontier of the market portfolio.
- The CAPM Risk Premium on an investment is the measure of
- how much the asset's performance differs from the risk
- free rate. Negative Risk Premium generally indicates
- that the investment is a bad investment, and the money
- should be allocated to the risk free asset or to a
- different asset with a higher risk premium.
+The CAPM Risk Premium on an investment is the measure of
+how much the asset's performance differs from the risk free
+rate. Negative Risk Premium generally indicates that the
+investment is a bad investment, and the money should be
+allocated to the risk free asset or to a different asset
+with a higher risk premium.
- The Capital Market Line relates the excess expected
- return on an efficient market portfolio to it's Risk.
- The slope of the CML is the Sharpe Ratio for the market
- portfolio. The Security Market line is constructed by
- calculating the line of Risk Premium over
- \code{\link{CAPM.beta}}. For the benchmark asset this
- will be 1 over the risk premium of the benchmark asset.
- The CML also describes the only path allowed by the CAPM
- to a portfolio that outperforms the efficient frontier:
- it describes the line of reward/risk that a leveraged
- portfolio will occupy. So, according to CAPM, no
- portfolio constructed of the same assets can lie above
- the CML.
+The Capital Market Line relates the excess expected return
+on an efficient market portfolio to it's Risk. The slope
+of the CML is the Sharpe Ratio for the market portfolio.
+The Security Market line is constructed by calculating the
+line of Risk Premium over \code{\link{CAPM.beta}}. For the
+benchmark asset this will be 1 over the risk premium of the
+benchmark asset. The CML also describes the only path
+allowed by the CAPM to a portfolio that outperforms the
+efficient frontier: it describes the line of reward/risk
+that a leveraged portfolio will occupy. So, according to
+CAPM, no portfolio constructed of the same assets can lie
+above the CML.
- Probably the most complete criticism of CAPM in actual
- practice (as opposed to structural or theory critiques)
- is that it posits a market equilibrium, but is most often
- used only in a partial equilibrium setting, for example
- by using the S\&P 500 as the benchmark asset. A better
- method of using and testing the CAPM would be to use a
- general equilibrium model that took global assets from
- all asset classes into consideration.
+Probably the most complete criticism of CAPM in actual
+practice (as opposed to structural or theory critiques) is
+that it posits a market equilibrium, but is most often used
+only in a partial equilibrium setting, for example by using
+the S\&P 500 as the benchmark asset. A better method of
+using and testing the CAPM would be to use a general
+equilibrium model that took global assets from all asset
+classes into consideration.
- Chapter 7 of Ruppert(2004) gives an extensive overview of
- CAPM, its assumptions and deficiencies.
+Chapter 7 of Ruppert(2004) gives an extensive overview of
+CAPM, its assumptions and deficiencies.
- \code{SFM.RiskPremium} is the premium returned to the
- investor over the risk free asset
+\code{SFM.RiskPremium} is the premium returned to the
+investor over the risk free asset
- \deqn{\overline{(R_{a}-R_{f})}}{mean(Ra-Rf=0)}
+\deqn{\overline{(R_{a}-R_{f})}}{mean(Ra-Rf=0)}
- \code{SFM.CML} calculates the expected return of the
- asset against the benchmark Capital Market Line
+\code{SFM.CML} calculates the expected return of the asset
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/returnanalytics -r 3332
More information about the Returnanalytics-commits
mailing list