[Returnanalytics-commits] r3516 - pkg/PerformanceAnalytics/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Aug 27 22:34:38 CEST 2014
Author: kylebalkissoon
Date: 2014-08-27 22:34:37 +0200 (Wed, 27 Aug 2014)
New Revision: 3516
Modified:
pkg/PerformanceAnalytics/R/table.ProbOutperformance.R
Log:
Expanded documentation and added examples
Modified: pkg/PerformanceAnalytics/R/table.ProbOutperformance.R
===================================================================
--- pkg/PerformanceAnalytics/R/table.ProbOutperformance.R 2014-08-26 02:51:22 UTC (rev 3515)
+++ pkg/PerformanceAnalytics/R/table.ProbOutperformance.R 2014-08-27 20:34:37 UTC (rev 3516)
@@ -1,12 +1,15 @@
-#' Calculates Count of trailing periods where a fund outperformed its benchmark and calculates the proportion of those periods, this is commonly used in marketing as the probability of outperformance on a N year basis
#'
-#'
+#' @description Tool for Robustness analysis of a strategy, can be used to give the probability an investor investing at any point in time will outperform the benchmark over a given horizon. Calculates Count of trailing periods where a fund outperformed its benchmark and calculates the proportion of those periods, this is commonly used in marketing as the probability of outperformance on a N period basis.
+#'
#' @param R an xts, timeSeries or zoo object of asset returns
#' @param Rb an xts, timeSeries or zoo object of the benchmark returns
#' @param period_lengths a vector of periods the user wants to evaluate this over i.e. c(1,3,6,9,12,18,36)
#' @author Kyle Balkissoon
#' @keywords Performance Reporting Fund vs Benchmark
-#'
+#' @details Returns a table that contains the counts and probabilities of outperformance relative to benchmark for the various period_lengths
+#' @examples
+#' data(edhec) ##get data
+#' table.ProbOutPerformance(edhec[,1],edhec[,2]) ##Returns tables of conv arb benchmarked to cta global
#' @export table_ProbOutperformance
table.ProbOutPerformance = function(R,Rb,period_lengths=c(1,3,6,9,12,18,36)){
More information about the Returnanalytics-commits
mailing list