[Quantproject-developers] QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOs
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2008-04-13 17:10:14
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9408/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator Modified Files: PVO_OTCMain.cs Log Message: Changed to reflect the new abstract methods arranged in BasicScriptForBacktesting Index: PVO_OTCMain.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator/PVO_OTCMain.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PVO_OTCMain.cs 8 Apr 2008 22:03:48 -0000 1.3 --- PVO_OTCMain.cs 13 Apr 2008 17:10:07 -0000 1.4 *************** *** 72,76 **** } ! protected override void setEligiblesSelector() { int maxNumberOfEligiblesToBeChosen = 100; --- 72,76 ---- } ! protected override IEligiblesSelector getEligiblesSelector() { int maxNumberOfEligiblesToBeChosen = 100; *************** *** 90,94 **** double maxPrice = 7000; ! this.eligiblesSelector = new ByPriceMostLiquidAlwaysQuoted( tickersGroupId , temporizedGroup , --- 90,94 ---- double maxPrice = 7000; ! IEligiblesSelector eligiblesSelector = new ByPriceMostLiquidAlwaysQuoted( tickersGroupId , temporizedGroup , *************** *** 96,104 **** numDaysForAverageRawOpenPriceComputation , minPrice , maxPrice ); ! this.eligiblesSelector = new DummyEligibleSelector(); } ! protected override void setInSampleChooser() { // parameters for the genetic optimizer --- 96,105 ---- numDaysForAverageRawOpenPriceComputation , minPrice , maxPrice ); ! eligiblesSelector = new DummyEligibleSelector(); + return eligiblesSelector; } ! protected override IInSampleChooser getInSampleChooser() { // parameters for the genetic optimizer *************** *** 121,134 **** //correlation is computed only for returns //between minimum and maximum ! this.inSampleChooser = new PVO_OTCCorrelationChooser(numberOfBestTestingPositionsToBeReturned, maxCorrelationAllowed , balancedWeightsOnVolatilityBase, minimumAbsoluteReturnValue , maximumAbsoluteReturnValue); ! this.inSampleChooser = new PVOChooserFromSavedBackTestLog( @"C:\Utente\MarcoVarie\Vari\qP\LogArchive\2008_04_07_12_17_18_PVO_OTC_from_2001_01_01_to_2001_03_31_annlRtrn_232,37_maxDD_5,04\2008_04_07_12_17_18_PVO_OTC_from_2001_01_01_to_2001_03_31_annlRtrn_232,37_maxDD_5,04.qpL"); } ! protected override void setEndOfDayStrategy() { int inSampleDays = 180; --- 122,136 ---- //correlation is computed only for returns //between minimum and maximum ! IInSampleChooser inSampleChooser = new PVO_OTCCorrelationChooser(numberOfBestTestingPositionsToBeReturned, maxCorrelationAllowed , balancedWeightsOnVolatilityBase, minimumAbsoluteReturnValue , maximumAbsoluteReturnValue); ! inSampleChooser = new PVOChooserFromSavedBackTestLog( @"C:\Utente\MarcoVarie\Vari\qP\LogArchive\2008_04_07_12_17_18_PVO_OTC_from_2001_01_01_to_2001_03_31_annlRtrn_232,37_maxDD_5,04\2008_04_07_12_17_18_PVO_OTC_from_2001_01_01_to_2001_03_31_annlRtrn_232,37_maxDD_5,04.qpL"); + return inSampleChooser; } ! protected override IEndOfDayStrategyForBacktester getEndOfDayStrategy() { int inSampleDays = 180; *************** *** 138,147 **** double oversoldThreshold = 0.006; double overboughtThreshold = 0.006; ! this.endOfDayStrategy = new PVO_OTCStrategy(eligiblesSelector ,inSampleChooser , inSampleDays , benchmark , numDaysBetweenEachOptimization , oversoldThreshold , overboughtThreshold , historicalQuoteProvider); } ! protected override void setEndOfDayStrategyBackTester() { string backTestId = "PVO_OTC"; --- 140,150 ---- double oversoldThreshold = 0.006; double overboughtThreshold = 0.006; ! IEndOfDayStrategyForBacktester endOfDayStrategy = new PVO_OTCStrategy(eligiblesSelector ,inSampleChooser , inSampleDays , benchmark , numDaysBetweenEachOptimization , oversoldThreshold , overboughtThreshold , historicalQuoteProvider); + return endOfDayStrategy; } ! protected override EndOfDayStrategyBackTester getEndOfDayStrategyBackTester() { string backTestId = "PVO_OTC"; *************** *** 153,157 **** double maxRunningHours = 3; ! this.endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( backTestId , this.endOfDayStrategy , --- 156,160 ---- double maxRunningHours = 3; ! EndOfDayStrategyBackTester endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( backTestId , this.endOfDayStrategy , *************** *** 159,162 **** --- 162,166 ---- firstDateTime , lastDateTime , this.benchmark , cashToStart , maxRunningHours ); + return endOfDayStrategyBackTester; } |