[Returnanalytics-commits] r4023 - in pkg/FactorAnalytics: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon May 23 16:17:41 CEST 2016


Author: pragnya
Date: 2016-05-23 16:17:41 +0200 (Mon, 23 May 2016)
New Revision: 4023

Modified:
   pkg/FactorAnalytics/DESCRIPTION
   pkg/FactorAnalytics/R/fitFfm.R
Log:
Fixed bug in z.score functionality in fitFfm

Modified: pkg/FactorAnalytics/DESCRIPTION
===================================================================
--- pkg/FactorAnalytics/DESCRIPTION	2016-05-11 00:46:52 UTC (rev 4022)
+++ pkg/FactorAnalytics/DESCRIPTION	2016-05-23 14:17:41 UTC (rev 4023)
@@ -1,8 +1,8 @@
 Package: factorAnalytics
 Type: Package
 Title: Factor Analytics
-Version: 2.0.32
-Date: 2016-05-10
+Version: 2.0.33
+Date: 2016-05-23
 Author: Eric Zivot, Sangeetha Srinivasan and Yi-An Chen
 Maintainer: Sangeetha Srinivasan <sangee at uw.edu>
 Description: Linear factor model fitting for asset returns (three major types-

Modified: pkg/FactorAnalytics/R/fitFfm.R
===================================================================
--- pkg/FactorAnalytics/R/fitFfm.R	2016-05-11 00:46:52 UTC (rev 4022)
+++ pkg/FactorAnalytics/R/fitFfm.R	2016-05-23 14:17:41 UTC (rev 4023)
@@ -383,7 +383,7 @@
     x_bar <- mean(w*x[[i]]) 
     n <- length(x[[i]])
     # use equal weighted squared deviation about the weighted mean
-    (x[[i]] - x_bar)/sqrt((x[[i]]-x_bar)^2/(n-1))
+    (x[[i]] - x_bar)/sqrt(sum((x[[i]]-x_bar)^2)/(n-1))
   }
 }
 



More information about the Returnanalytics-commits mailing list