Update of /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13868/b7_Scripts/TickerSelectionTesting
Modified Files:
GenomeManagerForWeightedEfficientPortfolio.cs
Log Message:
Minimum weight now depends on the new constant AmountOfVariableWeightToBeAssignedToTickers,
which substitutes the old constant MinimumPortfolioWeightForTicker.
In this way, the method getTickerWeight shouldn't fail with any number of tickers in portfolio
Index: GenomeManagerForWeightedEfficientPortfolio.cs
===================================================================
RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/GenomeManagerForWeightedEfficientPortfolio.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** GenomeManagerForWeightedEfficientPortfolio.cs 2 Jun 2006 18:58:09 -0000 1.3
--- GenomeManagerForWeightedEfficientPortfolio.cs 25 Jul 2006 15:22:50 -0000 1.4
***************
*** 62,66 ****
protected override double getTickerWeight(int[] genes, int tickerPositionInGenes)
{
! double minimumWeight = ConstantsProvider.MinimumPortfolioWeightForTicker;
double totalOfValuesForWeightsInGenes = 0.0;
for(int j = 0; j<genes.Length; j++)
--- 62,67 ----
protected override double getTickerWeight(int[] genes, int tickerPositionInGenes)
{
! double minimumWeight = (1.0 - ConstantsProvider.AmountOfVariableWeightToBeAssignedToTickers)/
! (genes.Length / 2);
double totalOfValuesForWeightsInGenes = 0.0;
for(int j = 0; j<genes.Length; j++)
|