[Quantproject-developers] QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/ExtremeCount
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2006-08-07 21:03:30
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/ExtremeCounterTrend In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22618/b7_Scripts/TechnicalAnalysisTesting/Oscillators/ExtremeCounterTrend Modified Files: GenomeManagerECT.cs Log Message: Changed IGenomeManager interface. Now, properties MinValueForGenes and MaxValueForGenes have been replaced by GetMinValueForGenes(int genePosition) and GetMaxValueForGenes(int genePosition) methods. Property CurrentGeneticOptimizer has been deleted from the interface. Modified the constructor of Genome class: now a GeneticOptimizer object is necessary for a creating a new instance of Genome. Some useless code has been deleted through out the classes used for genetic optimization. Index: GenomeManagerECT.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/ExtremeCounterTrend/GenomeManagerECT.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GenomeManagerECT.cs 2 Jul 2006 19:55:58 -0000 1.2 --- GenomeManagerECT.cs 7 Aug 2006 21:03:24 -0000 1.3 *************** *** 38,42 **** /// </summary> [Serializable] ! public class GenomeManagerECT : GenomeManagerForWeightedEfficientPortfolio { private int numDaysForReturnCalculation; --- 38,42 ---- /// </summary> [Serializable] ! public class GenomeManagerECT : GenomeManagerForEfficientPortfolio { private int numDaysForReturnCalculation; *************** *** 113,117 **** // return sharpeRatioAll;//*sharpeRatioSecondHalf; // return modifiedSharpeRatioAll; ! return AdvancedFunctions.GetExpectancyScore(equityLine); } --- 113,118 ---- // return sharpeRatioAll;//*sharpeRatioSecondHalf; // return modifiedSharpeRatioAll; ! //return AdvancedFunctions.GetExpectancyScore(equityLine); ! return AdvancedFunctions.GetSharpeRatio(equityLine); } *************** *** 135,143 **** for(int t=1;t<this.numDaysForReturnCalculation + 1;t++) { ! if(gainForTheLastHalfPeriod<0.0) // if gain of first half period is negative returnValue[i+t] = this.PortfolioRatesOfReturn[i+t]; ! else ! returnValue[i+t] = - this.PortfolioRatesOfReturn[i+t]; } --- 136,152 ---- for(int t=1;t<this.numDaysForReturnCalculation + 1;t++) { ! if(gainForTheLastHalfPeriod < 0.0) // if gain of first half period is negative returnValue[i+t] = this.PortfolioRatesOfReturn[i+t]; ! else if(gainForTheLastHalfPeriod > 0.0 && ! this.PortfolioType == PortfolioType.ShortAndLong) ! //if gain of first half period is positive and ! //original positions can be reversed ! returnValue[i+t] = - this.PortfolioRatesOfReturn[i+t]; ! else if(gainForTheLastHalfPeriod > 0.0 && ! this.PortfolioType != PortfolioType.ShortAndLong) ! //if gain of first half period is positive and ! //original positions can't be reversed ! returnValue[i+t] = 0.0;//out of the market } |