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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 26 18:41:46 CET 2013


Author: matthieu_lestel
Date: 2013-11-26 18:41:45 +0100 (Tue, 26 Nov 2013)
New Revision: 3266

Modified:
   pkg/PerformanceAnalytics/R/MSquaredExcess.R
Log:
correction of a bug when risk free rate is not null in MSquaredExcess computation

Modified: pkg/PerformanceAnalytics/R/MSquaredExcess.R
===================================================================
--- pkg/PerformanceAnalytics/R/MSquaredExcess.R	2013-11-16 21:10:07 UTC (rev 3265)
+++ pkg/PerformanceAnalytics/R/MSquaredExcess.R	2013-11-26 17:41:45 UTC (rev 3266)
@@ -52,8 +52,8 @@
         Rbp = (prod(1 + Rb))^(Period / length(Rb)) - 1
 
         switch(Method,
-            geometric = {result = (1+MSquared(Ra,Rb))/(1+Rbp) - 1},
-            arithmetic = {result = MSquared(Ra,Rb) - Rbp} 
+            geometric = {result = (1+MSquared(Ra,Rb,Rf))/(1+Rbp) - 1},
+            arithmetic = {result = MSquared(Ra,Rb,Rf) - Rbp} 
         ) # end switch
      }    
      else {



More information about the Returnanalytics-commits mailing list