[Returnanalytics-commits] r2233 - in pkg/PerformanceAnalytics: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Aug 12 17:40:18 CEST 2012
Author: matthieu_lestel
Date: 2012-08-12 17:40:18 +0200 (Sun, 12 Aug 2012)
New Revision: 2233
Modified:
pkg/PerformanceAnalytics/R/AdjustedSharpeRatio.R
pkg/PerformanceAnalytics/R/BurkeRatio.R
pkg/PerformanceAnalytics/R/CAPM.epsilon.R
pkg/PerformanceAnalytics/R/CAPM.jensenAlpha.R
pkg/PerformanceAnalytics/R/M2Sortino.R
pkg/PerformanceAnalytics/R/MSquared.R
pkg/PerformanceAnalytics/R/MSquaredExcess.R
pkg/PerformanceAnalytics/R/MartinRatio.R
pkg/PerformanceAnalytics/R/NetSelectivity.R
pkg/PerformanceAnalytics/R/OmegaExcessReturn.R
pkg/PerformanceAnalytics/R/PainRatio.R
pkg/PerformanceAnalytics/R/TreynorRatio.R
pkg/PerformanceAnalytics/man/AdjustedSharpeRatio.Rd
pkg/PerformanceAnalytics/man/BurkeRatio.Rd
pkg/PerformanceAnalytics/man/CAPM.epsilon.Rd
pkg/PerformanceAnalytics/man/CAPM.jensenAlpha.Rd
pkg/PerformanceAnalytics/man/MSquared.Rd
pkg/PerformanceAnalytics/man/MSquaredExcess.Rd
pkg/PerformanceAnalytics/man/PainRatio.Rd
Log:
returns annualised everywhere they were not yet + use of Frequency everywhere possible to lighten the code
Modified: pkg/PerformanceAnalytics/R/AdjustedSharpeRatio.R
===================================================================
--- pkg/PerformanceAnalytics/R/AdjustedSharpeRatio.R 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/R/AdjustedSharpeRatio.R 2012-08-12 15:40:18 UTC (rev 2233)
@@ -12,7 +12,6 @@
#' @param R an xts, vector, matrix, data frame, timeSeries or zoo object of
#' asset returns
#' @param Rf the risk free rate
-#' @param period the number of returns in a year (ie 12 for monthly returns, 4 for quaterly returns)
#' @param \dots any other passthru parameters
#' @author Matthieu Lestel
#' @references Carl Bacon, \emph{Practical portfolio performance measurement
@@ -29,7 +28,7 @@
#'
#' @export
-AdjustedSharpeRatio <- function (R, Rf = 0, period = 12, ...)
+AdjustedSharpeRatio <- function (R, Rf = 0, ...)
{
R = checkData(R)
@@ -40,15 +39,16 @@
calcul = TRUE
}
}
- R = na.omit(R)
- n = length(R)
- Rp = (prod(1+R/100)^(period/length(R))-1)*100
- Sigp = sqrt(sum((R-mean(R))^2)/n)*sqrt(period)
- SR = (Rp - Rf) / Sigp
if(!calcul) {
result = NA
}
else {
+ period = Frequency(R)
+ R = na.omit(R)
+ n = length(R)
+ Rp = (prod(1+R/100)^(period/length(R))-1)*100
+ Sigp = sqrt(sum((R-mean(R))^2)/n)*sqrt(period)
+ SR = (Rp - Rf) / Sigp
K = kurtosis(R, method = "moment")
S = skewness(R)
result = SR*(1+(S/6)*SR-((K-3)/24)*SR^2)
Modified: pkg/PerformanceAnalytics/R/BurkeRatio.R
===================================================================
--- pkg/PerformanceAnalytics/R/BurkeRatio.R 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/R/BurkeRatio.R 2012-08-12 15:40:18 UTC (rev 2233)
@@ -16,7 +16,6 @@
#' asset returns
#' @param Rf the risk free rate
#' @param modified a boolean to decide which ratio to calculate between Burke ratio and modified Burke ratio.
-#' @param period the number of returns in a year (ie 12 for monthly returns, 4 for quaterly returns)
#' @param \dots any other passthru parameters
#' @author Matthieu Lestel
#' @references Carl Bacon, \emph{Practical portfolio performance measurement
@@ -25,8 +24,8 @@
#' @keywords ts multivariate distribution models
#' @examples
#' data(portfolio_bacon)
-#' print(BurkeRatio(portfolio_bacon[,1])) #expected 0.76
-#' print(BurkeRatio(portfolio_bacon[,1], modified = TRUE)) #expected 3.86
+#' print(BurkeRatio(portfolio_bacon[,1])) #expected 0.74
+#' print(BurkeRatio(portfolio_bacon[,1], modified = TRUE)) #expected 3.65
#'
#' data(managers)
#' print(BurkeRatio(managers['1996']))
@@ -36,7 +35,7 @@
#'
#' @export
-BurkeRatio <- function (R, Rf = 0, modified = FALSE, period = 12, ...)
+BurkeRatio <- function (R, Rf = 0, modified = FALSE, ...)
{
drawdown = c()
R0 <- R
@@ -55,13 +54,13 @@
}
}
- R = na.omit(R)
if(!calcul) {
result = NA
}
else
{
-
+ period = Frequency(R)
+ R = na.omit(R)
for (i in (2:length(R))) {
if (R[i]<0)
{
@@ -101,8 +100,8 @@
D = Drawdowns(R)
- Rp = (prod(1+R/100)^(period/length(R))-1)*100
- result = (Rp - Rf)/sqrt(sum(drawdown^2))
+ Rp = (prod(1 + R))^(period / length(R)) - 1
+ result = (Rp - Rf)/sqrt(sum(drawdown^2))
if(modified)
{
result = result * sqrt(n)
Modified: pkg/PerformanceAnalytics/R/CAPM.epsilon.R
===================================================================
--- pkg/PerformanceAnalytics/R/CAPM.epsilon.R 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/R/CAPM.epsilon.R 2012-08-12 15:40:18 UTC (rev 2233)
@@ -13,7 +13,6 @@
#' asset returns
#' @param Rb return vector of the benchmark asset
#' @param Rf risk free rate, in same period as your returns
-#' @param period number of periods in a year monthly scale = 12, quarterly = 4)
#' @param \dots any other passthru parameters
#' @author Matthieu Lestel
#' @references Carl Bacon, \emph{Practical portfolio performance measurement
@@ -23,7 +22,7 @@
#' @examples
#'
#' data(portfolio_bacon)
-#' print(CAPM.epsilon(portfolio_bacon[,1], portfolio_bacon[,2])) #expected -1.31
+#' print(CAPM.epsilon(portfolio_bacon[,1], portfolio_bacon[,2])) #expected -0.013
#'
#' data(managers)
#' print(CAPM.epsilon(managers['1996',1], managers['1996',8]))
@@ -32,7 +31,7 @@
#' @export
CAPM.epsilon <-
-function (Ra, Rb, Rf = 0, period=12, ...)
+function (Ra, Rb, Rf = 0, ...)
{
Ra = checkData(Ra, method="matrix")
Rb = checkData(Rb, method="matrix")
@@ -46,18 +45,12 @@
}
Ra = na.omit(Ra)
Rb = na.omit(Rb)
- print(Ra)
- print(Rb)
- Rp = (prod(1+Ra/100)^(period/length(Ra))-1)*100
- Rpb = (prod(1+Rb/100)^(period/length(Rb))-1)*100 #benchmark total return
- print(Rp)
- print(Rpb)
if (calcul) {
- print(Rf)
- print(CAPM.alpha(Ra,Rb,Rf))
+ period = Frequency(Ra)
+ Rp = (prod(1 + Ra))^(period / length(Ra)) - 1
+ Rpb = (prod(1 + Rb))^(period / length(Rb)) - 1
result = Rf + Rp - CAPM.alpha(Ra,Rb,Rf) - (Rpb - Rf) * CAPM.beta(Ra,Rb,Rf)
- print(result)
}
else {
result = NA
Modified: pkg/PerformanceAnalytics/R/CAPM.jensenAlpha.R
===================================================================
--- pkg/PerformanceAnalytics/R/CAPM.jensenAlpha.R 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/R/CAPM.jensenAlpha.R 2012-08-12 15:40:18 UTC (rev 2233)
@@ -13,7 +13,6 @@
#' asset returns
#' @param Rb return vector of the benchmark asset
#' @param Rf risk free rate, in same period as your returns
-#' @param period number of periods in a year monthly scale = 12, quarterly = 4)
#' @param \dots any other passthru parameters
#' @author Matthieu Lestel
#' @references Carl Bacon, \emph{Practical portfolio performance measurement
@@ -23,7 +22,7 @@
#' @examples
#'
#' data(portfolio_bacon)
-#' print(CAPM.jensenAlpha(portfolio_bacon[,1], portfolio_bacon[,2])) #expected -1.41
+#' print(CAPM.jensenAlpha(portfolio_bacon[,1], portfolio_bacon[,2])) #expected -0.014
#'
#' data(managers)
#' print(CAPM.jensenAlpha(managers['1996',1], managers['1996',8]))
@@ -32,7 +31,7 @@
#' @export
CAPM.jensenAlpha <-
-function (Ra, Rb, Rf = 0, period = 12, ...)
+function (Ra, Rb, Rf = 0, ...)
{
calcul = FALSE
Ra = checkData(Ra, method="matrix")
@@ -40,8 +39,9 @@
if (ncol(Ra)==1 || is.null(Ra) || is.vector(Ra)) {
- Rp = (prod(1+Ra/100)^(period/length(Ra))-1)*100
- Rpb = (prod(1+Rb/100)^(period/length(Rb))-1)*100 #benchmark total return
+ period = Frequency(Ra)
+ Rp = (prod(1 + Ra))^(period / length(Ra)) - 1
+ Rpb = (prod(1 + Rb))^(period / length(Rb)) - 1
for (i in (1:length(Ra))) {
if (!is.na(Ra[i])) {
calcul = TRUE
Modified: pkg/PerformanceAnalytics/R/M2Sortino.R
===================================================================
--- pkg/PerformanceAnalytics/R/M2Sortino.R 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/R/M2Sortino.R 2012-08-12 15:40:18 UTC (rev 2233)
@@ -47,7 +47,7 @@
if (calcul) {
Period = Frequency(Rb)
- Rp = Return.annualized(Ra)
+ Rp = (prod(1 + Ra))^(Period / length(Ra)) - 1
SigmaD = DownsideDeviation(Ra,MAR)*sqrt(Period)
SigmaDM = DownsideDeviation(Rb,MAR)*sqrt(Period)
SR = SortinoRatio(Ra,MAR)
Modified: pkg/PerformanceAnalytics/R/MSquared.R
===================================================================
--- pkg/PerformanceAnalytics/R/MSquared.R 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/R/MSquared.R 2012-08-12 15:40:18 UTC (rev 2233)
@@ -14,7 +14,6 @@
#' asset return
#' @param Rb return vector of the benchmark asset
#' @param Rf risk free rate, in same period as your returns
-#' @param Period the number of return in a year in the asset return
#' @param \dots any other passthru parameters
#' @author Matthieu Lestel
#' @references Carl Bacon, \emph{Practical portfolio performance measurement
@@ -32,7 +31,7 @@
#'
#' @export
MSquared <-
-function (Ra, Rb, Rf = 0, Period = 12, ...)
+function (Ra, Rb, Rf = 0, ...)
{
Ra = checkData(Ra)
Rb = checkData(Rb)
@@ -46,7 +45,8 @@
}
if (calcul) {
- Rp = Return.annualized(Ra)
+ Period = Frequency(Ra)
+ Rp = (prod(1 + Ra))^(Period / length(Ra)) - 1
sigp = sqrt(var(Ra)*(length(Ra)-1)/length(Ra))*sqrt(Period)
sigm = sqrt(var(Rb)*(length(Rb)-1)/length(Rb))*sqrt(Period)
result = (Rp - Rf) * sigp / sigm + Rf
Modified: pkg/PerformanceAnalytics/R/MSquaredExcess.R
===================================================================
--- pkg/PerformanceAnalytics/R/MSquaredExcess.R 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/R/MSquaredExcess.R 2012-08-12 15:40:18 UTC (rev 2233)
@@ -12,7 +12,6 @@
#' asset return
#' @param Rb return vector of the benchmark asset
#' @param Rf risk free rate, in same period as your returns
-#' @param Period the number of return in a year in the asset return
#' @param Method one of "geometric" or "arithmetic" indicating the method to use
#' to calculate MSquareExcess
#' @param \dots any other passthru parameters
@@ -33,7 +32,7 @@
#'
#' @export
MSquaredExcess <-
-function (Ra, Rb, Rf = 0, Period = 12, Method = c("geometric", "arithmetic"), ...)
+function (Ra, Rb, Rf = 0, Method = c("geometric", "arithmetic"), ...)
{
Method = Method[1]
@@ -49,7 +48,8 @@
}
if (calcul) {
- Rbp = Return.annualized(Rb)
+ Period = Frequency(Ra)
+ Rbp = (prod(1 + Rb))^(Period / length(Rb)) - 1
switch(Method,
geometric = {result = (1+MSquared(Ra,Rb))/(1+Rbp) - 1},
Modified: pkg/PerformanceAnalytics/R/MartinRatio.R
===================================================================
--- pkg/PerformanceAnalytics/R/MartinRatio.R 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/R/MartinRatio.R 2012-08-12 15:40:18 UTC (rev 2233)
@@ -49,7 +49,7 @@
result = NA
}
else {
- Rp = Return.annualized(R)
+ Rp = (prod(1 + R))^(period / length(R)) - 1
result = (Rp - Rf) / UI
}
return(result)
Modified: pkg/PerformanceAnalytics/R/NetSelectivity.R
===================================================================
--- pkg/PerformanceAnalytics/R/NetSelectivity.R 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/R/NetSelectivity.R 2012-08-12 15:40:18 UTC (rev 2233)
@@ -47,7 +47,8 @@
}
if (calcul) {
- b = Return.annualized(Rb)
+ Period = Frequency(Ra)
+ b = (prod(1 + Rb))^(Period / length(Rb)) - 1
d = (FamaBeta(Ra,Rb)-CAPM.beta(Ra,Rb,Rf)) * (b - Rf)
result = Selectivity(Ra,Rb,Rf) - d
}
Modified: pkg/PerformanceAnalytics/R/OmegaExcessReturn.R
===================================================================
--- pkg/PerformanceAnalytics/R/OmegaExcessReturn.R 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/R/OmegaExcessReturn.R 2012-08-12 15:40:18 UTC (rev 2233)
@@ -49,7 +49,7 @@
if (calcul) {
Period = Frequency(Ra)
- Rp = Return.annualized(Ra)
+ Rp = (prod(1 + Ra))^(Period / length(Ra)) - 1
SigmaD = DownsideDeviation(Ra,MAR)*sqrt(Period)
SigmaDM = DownsideDeviation(Rb,MAR)*sqrt(Period)
result = Rp - 3 * SigmaD * SigmaDM
Modified: pkg/PerformanceAnalytics/R/PainRatio.R
===================================================================
--- pkg/PerformanceAnalytics/R/PainRatio.R 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/R/PainRatio.R 2012-08-12 15:40:18 UTC (rev 2233)
@@ -13,7 +13,6 @@
#' @param R an xts, vector, matrix, data frame, timeSeries or zoo object of
#' asset returns
#' @param Rf risk free rate, in same period as your returns
-#' @param period number of periods in a year monthly scale = 12, quarterly = 4)
#' @param \dots any other passthru parameters
#' @author Matthieu Lestel
#' @references Carl Bacon, \emph{Practical portfolio performance measurement
@@ -22,7 +21,7 @@
#' @keywords ts multivariate distribution models
#' @examples
#' data(portfolio_bacon)
-#' print(PainRatio(portfolio_bacon[,1])) #expected 2.59
+#' print(PainRatio(portfolio_bacon[,1])) #expected 2.66
#'
#' data(managers)
#' print(PainRatio(managers['1996']))
@@ -31,7 +30,7 @@
#' @export
-PainRatio <- function (R, Rf = 0, period = 12, ...)
+PainRatio <- function (R, Rf = 0, ...)
{
R = checkData(R)
@@ -49,8 +48,8 @@
result = NA
}
else {
- Rp = Return.annualized(R)
-# Rp = (prod(1+R/100)^(period/length(R))-1)*100
+ period = Frequency(R)
+ Rp = (prod(1 + R))^(period / length(R)) - 1
result = (Rp - Rf) / PI
}
return(result)
Modified: pkg/PerformanceAnalytics/R/TreynorRatio.R
===================================================================
--- pkg/PerformanceAnalytics/R/TreynorRatio.R 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/R/TreynorRatio.R 2012-08-12 15:40:18 UTC (rev 2233)
@@ -70,7 +70,7 @@
if (ncol(Ra)==1 || is.null(Ra) || is.vector(Ra)) {
- Rp = (prod(1+Ra/100)^(scale/length(Ra))-1)*100
+ Rp = (prod(1 + Ra))^(scale / length(Ra)) - 1
for (i in (1:length(Ra))) {
if (!is.na(Ra[i])) {
calcul = TRUE
Modified: pkg/PerformanceAnalytics/man/AdjustedSharpeRatio.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/AdjustedSharpeRatio.Rd 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/man/AdjustedSharpeRatio.Rd 2012-08-12 15:40:18 UTC (rev 2233)
@@ -2,7 +2,7 @@
\alias{AdjustedSharpeRatio}
\title{Adjusted Sharpe ratio of the return distribution}
\usage{
- AdjustedSharpeRatio(R, Rf = 0, period = 12, ...)
+ AdjustedSharpeRatio(R, Rf = 0, ...)
}
\arguments{
\item{R}{an xts, vector, matrix, data frame, timeSeries
@@ -10,9 +10,6 @@
\item{Rf}{the risk free rate}
- \item{period}{the number of returns in a year (ie 12 for
- monthly returns, 4 for quaterly returns)}
-
\item{\dots}{any other passthru parameters}
}
\description{
Modified: pkg/PerformanceAnalytics/man/BurkeRatio.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/BurkeRatio.Rd 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/man/BurkeRatio.Rd 2012-08-12 15:40:18 UTC (rev 2233)
@@ -2,7 +2,7 @@
\alias{BurkeRatio}
\title{Burke ratio of the return distribution}
\usage{
- BurkeRatio(R, Rf = 0, modified = FALSE, period = 12, ...)
+ BurkeRatio(R, Rf = 0, modified = FALSE, ...)
}
\arguments{
\item{R}{an xts, vector, matrix, data frame, timeSeries
@@ -13,9 +13,6 @@
\item{modified}{a boolean to decide which ratio to
calculate between Burke ratio and modified Burke ratio.}
- \item{period}{the number of returns in a year (ie 12 for
- monthly returns, 4 for quaterly returns)}
-
\item{\dots}{any other passthru parameters}
}
\description{
@@ -42,8 +39,8 @@
}
\examples{
data(portfolio_bacon)
-print(BurkeRatio(portfolio_bacon[,1])) #expected 0.76
-print(BurkeRatio(portfolio_bacon[,1], modified = TRUE)) #expected 3.86
+print(BurkeRatio(portfolio_bacon[,1])) #expected 0.74
+print(BurkeRatio(portfolio_bacon[,1], modified = TRUE)) #expected 3.65
data(managers)
print(BurkeRatio(managers['1996']))
Modified: pkg/PerformanceAnalytics/man/CAPM.epsilon.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/CAPM.epsilon.Rd 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/man/CAPM.epsilon.Rd 2012-08-12 15:40:18 UTC (rev 2233)
@@ -4,7 +4,7 @@
\alias{Regression}
\title{Regression epsilon of the return distribution}
\usage{
- CAPM.epsilon(Ra, Rb, Rf = 0, period = 12, ...)
+ CAPM.epsilon(Ra, Rb, Rf = 0, ...)
}
\arguments{
\item{Ra}{an xts, vector, matrix, data frame, timeSeries
@@ -14,9 +14,6 @@
\item{Rf}{risk free rate, in same period as your returns}
- \item{period}{number of periods in a year monthly scale =
- 12, quarterly = 4)}
-
\item{\dots}{any other passthru parameters}
}
\description{
@@ -34,7 +31,7 @@
}
\examples{
data(portfolio_bacon)
-print(CAPM.epsilon(portfolio_bacon[,1], portfolio_bacon[,2])) #expected -1.31
+print(CAPM.epsilon(portfolio_bacon[,1], portfolio_bacon[,2])) #expected -0.013
data(managers)
print(CAPM.epsilon(managers['1996',1], managers['1996',8]))
Modified: pkg/PerformanceAnalytics/man/CAPM.jensenAlpha.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/CAPM.jensenAlpha.Rd 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/man/CAPM.jensenAlpha.Rd 2012-08-12 15:40:18 UTC (rev 2233)
@@ -3,7 +3,7 @@
\alias{Jensen'sAlpha}
\title{Jensen's alpha of the return distribution}
\usage{
- CAPM.jensenAlpha(Ra, Rb, Rf = 0, period = 12, ...)
+ CAPM.jensenAlpha(Ra, Rb, Rf = 0, ...)
}
\arguments{
\item{Ra}{an xts, vector, matrix, data frame, timeSeries
@@ -13,9 +13,6 @@
\item{Rf}{risk free rate, in same period as your returns}
- \item{period}{number of periods in a year monthly scale =
- 12, quarterly = 4)}
-
\item{\dots}{any other passthru parameters}
}
\description{
@@ -33,7 +30,7 @@
}
\examples{
data(portfolio_bacon)
-print(CAPM.jensenAlpha(portfolio_bacon[,1], portfolio_bacon[,2])) #expected -1.41
+print(CAPM.jensenAlpha(portfolio_bacon[,1], portfolio_bacon[,2])) #expected -0.014
data(managers)
print(CAPM.jensenAlpha(managers['1996',1], managers['1996',8]))
Modified: pkg/PerformanceAnalytics/man/MSquared.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/MSquared.Rd 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/man/MSquared.Rd 2012-08-12 15:40:18 UTC (rev 2233)
@@ -2,7 +2,7 @@
\alias{MSquared}
\title{M squared of the return distribution}
\usage{
- MSquared(Ra, Rb, Rf = 0, Period = 12, ...)
+ MSquared(Ra, Rb, Rf = 0, ...)
}
\arguments{
\item{Ra}{an xts, vector, matrix, data frame, timeSeries
@@ -12,9 +12,6 @@
\item{Rf}{risk free rate, in same period as your returns}
- \item{Period}{the number of return in a year in the asset
- return}
-
\item{\dots}{any other passthru parameters}
}
\description{
Modified: pkg/PerformanceAnalytics/man/MSquaredExcess.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/MSquaredExcess.Rd 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/man/MSquaredExcess.Rd 2012-08-12 15:40:18 UTC (rev 2233)
@@ -2,7 +2,7 @@
\alias{MSquaredExcess}
\title{M squared excess of the return distribution}
\usage{
- MSquaredExcess(Ra, Rb, Rf = 0, Period = 12,
+ MSquaredExcess(Ra, Rb, Rf = 0,
Method = c("geometric", "arithmetic"), ...)
}
\arguments{
@@ -13,9 +13,6 @@
\item{Rf}{risk free rate, in same period as your returns}
- \item{Period}{the number of return in a year in the asset
- return}
-
\item{Method}{one of "geometric" or "arithmetic"
indicating the method to use to calculate MSquareExcess}
Modified: pkg/PerformanceAnalytics/man/PainRatio.Rd
===================================================================
--- pkg/PerformanceAnalytics/man/PainRatio.Rd 2012-08-12 10:17:16 UTC (rev 2232)
+++ pkg/PerformanceAnalytics/man/PainRatio.Rd 2012-08-12 15:40:18 UTC (rev 2233)
@@ -2,7 +2,7 @@
\alias{PainRatio}
\title{Pain ratio of the return distribution}
\usage{
- PainRatio(R, Rf = 0, period = 12, ...)
+ PainRatio(R, Rf = 0, ...)
}
\arguments{
\item{R}{an xts, vector, matrix, data frame, timeSeries
@@ -10,9 +10,6 @@
\item{Rf}{risk free rate, in same period as your returns}
- \item{period}{number of periods in a year monthly scale =
- 12, quarterly = 4)}
-
\item{\dots}{any other passthru parameters}
}
\description{
@@ -31,7 +28,7 @@
}
\examples{
data(portfolio_bacon)
-print(PainRatio(portfolio_bacon[,1])) #expected 2.59
+print(PainRatio(portfolio_bacon[,1])) #expected 2.66
data(managers)
print(PainRatio(managers['1996']))
More information about the Returnanalytics-commits
mailing list