[Returnanalytics-commits] r3236 - pkg/PortfolioAnalytics/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Oct 23 01:43:37 CEST 2013


Author: rossbennett34
Date: 2013-10-23 01:43:37 +0200 (Wed, 23 Oct 2013)
New Revision: 3236

Modified:
   pkg/PortfolioAnalytics/R/constrained_objective.R
Log:
Added scaling to actual HHI for min_concentration.

Modified: pkg/PortfolioAnalytics/R/constrained_objective.R
===================================================================
--- pkg/PortfolioAnalytics/R/constrained_objective.R	2013-10-19 14:31:29 UTC (rev 3235)
+++ pkg/PortfolioAnalytics/R/constrained_objective.R	2013-10-22 23:43:37 UTC (rev 3236)
@@ -681,7 +681,7 @@
             if(isTRUE(objective$min_concentration)){
               # use HHI to calculate concentration
               # actual HHI
-              act_hhi <- sum(tmp_measure[[3]]^2)
+              act_hhi <- sum(tmp_measure[[3]]^2)/100
               # minimum possible HHI
               min_hhi <- sum(rep(1/length(tmp_measure[[3]]), length(tmp_measure[[3]]))^2)/100
               out <- out + penalty * objective$multiplier * abs(act_hhi - min_hhi)



More information about the Returnanalytics-commits mailing list