[Returnanalytics-commits] r2314 - pkg/PerformanceAnalytics/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jan 23 21:27:40 CET 2013


Author: peter_carl
Date: 2013-01-23 21:27:39 +0100 (Wed, 23 Jan 2013)
New Revision: 2314

Modified:
   pkg/PerformanceAnalytics/R/SharpeRatio.annualized.R
Log:
- changed apply to sapply to pass xts objects into Return.excess


Modified: pkg/PerformanceAnalytics/R/SharpeRatio.annualized.R
===================================================================
--- pkg/PerformanceAnalytics/R/SharpeRatio.annualized.R	2013-01-23 20:24:43 UTC (rev 2313)
+++ pkg/PerformanceAnalytics/R/SharpeRatio.annualized.R	2013-01-23 20:27:39 UTC (rev 2314)
@@ -85,7 +85,7 @@
         SR
     }
 
-    result = apply(R, 2, sr, Rf=Rf, scale=scale)
+    result = sapply(R, sr, Rf=Rf, scale=scale)
     dim(result) = c(1,NCOL(R))
     colnames(result) = colnames(R)
     rownames(result) = paste("Annualized Sharpe Ratio (Rf=", round(mean(Rf)*scale*100,1), "%)", sep="")



More information about the Returnanalytics-commits mailing list