[Returnanalytics-commits] r2163 - in pkg/PerformanceAnalytics: . R man sandbox/Meucci sandbox/Meucci/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jul 16 02:30:19 CEST 2012
Author: braverock
Date: 2012-07-16 02:30:19 +0200 (Mon, 16 Jul 2012)
New Revision: 2163
Modified:
pkg/PerformanceAnalytics/DESCRIPTION
pkg/PerformanceAnalytics/NAMESPACE
pkg/PerformanceAnalytics/R/CAPM.beta.R
pkg/PerformanceAnalytics/R/CAPM.utils.R
pkg/PerformanceAnalytics/R/CoMoments.R
pkg/PerformanceAnalytics/R/DownsideDeviation.R
pkg/PerformanceAnalytics/R/InformationRatio.R
pkg/PerformanceAnalytics/R/KellyRatio.R
pkg/PerformanceAnalytics/R/Omega.R
pkg/PerformanceAnalytics/R/OmegaSharpeRatio.R
pkg/PerformanceAnalytics/R/Return.Geltner.R
pkg/PerformanceAnalytics/R/Return.annualized.R
pkg/PerformanceAnalytics/R/Return.calculate.R
pkg/PerformanceAnalytics/R/Return.clean.R
pkg/PerformanceAnalytics/R/Return.cumulative.R
pkg/PerformanceAnalytics/R/Return.excess.R
pkg/PerformanceAnalytics/R/Return.portfolio.R
pkg/PerformanceAnalytics/R/Return.read.R
pkg/PerformanceAnalytics/R/Return.relative.R
pkg/PerformanceAnalytics/R/SemiDeviation.R
pkg/PerformanceAnalytics/R/SharpeRatio.R
pkg/PerformanceAnalytics/R/SharpeRatio.annualized.R
pkg/PerformanceAnalytics/R/SkewnessKurtosisRatio.R
pkg/PerformanceAnalytics/R/SmoothingIndex.R
pkg/PerformanceAnalytics/R/SortinoRatio.R
pkg/PerformanceAnalytics/R/StdDev.R
pkg/PerformanceAnalytics/R/SystematicRisk.R
pkg/PerformanceAnalytics/R/TotalRisk.R
pkg/PerformanceAnalytics/R/TrackingError.R
pkg/PerformanceAnalytics/R/TreynorRatio.R
pkg/PerformanceAnalytics/R/UlcerIndex.R
pkg/PerformanceAnalytics/R/UpDownRatios.R
pkg/PerformanceAnalytics/R/UpsidePotentialRatio.R
pkg/PerformanceAnalytics/R/VaR.R
pkg/PerformanceAnalytics/R/chart.ACF.R
pkg/PerformanceAnalytics/R/chart.ACFplus.R
pkg/PerformanceAnalytics/R/chart.Bar.R
pkg/PerformanceAnalytics/R/chart.Boxplot.R
pkg/PerformanceAnalytics/R/chart.CaptureRatios.R
pkg/PerformanceAnalytics/R/chart.Correlation.R
pkg/PerformanceAnalytics/R/chart.CumReturns.R
pkg/PerformanceAnalytics/R/chart.Drawdown.R
pkg/PerformanceAnalytics/R/chart.ECDF.R
pkg/PerformanceAnalytics/R/chart.QQPlot.R
pkg/PerformanceAnalytics/R/chart.Regression.R
pkg/PerformanceAnalytics/R/chart.RelativePerformance.R
pkg/PerformanceAnalytics/R/chart.RiskReturnScatter.R
pkg/PerformanceAnalytics/R/chart.RollingCorrelation.R
pkg/PerformanceAnalytics/R/chart.RollingMean.R
pkg/PerformanceAnalytics/R/chart.RollingPerformance.R
pkg/PerformanceAnalytics/R/chart.RollingQuantileRegression.R
pkg/PerformanceAnalytics/R/chart.Scatter.R
pkg/PerformanceAnalytics/R/chart.SnailTrail.R
pkg/PerformanceAnalytics/R/chart.StackedBar.R
pkg/PerformanceAnalytics/R/chart.TimeSeries.R
pkg/PerformanceAnalytics/R/chart.VaRSensitivity.R
pkg/PerformanceAnalytics/R/charts.Bar.R
pkg/PerformanceAnalytics/R/charts.BarVaR.R
pkg/PerformanceAnalytics/R/charts.PerformanceSummary.R
pkg/PerformanceAnalytics/R/charts.RollingPerformance.R
pkg/PerformanceAnalytics/R/charts.RollingRegression.R
pkg/PerformanceAnalytics/R/charts.TimeSeries.R
pkg/PerformanceAnalytics/R/checkData.R
pkg/PerformanceAnalytics/R/findDrawdowns.R
pkg/PerformanceAnalytics/R/kurtosis.R
pkg/PerformanceAnalytics/R/legend.R
pkg/PerformanceAnalytics/R/maxDrawdown.R
pkg/PerformanceAnalytics/R/mean.utils.R
pkg/PerformanceAnalytics/R/skewness.R
pkg/PerformanceAnalytics/R/sortDrawdowns.R
pkg/PerformanceAnalytics/R/table.AnnualizedReturns.R
pkg/PerformanceAnalytics/R/table.Arbitrary.R
pkg/PerformanceAnalytics/R/table.Autocorrelation.R
pkg/PerformanceAnalytics/R/table.CAPM.R
pkg/PerformanceAnalytics/R/table.CalendarReturns.R
pkg/PerformanceAnalytics/R/table.CaptureRatios.R
pkg/PerformanceAnalytics/R/table.Correlation.R
pkg/PerformanceAnalytics/R/table.HigherMoments.R
pkg/PerformanceAnalytics/R/table.RollingPeriods.R
pkg/PerformanceAnalytics/R/textplot.R
pkg/PerformanceAnalytics/man/BetaCoMoments.Rd
pkg/PerformanceAnalytics/man/BurkeRatio.Rd
pkg/PerformanceAnalytics/man/CAPM.RiskPremium.Rd
pkg/PerformanceAnalytics/man/CAPM.beta.Rd
pkg/PerformanceAnalytics/man/CAPM.epsilon.Rd
pkg/PerformanceAnalytics/man/CAPM.jensenAlpha.Rd
pkg/PerformanceAnalytics/man/DownsideDeviation.Rd
pkg/PerformanceAnalytics/man/Return.calculate.Rd
pkg/PerformanceAnalytics/man/Return.portfolio.Rd
pkg/PerformanceAnalytics/man/TreynorRatio.Rd
pkg/PerformanceAnalytics/man/chart.ACF.Rd
pkg/PerformanceAnalytics/man/chart.RollingRegression.Rd
pkg/PerformanceAnalytics/man/chart.TimeSeries.Rd
pkg/PerformanceAnalytics/sandbox/Meucci/DESCRIPTION
pkg/PerformanceAnalytics/sandbox/Meucci/man/CMAcombination.Rd
pkg/PerformanceAnalytics/sandbox/Meucci/man/CMAseparation.Rd
pkg/PerformanceAnalytics/sandbox/Meucci/man/Central2Raw.Rd
pkg/PerformanceAnalytics/sandbox/Meucci/man/Cumul2Raw.Rd
pkg/PerformanceAnalytics/sandbox/Meucci/man/PartialConfidencePosterior.Rd
pkg/PerformanceAnalytics/sandbox/Meucci/man/Prior2Posterior.Rd
pkg/PerformanceAnalytics/sandbox/Meucci/man/Raw2Central.Rd
pkg/PerformanceAnalytics/sandbox/Meucci/man/Raw2Cumul.Rd
pkg/PerformanceAnalytics/sandbox/Meucci/man/robustBayesianPortfolioOptimization.Rd
Log:
- update roxygen doec, specifically @export tags
Modified: pkg/PerformanceAnalytics/DESCRIPTION
===================================================================
--- pkg/PerformanceAnalytics/DESCRIPTION 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/DESCRIPTION 2012-07-16 00:30:19 UTC (rev 2163)
@@ -1,7 +1,7 @@
Package: PerformanceAnalytics
Type: Package
Title: Econometric tools for performance and risk analysis.
-Version: 1.0.4.5
+Version: 1.0.5
Date: $Date$
Author: Peter Carl, Brian G. Peterson
Maintainer: Brian G. Peterson <brian at braverock.com>
@@ -34,5 +34,5 @@
Contributors: Kris Boudt, Diethelm Wuertz, Eric Zivot, Matthieu Lestel
Thanks: A special thanks for additional contributions from
Stefan Albrecht, Khahn Nygyen, Jeff Ryan,
- Josh Ulrich, Sankalp Upadhyay, Tobias Verbeke,
+ Josh Ulrich, Sankalp Upadhyay, Tobias Verbeke,
H. Felix Wittmann, Ram Ahluwalia
Modified: pkg/PerformanceAnalytics/NAMESPACE
===================================================================
--- pkg/PerformanceAnalytics/NAMESPACE 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/NAMESPACE 2012-07-16 00:30:19 UTC (rev 2163)
@@ -1,422 +1,132 @@
-# NAMESPACE file for PerformanceAnalytics
-
-importFrom("utils", "packageDescription")
-importFrom("stats", "sd")
-
-importFrom("zoo", "rollapply")
-
-# export all functions/variables that don't start with a .
-# exportPattern("^[^\\.]")
-
-
-export(
- ActivePremium,
- apply.fromstart,
- apply.rolling,
- BetaCoKurtosis,
- BetaCoSkewness,
- BetaCoVariance,
- CalculateReturns,
- CalmarRatio,
- CAPM.alpha,
- CAPM.beta,
- CAPM.beta.bear,
- CAPM.beta.bull,
- CAPM.CML,
- CAPM.CML.slope,
- CAPM.RiskPremium,
- CAPM.SML.slope,
- CDD,
- checkData,
- clean.boudt,
- CoKurtosis,
-# CoKurtosisMatrix, #export after co-moments paper is done
- CoSkewness,
-# CoSkewnessMatrix, #export after co-moments paper is done
- CoVariance,
- DownsideDeviation,
- DownsidePotential,
- Drawdowns,
- ES,
- ETL,
- CVaR,
- findDrawdowns,
- InformationRatio,
- KellyRatio,
- kurtosis,
- maxDrawdown,
- mean.geometric,
- mean.LCL,
- mean.stderr,
- mean.UCL,
- Omega,
-# pfolioReturn,
- Return.annualized,
- Return.calculate,
- Return.centered,
- Return.clean,
- Return.cumulative,
- Return.excess,
- Return.Geltner,
- Return.portfolio,
- Return.rebalancing,
- Return.read,
- Return.relative,
- sd.annualized,
- sd.multiperiod,
- SemiDeviation,
- SemiVariance,
- SharpeRatio,
- SharpeRatio.annualized,
- SharpeRatio.modified,
- skewness,
- SmoothingIndex,
- sortDrawdowns,
- SortinoRatio,
- StdDev,
- StdDev.annualized,
- SterlingRatio,
-# style.fit,
-# style.QPfit,
- TimingRatio,
- TrackingError,
- TreynorRatio,
- UpDownRatios,
- UPR,
- UpsidePotentialRatio,
- VaR
-)
-
-## Tables
-export(
- table.AnnualizedReturns,
- table.Arbitrary,
- table.Autocorrelation,
- table.CalendarReturns,
- table.CAPM,
- table.CaptureRatios,
- table.Correlation,
- table.DownsideRisk,
- table.Drawdowns,
- table.HigherMoments,
- table.Returns,
- table.Stats,
- table.TrailingPeriods,
- table.TrailingPeriodsRel,
- table.UpDownRatios
-)
-
-## Charts
-export(
- chart.ACF,
- chart.ACFplus,
- chart.Bar,
- charts.Bar,
- chart.BarVaR,
- charts.BarVaR,
- chart.Boxplot,
- chart.CaptureRatios,
- chart.Correlation,
-# chart.Correlation.color,
- chart.CumReturns,
- chart.Drawdown,
- chart.ECDF,
- chart.Events,
- chart.Histogram,
- chart.QQPlot,
- chart.Regression,
- chart.RelativePerformance,
- chart.RiskReturnScatter,
- chart.RollingCorrelation,
- chart.RollingMean,
- chart.RollingPerformance,
- chart.RollingRegression,
- chart.RollingQuantileRegression,
-# chart.RollingStyle,
- chart.Scatter,
- chart.SnailTrail,
- charts.PerformanceSummary,
- charts.RollingPerformance,
- charts.RollingRegression,
- chart.StackedBar,
-# chart.Style,
- chart.TimeSeries,
- chart.VaRSensitivity,
- textplot
-)
-
-export(
- allsymbols,
- bluefocus,
- bluemono,
- bond.dates,
- bond.labels,
- closedsymbols,
- cycles.dates,
- dark6equal,
- dark8equal,
- equity.dates,
- equity.labels,
- fillsymbols,
- greenfocus,
- greenmono,
- grey6mono,
- grey8mono,
- legend,
- linesymbols,
- macro.dates,
- macro.labels,
- opensymbols,
- rainbow10equal,
- rainbow12equal,
- rainbow6equal,
- rainbow8equal,
- redfocus,
- redmono,
- rich10equal,
- rich12equal,
- rich6equal,
- rich8equal,
- risk.dates,
- risk.labels,
- set6equal,
- set8equal,
- tim10equal,
- tim12equal,
- tim6equal,
- tim8equal
-)
-
-S3method(textplot, default)
-S3method(textplot, character)
-S3method(textplot, data.frame)
-S3method(textplot, matrix)
-
-S3method(mean,xts)
-S3method(sd,xts)
-#S3method(mean,matrix)
-S3method(sd,matrix)
-
-S3method(rollapply,xts)
-
-# # Export These
-# ActivePremium
-# apply.fromstart
-# apply.rolling
-# BetaCoKurtosis
-# BetaCoSkewness
-# BetaCoVariance
-# CalculateReturns
-# CalmarRatio
-# CAPM.alpha
-# CAPM.beta
-# CAPM.beta.bear
-# CAPM.beta.bull
-# CAPM.CML
-# CAPM.CML.slope
-# CAPM.RiskPremium
-# CAPM.SML.slope
-# chart.ACF
-# chart.ACFplus
-# chart.Bar
-# chart.BarVaR
-# chart.Boxplot
-# chart.CaptureRatios
-# chart.Correlation
-# chart.Correlation.color
-# chart.CumReturns
-# chart.Drawdown
-# chart.ECDF
-# chart.Histogram
-# chart.QQPlot
-# chart.Regression
-# chart.RelativePerformance
-# chart.RiskReturnScatter
-# chart.RollingCorrelation
-# chart.RollingMean
-# chart.RollingPerformance
-# chart.RollingRegression
-# chart.RollingStyle
-# chart.Scatter
-# chart.SnailTrail
-# charts.PerformanceSummary
-# charts.RollingPerformance
-# charts.RollingRegression
-# chart.StackedBar
-# chart.Style
-# chart.TimeSeries
-# chart.VaRSensitivity
-# checkData
-# clean.boudt
-# CoKurtosis
-# CoKurtosisMatrix
-# CoSkewness
-# CoSkewnessMatrix
-# CoVariance
-# DownsideDeviation
-# Drawdowns
-# ES
-# findDrawdowns
-# InformationRatio
-# KellyRatio
-# kurtosis
-# maxDrawdown
-# mean.geometric
-# mean.LCL
-# mean.stderr
-# mean.UCL
-# modifiedVaR
-# modSharpe
-# multivariate_mean
-# Omega
-# pfolioReturn
-# Return.annualized
-# Return.calculate
-# Return.centered
-# Return.clean
-# Return.cumulative
-# Return.excess
-# Return.Geltner
-# Return.portfolio
-# Return.portfolio.multiweight
-# Return.read
-# Return.relative
-# sd.annualized
-# sd.multiperiod
-# SemiDeviation
-# SemiVariance
-# SharpeRatio
-# SharpeRatio.annualized
-# SharpeRatio.modified
-# skewness
-# SmoothingIndex
-# sortDrawdowns
-# SortinoRatio
-# SterlingRatio
-# style.fit
-# style.QPfit
-# table.AnnualizedReturns
-# table.Arbitrary
-# table.Autocorrelation
-# table.CalendarReturns
-# table.CAPM
-# table.CaptureRatios
-# table.Correlation
-# table.DownsideRisk
-# table.Drawdowns
-# table.HigherMoments
-# table.MonthlyReturns
-# table.Returns
-# table.UpDownRatios
-# textplot
-# TimingRatio
-# TrackingError
-# TreynorRatio
-# UpDownRatios
-# UPR
-# UpsidePotentialRatio
-# VaR
-
-# # graphics stuff to export
-# allsymbols
-# bluefocus
-# bluemono
-# bond.dates
-# bond.labels
-# closedsymbols
-# cycles.dates
-# dark6equal
-# dark8equal
-# equity.dates
-# equity.labels
-# fillsymbols
-# greenfocus
-# greenmono
-# grey6mono
-# grey8mono
-# legend
-# linesymbols
-# macro.dates
-# macro.labels
-# opensymbols
-# rainbow10equal
-# rainbow12equal
-# rainbow6equal
-# rainbow8equal
-# redfocus
-# redmono
-# rich10equal
-# rich12equal
-# rich6equal
-# rich8equal
-# risk.dates
-# risk.labels
-# set6equal
-# set8equal
-# tim10equal
-# tim12equal
-# tim6equal
-# tim8equal
-
-# # internal/obsolete functions, do not export
-# centeredcomoment
-# centeredmoment
-# checkDataMatrix
-# checkDataVector
-# checkDataZoo
-# derIpower
-# derportm2
-# derportm3
-# derportm4
-# download.RiskFree
-# download.SP500PriceReturns
-# ES.CornishFisher
-# ES.CornishFisher.portfolio
-# ES.Gaussian
-# ES.Gaussian.portfolio
-# ES.historical.portfolio
-# GES.MM
-# GVaR.MM
-# Ipower
-# kernel
-# kurtosis.MM
-# mES.MM
-# modifiedVaR
-# multivariate_mean
-# mVaR.MM
-# M3.MM
-# M4.MM
-# portm2
-# portm3
-# portm4
-# Portmean
-# Portsd
-# precision
-# pvalJB
-# operES.CornishFisher
-# operES.CornishFisher.portfolio
-# skewness.MM
-# SR.GES.MM
-# SR.GVaR.MM
-# SR.mES.MM
-# SR.mVaR.MM
-# SR.StdDev.MM
-# statsTable
-# std
-# StdDev.annualized
-# StdDev.MM
-# textplot.character
-# textplot.data.frame
-# textplot.default
-# textplot.matrix
-# timing.ratio
-# VaR.Beyond
-# VaR.CornishFisher
-# VaR.CornishFisher.portfolio
-# VaR.Gaussian
-# VaR.Gaussian.portfolio
-# VaR.historical.portfolio
-# VaR.kernel.portfolio
-# VaR.Marginal
-# VaR.mean
-# VaR.traditional
+export(ActivePremium)
+export(AdjustedSharpeRatio)
+export(apply.fromstart)
+export(apply.rolling)
+export(AverageDrawdown)
+export(AverageRecovery)
+export(BernardoLedoitratio)
+export(BetaCoKurtosis)
+export(BetaCoMoments)
+export(BetaCoSkewness)
+export(BurkeRatio)
+export(CalculateReturns)
+export(CalmarRatio)
+export(CAPM.alpha)
+export(CAPM.beta)
+export(CAPM.beta.bear)
+export(CAPM.beta.bull)
+export(CAPM.CML)
+export(CAPM.CML.slope)
+export(CAPM.epsilon)
+export(CAPM.jensenAlpha)
+export(CAPM.RiskPremium)
+export(CAPM.SML.slope)
+export(CDD)
+export(centeredcomoment)
+export(centeredmoment)
+export(chart.ACF)
+export(chart.ACFplus)
+export(chart.Bar)
+export(chart.BarVaR)
+export(chart.Boxplot)
+export(chart.CaptureRatios)
+export(chart.Correlation)
+export(chart.CumReturns)
+export(chart.Drawdown)
+export(chart.ECDF)
+export(chart.Events)
+export(chart.Histogram)
+export(chart.QQPlot)
+export(chart.Regression)
+export(chart.RelativePerformance)
+export(chart.RiskReturnScatter)
+export(chart.RollingCorrelation)
+export(chart.RollingMean)
+export(chart.RollingPerformance)
+export(chart.RollingQuantileRegression)
+export(chart.RollingRegression)
+export(charts.Bar)
+export(charts.BarVaR)
+export(chart.Scatter)
+export(chart.SnailTrail)
+export(charts.PerformanceSummary)
+export(charts.RollingPerformance)
+export(charts.RollingRegression)
+export(chart.StackedBar)
+export(charts.TimeSeries)
+export(chart.TimeSeries)
+export(chart.VaRSensitivity)
+export(checkData)
+export(clean.boudt)
+export(CoKurtosis)
+export(CoMoments)
+export(CoSkewness)
+export(DownsideDeviation)
+export(DownsideFrequency)
+export(DRatio)
+export(DrawdownDeviation)
+export(ETL)
+export(findDrawdowns)
+export(InformationRatio)
+export(Kappa)
+export(KellyRatio)
+export(kurtosis)
+export(legend)
+export(maxDrawdown)
+export(MeanAbsoluteDeviation)
+export(mean.geometric)
+export(mean.LCL)
+export(mean.stderr)
+export(mean.UCL)
+export(Omega)
+export(OmegaSharpeRatio)
+export(PainIndex)
+export(PainRatio)
+export(Return.annualized)
+export(Return.calculate)
+export(Return.centered)
+export(Return.clean)
+export(Return.cumulative)
+export(Return.excess)
+export(Return.Geltner)
+export(Return.read)
+export(Return.rebalancing)
+export(Return.relative)
+export(SemiDeviation)
+export(SemiVariance)
+export(SharpeRatio)
+export(SharpeRatio.annualized)
+export(SharpeRatio.modified)
+export(skewness)
+export(SkewnessKurtosisRatio)
+export(SmoothingIndex)
+export(sortDrawdowns)
+export(SortinoRatio)
+export(StdDev)
+export(StdDev.annualized)
+export(SterlingRatio)
+export(SystematicRisk)
+export(table.AnnualizedReturns)
+export(table.Arbitrary)
+export(table.Autocorrelation)
+export(table.CalendarReturns)
+export(table.CAPM)
+export(table.CaptureRatios)
+export(table.Correlation)
+export(table.DownsideRisk)
+export(table.Drawdowns)
+export(table.HigherMoments)
+export(table.Stats)
+export(table.TrailingPeriods)
+export(textplot)
+export(TimingRatio)
+export(TotalRisk)
+export(TrackingError)
+export(TreynorRatio)
+export(UlcerIndex)
+export(UpDownRatios)
+export(UpsideFrequency)
+export(UpsidePotentialRatio)
+export(UpsideRisk)
+export(VaR)
+export(VolatilitySkewness)
Modified: pkg/PerformanceAnalytics/R/CAPM.beta.R
===================================================================
--- pkg/PerformanceAnalytics/R/CAPM.beta.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/CAPM.beta.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -131,6 +131,8 @@
}
}
+#' @rdname CAPM.beta
+#' @export
CAPM.beta.bull <-
function (Ra, Rb, Rf = 0)
{ # @author Peter Carl
@@ -183,6 +185,8 @@
}
}
+#' @rdname CAPM.beta
+#' @export
CAPM.beta.bear <-
function (Ra, Rb, Rf = 0)
{ # @author Peter Carl
@@ -236,6 +240,8 @@
}
+#' @rdname CAPM.beta
+#' @export
TimingRatio <-
function (Ra, Rb, Rf = 0)
{ # @author Peter Carl
Modified: pkg/PerformanceAnalytics/R/CAPM.utils.R
===================================================================
--- pkg/PerformanceAnalytics/R/CAPM.utils.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/CAPM.utils.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -126,6 +126,7 @@
#' CAPM.RiskPremium(managers[,"HAM1",drop=FALSE], Rf=0)
#' CAPM.SML.slope(managers[,"SP500 TR",drop=FALSE], Rf=0)
#' # should create plots like in Ruppert 7.1 7.2
+#' @export
CAPM.RiskPremium <- function (Ra, Rf = 0)
{ #@author Brian G. Peterson
@@ -141,6 +142,8 @@
return (result)
}
+#' @rdname CAPM.RiskPremium
+#' @export
CAPM.SML.slope <- function (Rb, Rf = 0)
{ #@author Brian G. Peterson
Modified: pkg/PerformanceAnalytics/R/CoMoments.R
===================================================================
--- pkg/PerformanceAnalytics/R/CoMoments.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/CoMoments.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -197,7 +197,6 @@
#' Preference for Moments of Higher Order than the Variance. Journal of Finance
#' 35(4):915-919.
#' @keywords ts multivariate distribution models
-#' @export
#' @examples
#'
#' data(managers)
@@ -205,7 +204,7 @@
#' CoSkewness(managers[, "HAM2", drop=FALSE], managers[, "SP500 TR", drop=FALSE])
#' CoKurtosis(managers[, "HAM2", drop=FALSE], managers[, "SP500 TR", drop=FALSE])
#'
-#'
+#' @export
CoVariance<- function(Ra,Rb)
{# @author Kris Boudt, Peter Carl
Ra= checkData(Ra)
@@ -236,13 +235,12 @@
#' Functions to calculate systematic or beta co-moments of return series
#'
+#' calculate higher co-moment betas, or 'systematic' variance, skewness, and
+#' kurtosis
#' @name BetaCoMoments
+#' @aliases BetaCoMoments BetaCoVariance BetaCoSkewness BetaCoKurtosis
#' @concept beta co-moments
#' @concept moments
-#' @aliases BetaCoMoments BetaCoVariance BetaCoSkewness BetaCoKurtosis
-#' @export
-#' calculate higher co-moment betas, or 'systematic' variance, skewness, and
-#' kurtosis
#'
#' The co-moments, including covariance, coskewness, and cokurtosis, do not
#' allow the marginal impact of an asset on a portfolio to be directly
@@ -261,19 +259,28 @@
#' 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) =
-#' CoV(Ra,Rb)/centeredmoment(Rb,2)}\deqn{ \beta^{(2)}_{a,b} =
+#' 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)} Beta co-skewness is given as: \deqn{
-#' }{BetaCoS(Ra,Rb) = CoS(Ra,Rb)/centeredmoment(Rb,3)}\deqn{ \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: \deqn{
-#' }{BetaCoK(Ra,Rb) = CoK(Ra,Rb)/centeredmoment(Rb,4)}\deqn{ \beta^{(4)}_{a,b}
+#' CoV(Ra,Rb)/centeredmoment(Rb,2)}
+#'
+#' 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)}
+#'
+#' 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)} where the \eqn{n}-th centered moment is
-#' calculated as \deqn{ }{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]}
+#' CoK(Ra,Rb)/centeredmoment(Rb,4)}
#'
+#' 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]}
+#'
#' 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
@@ -334,7 +341,7 @@
#' BetaCoKurtosis(managers[,1:6], managers[,8,drop=FALSE])
#' BetaCoKurtosis(managers[,1:6], managers[,8:7])
#'
-#'
+#' @export
BetaCoVariance <- function(Ra,Rb)
{# @author Kris Boudt, Peter Carl
Ra= checkData(Ra)
Modified: pkg/PerformanceAnalytics/R/DownsideDeviation.R
===================================================================
--- pkg/PerformanceAnalytics/R/DownsideDeviation.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/DownsideDeviation.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -103,7 +103,6 @@
#' SemiVariance (managers[,1:6]) #calculated using method="subset"
#'
#' @export
-
DownsideDeviation <-
function (R, MAR = 0, method=c("full","subset"), ..., potential=FALSE)
{ # @author Peter Carl, Matthieu Lestel
Modified: pkg/PerformanceAnalytics/R/InformationRatio.R
===================================================================
--- pkg/PerformanceAnalytics/R/InformationRatio.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/InformationRatio.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -28,6 +28,7 @@
#' InformationRatio(managers[,1:6], managers[,8,drop=FALSE])
#' InformationRatio(managers[,1:6], managers[,8:7])
#'
+#' @export
InformationRatio <-
function (Ra, Rb, scale = NA)
{ # @author Peter Carl
Modified: pkg/PerformanceAnalytics/R/KellyRatio.R
===================================================================
--- pkg/PerformanceAnalytics/R/KellyRatio.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/KellyRatio.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -35,6 +35,7 @@
#' KellyRatio(managers[,1,drop=FALSE], Rf=managers[,10,drop=FALSE])
#' KellyRatio(managers[,1:6], Rf=managers[,10,drop=FALSE])
#'
+#' @export
KellyRatio <-
function (R, Rf = 0, method = "half")
{ # @author Brian G. Peterson
Modified: pkg/PerformanceAnalytics/R/Omega.R
===================================================================
--- pkg/PerformanceAnalytics/R/Omega.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/Omega.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -66,6 +66,7 @@
#' Omega(edhec[,13],method="interp",output="point")
#' Omega(edhec[,13],method="interp",output="full")
#'
+#' @export
Omega <-
function(R, L = 0, method = c("simple", "interp", "binomial", "blackscholes"), output = c("point", "full"), Rf = 0, ...)
{ # @author Peter Carl
Modified: pkg/PerformanceAnalytics/R/OmegaSharpeRatio.R
===================================================================
--- pkg/PerformanceAnalytics/R/OmegaSharpeRatio.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/OmegaSharpeRatio.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -38,7 +38,6 @@
#' print(OmegaSharpeRatio(managers['1996',1], MAR)) #expected 3.60
#'
#' @export
-
OmegaSharpeRatio <-
function (R, MAR = 0, ...)
{
Modified: pkg/PerformanceAnalytics/R/Return.Geltner.R
===================================================================
--- pkg/PerformanceAnalytics/R/Return.Geltner.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/Return.Geltner.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -39,6 +39,7 @@
#' data(managers)
#' head(Return.Geltner(managers[,1:3]),n=20)
#'
+#' @export
Return.Geltner <-
function (Ra, ...)
{ # @author Brian G. Peterson, Peter Carl
Modified: pkg/PerformanceAnalytics/R/Return.annualized.R
===================================================================
--- pkg/PerformanceAnalytics/R/Return.annualized.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/Return.annualized.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -35,6 +35,7 @@
#' Return.annualized(managers[,1:8])
#' Return.annualized(managers[,1:8],geometric=FALSE)
#'
+#' @export
Return.annualized <-
function (R, scale = NA, geometric = TRUE )
{ # @author Peter Carl
Modified: pkg/PerformanceAnalytics/R/Return.calculate.R
===================================================================
--- pkg/PerformanceAnalytics/R/Return.calculate.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/Return.calculate.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -44,7 +44,7 @@
#' colnames(R.IBM)="IBM"
#' chart.CumReturns(R.IBM,legend.loc="topleft", main="Cumulative Daily Returns for IBM")
#' round(R.IBM,2)
-#'
+#' @export
Return.calculate <-
function(prices, method = c("compound","simple"))
{ # @ author Peter Carl
@@ -73,6 +73,8 @@
}
+#' @rdname Return.calculate
+#' @export
CalculateReturns <-
function(prices, method = c("compound","simple"))
{ # @ author Peter Carl
Modified: pkg/PerformanceAnalytics/R/Return.clean.R
===================================================================
--- pkg/PerformanceAnalytics/R/Return.clean.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/Return.clean.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -37,6 +37,7 @@
#' head(Return.clean(managers[,1:4]),n=20)
#' chart.BarVaR(managers[,1,drop=FALSE], show.clean=TRUE, clean="boudt", lwd=2, methods="ModifiedVaR")
#'
+#' @export
Return.clean <-
function(R, method = c("none","boudt","geltner"), alpha=.01, ...)
{ # @author Peter Carl
@@ -195,6 +196,7 @@
#' In W. Grossmann, G. Pflug, I. Vincze, and W. Wertz (Eds.), Mathematical
#' Statistics and Its Applications, Volume B, pp. 283?297. Dordrecht-Reidel.
#' @keywords ts multivariate distribution models
+#' @export
clean.boudt <-
function(R, alpha=.01 , trim=1e-3)
{# @author Kris Boudt, Brian Peterson
Modified: pkg/PerformanceAnalytics/R/Return.cumulative.R
===================================================================
--- pkg/PerformanceAnalytics/R/Return.cumulative.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/Return.cumulative.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -23,6 +23,7 @@
#' Return.cumulative(managers[,1:8])
#' Return.cumulative(managers[,1:8],geometric=FALSE)
#'
+#' @export
Return.cumulative <-
function (R, geometric = TRUE)
{ # @author Peter Carl
Modified: pkg/PerformanceAnalytics/R/Return.excess.R
===================================================================
--- pkg/PerformanceAnalytics/R/Return.excess.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/Return.excess.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -38,6 +38,7 @@
#' head(Return.excess(managers[,1:6], managers[,10,drop=FALSE]))
#' head(Return.excess(managers[,1,drop=FALSE], managers[,8,drop=FALSE]))
#'
+#' @export
Return.excess <-
function (R, Rf = 0)
{ # @author Peter Carl
Modified: pkg/PerformanceAnalytics/R/Return.portfolio.R
===================================================================
--- pkg/PerformanceAnalytics/R/Return.portfolio.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/Return.portfolio.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -1,3 +1,5 @@
+#' @rdname Return.portfolio
+#' @export
Return.rebalancing <- function (R, weights, ...)
{ # @author Brian G. Peterson
Modified: pkg/PerformanceAnalytics/R/Return.read.R
===================================================================
--- pkg/PerformanceAnalytics/R/Return.read.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/Return.read.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -40,7 +40,7 @@
#' Return.read("managers.cvs", frequency="d")
#' }
#'
-#'
+#' @export
Return.read <-
function (filename=stop("Please specify a filename"), frequency = c("d","m","q","i","o"), format.in = c("ISO8601","excel","oo","gnumeric"), sep = ",", header = TRUE, check.names = FALSE, ...)
{ # @author Peter Carl
Modified: pkg/PerformanceAnalytics/R/Return.relative.R
===================================================================
--- pkg/PerformanceAnalytics/R/Return.relative.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/Return.relative.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -17,6 +17,7 @@
#' data(managers)
#' head(Return.relative(managers[,1:3], managers[,8,drop=FALSE]),n=20)
#'
+#' @export
Return.relative <-
function (Ra, Rb, ...)
{ # @author Peter Carl
Modified: pkg/PerformanceAnalytics/R/SemiDeviation.R
===================================================================
--- pkg/PerformanceAnalytics/R/SemiDeviation.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/SemiDeviation.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -1,3 +1,5 @@
+#' @rdname DownsideDeviation
+#' @export
SemiDeviation <-
function (R)
{ # @author Peter Carl
@@ -23,6 +25,8 @@
}
}
+#' @rdname DownsideDeviation
+#' @export
SemiVariance <-
function (R)
{
Modified: pkg/PerformanceAnalytics/R/SharpeRatio.R
===================================================================
--- pkg/PerformanceAnalytics/R/SharpeRatio.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/SharpeRatio.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -76,7 +76,6 @@
#' @export
#' @rdname SharpeRatio
#'
-#'
SharpeRatio <-
function (R, Rf = 0, p = 0.95, FUN=c("StdDev", "VaR","ES"), weights=NULL, annualize = FALSE , ...)
{ # @author Brian G. Peterson
Modified: pkg/PerformanceAnalytics/R/SharpeRatio.annualized.R
===================================================================
--- pkg/PerformanceAnalytics/R/SharpeRatio.annualized.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/SharpeRatio.annualized.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -42,6 +42,7 @@
#' SharpeRatio.annualized(managers[,1:6], Rf = managers[,10,drop=FALSE])
#' SharpeRatio.annualized(managers[,1:6], Rf = managers[,10,drop=FALSE],geometric=FALSE)
#'
+#' @export
SharpeRatio.annualized <-
function (R, Rf = 0, scale = NA, geometric=TRUE)
{ # @author Peter Carl
Modified: pkg/PerformanceAnalytics/R/SkewnessKurtosisRatio.R
===================================================================
--- pkg/PerformanceAnalytics/R/SkewnessKurtosisRatio.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/SkewnessKurtosisRatio.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -29,7 +29,6 @@
#' print(SkewnessKurtosisRatio(managers['1996',1])
#'
#' @export
-
SkewnessKurtosisRatio <-
function (R, ...)
{
Modified: pkg/PerformanceAnalytics/R/SmoothingIndex.R
===================================================================
--- pkg/PerformanceAnalytics/R/SmoothingIndex.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/SmoothingIndex.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -92,6 +92,7 @@
#' SmoothingIndex(managers[,1:8])
#' SmoothingIndex(edhec)
#'
+#' @export
SmoothingIndex <-
function (R, neg.thetas = FALSE, MAorder=2, verbose = FALSE, ...)
{ # @author Peter Carl
Modified: pkg/PerformanceAnalytics/R/SortinoRatio.R
===================================================================
--- pkg/PerformanceAnalytics/R/SortinoRatio.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/SortinoRatio.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -41,6 +41,7 @@
#' round(SortinoRatio(managers[, 1]),4)
#' round(SortinoRatio(managers[, 1:8]),4)
#'
+#' @export
SortinoRatio <-
function (R, MAR = 0,...,weights=NULL)
{ # @author Brian G. Peterson
Modified: pkg/PerformanceAnalytics/R/StdDev.R
===================================================================
--- pkg/PerformanceAnalytics/R/StdDev.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/StdDev.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -74,6 +74,7 @@
#' StdDev(edhec, clean="boudt", portfolio_method="component")
#'
#'
+#' @export
StdDev <- function (R , ..., clean=c("none","boudt","geltner"), portfolio_method=c("single","component"), weights=NULL, mu=NULL, sigma=NULL, use="everything", method=c("pearson", "kendall", "spearman"))
{ # @author Brian G. Peterson
Modified: pkg/PerformanceAnalytics/R/SystematicRisk.R
===================================================================
--- pkg/PerformanceAnalytics/R/SystematicRisk.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/SystematicRisk.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -33,7 +33,6 @@
#' print(SystematicRisk(managers['1996',1:5], managers['1996',8]))
#'
#' @export
-
SystematicRisk <-
function (Ra, Rb, Rf = 0, Period = 12, ...)
{
Modified: pkg/PerformanceAnalytics/R/TotalRisk.R
===================================================================
--- pkg/PerformanceAnalytics/R/TotalRisk.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/TotalRisk.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -30,7 +30,6 @@
#' print(TotalRisk(managers['1996',1:5], managers['1996',8]))
#'
#' @export
-
TotalRisk <-
function (Ra, Rb, Rf = 0, Period = 12, ...)
{
Modified: pkg/PerformanceAnalytics/R/TrackingError.R
===================================================================
--- pkg/PerformanceAnalytics/R/TrackingError.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/TrackingError.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -28,6 +28,7 @@
#' TrackingError(managers[,1:6], managers[,8,drop=FALSE])
#' TrackingError(managers[,1:6], managers[,8:7,drop=FALSE])
#'
+#' @export
TrackingError <-
function (Ra, Rb, scale = NA)
{ # @author Peter Carl
Modified: pkg/PerformanceAnalytics/R/TreynorRatio.R
===================================================================
--- pkg/PerformanceAnalytics/R/TreynorRatio.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/TreynorRatio.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -43,54 +43,7 @@
#' print(TreynorRatio(managers['1996',1], managers['1996',8], modified = TRUE))
#' print(TreynorRatio(managers['1996',1:5], managers['1996',8], modified = TRUE))
#'
-
-ModifiedTreynorRatio <-
-function (Ra, Rb, Rf = 0, scale = NA)
-{
- if(is.na(scale)) {
- freq = periodicity(Ra)
- switch(freq$scale,
- minute = {stop("Data periodicity too high")},
- hourly = {stop("Data periodicity too high")},
- daily = {scale = 252},
- weekly = {scale = 52},
- monthly = {scale = 12},
- quarterly = {scale = 4},
- yearly = {scale = 1}
- )
- }
-
- calcul = FALSE
- Ra = checkData(Ra, method="matrix")
- Rb = checkData(Rb, method="matrix")
-
- if (ncol(Ra)==1 || is.null(Ra) || is.vector(Ra)) {
-
- Rp = (prod(1+R/100)^(scale/length(R))-1)*100
- for (i in (1:length(Ra))) {
- if (!is.na(Ra[i])) {
- calcul = TRUE
- }
- }
- if (calcul) {
- result = (Rp - Rf) / SystematicRisk(Ra, Rb, Rf)
- }
- else {
- result = NA
- }
- return(result)
- }
- else {
- Ra = checkData(Ra)
- result = apply(Ra, MARGIN = 2, ModifiedTreynorRatio, Rb = Rb, Rf = Rf)
- result<-t(result)
- colnames(result) = colnames(Ra)
- rownames(result) = paste("Modified Treynor Ratio (Risk free = ",Rf,")", sep="")
- return(result)
- }
-}
-
-
+#' @export
TreynorRatio <-
function (Ra, Rb, Rf = 0, scale = NA, modified = FALSE)
{ # @author Peter Carl, Matthieu Lestel
@@ -152,6 +105,54 @@
}
}
+#' @rdname TreynorRatio
+ModifiedTreynorRatio <-
+ function (Ra, Rb, Rf = 0, scale = NA)
+{
+ if(is.na(scale)) {
+ freq = periodicity(Ra)
+ switch(freq$scale,
+ minute = {stop("Data periodicity too high")},
+ hourly = {stop("Data periodicity too high")},
+ daily = {scale = 252},
+ weekly = {scale = 52},
+ monthly = {scale = 12},
+ quarterly = {scale = 4},
+ yearly = {scale = 1}
+ )
+ }
+
+ calcul = FALSE
+ Ra = checkData(Ra, method="matrix")
+ Rb = checkData(Rb, method="matrix")
+
+ if (ncol(Ra)==1 || is.null(Ra) || is.vector(Ra)) {
+
+ Rp = (prod(1+R/100)^(scale/length(R))-1)*100
+ for (i in (1:length(Ra))) {
+ if (!is.na(Ra[i])) {
+ calcul = TRUE
+ }
+ }
+ if (calcul) {
+ result = (Rp - Rf) / SystematicRisk(Ra, Rb, Rf)
+ }
+ else {
+ result = NA
+ }
+ return(result)
+ }
+ else {
+ Ra = checkData(Ra)
+ result = apply(Ra, MARGIN = 2, ModifiedTreynorRatio, Rb = Rb, Rf = Rf)
+ result<-t(result)
+ colnames(result) = colnames(Ra)
+ rownames(result) = paste("Modified Treynor Ratio (Risk free = ",Rf,")", sep="")
+ return(result)
+ }
+}
+
+
###############################################################################
# R (http://r-project.org/) Econometrics for Performance and Risk Analysis
#
Modified: pkg/PerformanceAnalytics/R/UlcerIndex.R
===================================================================
--- pkg/PerformanceAnalytics/R/UlcerIndex.R 2012-07-15 15:30:38 UTC (rev 2162)
+++ pkg/PerformanceAnalytics/R/UlcerIndex.R 2012-07-16 00:30:19 UTC (rev 2163)
@@ -1,30 +1,36 @@
+#' calculate the Ulcer Index
+#'
+#' Developed by Peter G. Martin in 1987 (Martin and McCann, 1987) and named
+#' for the worry caused to the portfolio manager or investor. This is
+#' similar to drawdown deviation except that the impact of the duration of
+#' drawdowns is incorporated by selecting the negative return for each
+#' period below the previous peak or high water mark. The impact of long,
+#' deep drawdowns will have significant impact because the underperformance
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/returnanalytics -r 2163
More information about the Returnanalytics-commits
mailing list