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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue May 1 15:05:25 CEST 2012


Author: braverock
Date: 2012-05-01 15:05:25 +0200 (Tue, 01 May 2012)
New Revision: 1936

Modified:
   pkg/PerformanceAnalytics/R/ES.R
Log:
- pass mu and sigma to M# and M4 if we have them

Modified: pkg/PerformanceAnalytics/R/ES.R
===================================================================
--- pkg/PerformanceAnalytics/R/ES.R	2012-05-01 07:24:44 UTC (rev 1935)
+++ pkg/PerformanceAnalytics/R/ES.R	2012-05-01 13:05:25 UTC (rev 1936)
@@ -155,8 +155,8 @@
             if (is.null(mu)) { mu =  apply(R,2,'mean' ) }
             if (is.null(sigma)) { sigma = cov(R) }
             if(method=="modified"){
-                if (is.null(m3)) {m3 = M3.MM(R)}
-                if (is.null(m4)) {m4 = M4.MM(R)}
+                if (is.null(m3)) {m3 = M3.MM(R,mu=mu,sigma=sigma)}
+                if (is.null(m4)) {m4 = M4.MM(R,mu=mu,sigma=sigma)}
             }
         } 
     } else { 



More information about the Returnanalytics-commits mailing list