[Quantproject-developers] QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/ExtremeCount
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2008-01-14 23:33:05
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/ExtremeCounterTrend In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18649/b7_Scripts/TechnicalAnalysisTesting/Oscillators/ExtremeCounterTrend Modified Files: EndOfDayTimerHandlerECT.cs Log Message: Handlers have been updated (minor changes) Index: EndOfDayTimerHandlerECT.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/ExtremeCounterTrend/EndOfDayTimerHandlerECT.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** EndOfDayTimerHandlerECT.cs 23 Sep 2007 22:07:56 -0000 1.7 --- EndOfDayTimerHandlerECT.cs 14 Jan 2008 23:32:29 -0000 1.8 *************** *** 25,28 **** --- 25,29 ---- using QuantProject.ADT; + using QuantProject.Business.DataProviders; using QuantProject.Business.Financial.Accounting; using QuantProject.Business.Financial.Instruments; *************** *** 30,33 **** --- 31,36 ---- using QuantProject.Business.Timing; using QuantProject.Business.Strategies; + using QuantProject.Business.Strategies.ReturnsManagement; + using QuantProject.Business.Strategies.ReturnsManagement.Time; using QuantProject.Data; using QuantProject.Data.DataProviders; *************** *** 50,57 **** private double maxAcceptableCloseToCloseDrawdown; private int daysCounterWithPositions; - // private int daysCounterWithRightPositions; - // private int daysCounterWithReversalPositions; - // private bool isReversalPeriodOn = false; - // private bool isTheFirstClose = false; private DateTime lastCloseDate; private IGenomeManager iGenomeManager; --- 53,56 ---- *************** *** 75,86 **** { this.numDaysForReturnCalculation = numDaysForReturnCalculation; - // this.daysCounterWithRightPositions = 0; - // this.daysCounterWithReversalPositions = 0; - // this.isReversalPeriodOn = false; this.maxAcceptableCloseToCloseDrawdown = maxAcceptableCloseToCloseDrawdown; this.stopLossConditionReached = false; this.currentAccountValue = 0.0; this.previousAccountValue = 0.0; - // this.numDaysBetweenEachOptimization = 2* numDaysForReturnCalculation; this.numDaysBetweenEachOptimization = numDaysBetweenEachOptimization; this.seedForRandomGenerator = ConstantsProvider.SeedForRandomGenerator; --- 74,81 ---- *************** *** 117,125 **** { DateTime initialDateForHalfPeriod = ! (DateTime)timer.IndexQuotes.Rows[timer.CurrentDateArrayPosition - this.numDaysForReturnCalculation + 1]["quDate"]; DateTime finalDateForHalfPeriod = (DateTime)timer.IndexQuotes.Rows[timer.CurrentDateArrayPosition]["quDate"]; ! returnValue = this.chosenWeightedPositions.GetCloseToCloseReturn( ! initialDateForHalfPeriod,finalDateForHalfPeriod); } catch(MissingQuotesException ex) --- 112,126 ---- { DateTime initialDateForHalfPeriod = ! (DateTime)timer.IndexQuotes.Rows[timer.CurrentDateArrayPosition - this.numDaysForReturnCalculation]["quDate"]; DateTime finalDateForHalfPeriod = (DateTime)timer.IndexQuotes.Rows[timer.CurrentDateArrayPosition]["quDate"]; ! ReturnsManager returnsManager = new ReturnsManager(new CloseToCloseIntervals( ! new EndOfDayDateTime(initialDateForHalfPeriod, ! EndOfDaySpecificTime.MarketClose) , ! new EndOfDayDateTime(finalDateForHalfPeriod, ! EndOfDaySpecificTime.MarketClose) , ! this.benchmark , this.numDaysForReturnCalculation ) , ! new HistoricalAdjustedQuoteProvider() ); ! returnValue = this.chosenWeightedPositions.GetReturn(0,returnsManager); } catch(MissingQuotesException ex) *************** *** 263,267 **** currentDate, this.numberOfTickersToBeChosen, this.numDaysForReturnCalculation, ! this.portfolioType); GeneticOptimizer GO = new GeneticOptimizer(this.iGenomeManager, this.populationSizeForGeneticOptimizer, --- 264,268 ---- currentDate, this.numberOfTickersToBeChosen, this.numDaysForReturnCalculation, ! this.portfolioType,this.benchmark); GeneticOptimizer GO = new GeneticOptimizer(this.iGenomeManager, this.populationSizeForGeneticOptimizer, |