[Quantproject-developers] QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOs
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2007-01-03 23:03:01
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv28641/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator Modified Files: EndOfDayTimerHandlerPVO.cs Log Message: Updated the handler for the plain PVO strategy Index: EndOfDayTimerHandlerPVO.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator/EndOfDayTimerHandlerPVO.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EndOfDayTimerHandlerPVO.cs 22 Oct 2006 18:49:20 -0000 1.2 --- EndOfDayTimerHandlerPVO.cs 3 Jan 2007 23:02:58 -0000 1.3 *************** *** 68,71 **** --- 68,72 ---- protected bool portfolioHasBeenOversold; protected bool symmetricalThresholds; + protected bool overboughtMoreThanOversoldForFixedPortfolio; public EndOfDayTimerHandlerPVO(string tickerGroupID, int numberOfEligibleTickers, *************** *** 82,85 **** --- 83,87 ---- int divisorForThresholdComputation, bool symmetricalThresholds, + bool overboughtMoreThanOversoldForFixedPortfolio, int numDaysBetweenEachOptimization, PortfolioType portfolioType, double maxAcceptableCloseToCloseDrawdown): *************** *** 98,101 **** --- 100,104 ---- this.divisorForThresholdComputation = divisorForThresholdComputation; this.symmetricalThresholds = symmetricalThresholds; + this.overboughtMoreThanOversoldForFixedPortfolio = overboughtMoreThanOversoldForFixedPortfolio; this.maxAcceptableCloseToCloseDrawdown = maxAcceptableCloseToCloseDrawdown; this.stopLossConditionReached = false; *************** *** 272,276 **** currentDate, numOfTickersInGroupAtCurrentDate, ! 25,500, 0.0001,100); SelectorByLiquidity mostLiquidSelector = --- 275,279 ---- currentDate, numOfTickersInGroupAtCurrentDate, ! 20,500, 0.0001,100); SelectorByLiquidity mostLiquidSelector = *************** *** 279,293 **** this.numberOfEligibleTickers); ! SelectorByCloseToCloseCorrelationToBenchmark byCorrelationToBenchmark = ! new SelectorByCloseToCloseCorrelationToBenchmark(mostLiquidSelector.GetTableOfSelectedTickers(), ! "^GSPC",false, ! currentDate.AddDays(-this.numDaysForOptimizationPeriod), currentDate, ! this.numberOfEligibleTickers/2,false); ! SelectorByQuotationAtEachMarketDay quotedAtEachMarketDayFromLastSelection = ! new SelectorByQuotationAtEachMarketDay(byCorrelationToBenchmark.GetTableOfSelectedTickers(), false, currentDate.AddDays(-this.numDaysForOptimizationPeriod), currentDate, ! this.numberOfEligibleTickers/2, this.benchmark); return quotedAtEachMarketDayFromLastSelection.GetTableOfSelectedTickers(); --- 282,296 ---- this.numberOfEligibleTickers); ! // SelectorByCloseToCloseCorrelationToBenchmark byCorrelationToBenchmark = ! // new SelectorByCloseToCloseCorrelationToBenchmark(mostLiquidSelector.GetTableOfSelectedTickers(), ! // "^GSPC",false, ! // currentDate.AddDays(-this.numDaysForOptimizationPeriod), currentDate, ! // this.numberOfEligibleTickers/2,false); ! // SelectorByQuotationAtEachMarketDay quotedAtEachMarketDayFromLastSelection = ! new SelectorByQuotationAtEachMarketDay(mostLiquidSelector.GetTableOfSelectedTickers(), false, currentDate.AddDays(-this.numDaysForOptimizationPeriod), currentDate, ! this.numberOfEligibleTickers, this.benchmark); return quotedAtEachMarketDayFromLastSelection.GetTableOfSelectedTickers(); *************** *** 335,338 **** --- 338,342 ---- this.divisorForThresholdComputation, this.symmetricalThresholds, + this.overboughtMoreThanOversoldForFixedPortfolio, this.portfolioType); GeneticOptimizer GO = new GeneticOptimizer(this.iGenomeManager, *************** *** 342,346 **** if(setGenomeCounter) this.genomeCounter = new GenomeCounter(GO); ! GO.MutationRate = 0.4; GO.Run(false); --- 346,350 ---- if(setGenomeCounter) this.genomeCounter = new GenomeCounter(GO); ! GO.MutationRate = 0.2; GO.Run(false); |