[Quantproject-developers] QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOs
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2008-11-12 20:42:42
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13897/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator Modified Files: PVO_CTOLogItem.cs PVO_CTOMain.cs PVO_OTCLogItem.cs PVO_OTCMain.cs PVOLogItem.cs PVOMain.cs Log Message: A new parameter of type Timer has been added to the EndOfDayStrategyBackTester Index: PVO_OTCLogItem.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator/PVO_OTCLogItem.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PVO_OTCLogItem.cs 29 Sep 2008 21:17:48 -0000 1.5 --- PVO_OTCLogItem.cs 12 Nov 2008 20:42:39 -0000 1.6 *************** *** 19,23 **** along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ using System; --- 19,23 ---- along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ using System; *************** *** 39,52 **** namespace QuantProject.Scripts.TechnicalAnalysisTesting.Oscillators.FixedLevelOscillators.PortfolioValueOscillator { ! /// <summary> ! /// LogItem for the PVO_OTC strategy ! /// portfolio value oscillator strategy ! /// </summary> ! [Serializable] ! public class PVO_OTCLogItem : PVOLogItem ! { public PVO_OTCLogItem(DateTime dateTime, ! int numberOfInSampleDays) : base( dateTime , numberOfInSampleDays ) { --- 39,52 ---- namespace QuantProject.Scripts.TechnicalAnalysisTesting.Oscillators.FixedLevelOscillators.PortfolioValueOscillator { ! /// <summary> ! /// LogItem for the PVO_OTC strategy ! /// portfolio value oscillator strategy ! /// </summary> ! [Serializable] ! public class PVO_OTCLogItem : PVOLogItem ! { public PVO_OTCLogItem(DateTime dateTime, ! int numberOfInSampleDays) : base( dateTime , numberOfInSampleDays ) { *************** *** 70,80 **** HistoricalMarketValueProvider historicalQuoteProviderForBackTester, ! historicalQuoteProviderForInSampleChooser, ! historicalQuoteProviderForStrategy; historicalQuoteProviderForBackTester = new HistoricalAdjustedQuoteProvider(); historicalQuoteProviderForInSampleChooser = historicalQuoteProviderForBackTester; historicalQuoteProviderForStrategy = historicalQuoteProviderForInSampleChooser; ! IEligiblesSelector eligiblesSelector = new DummyEligibleSelector(); --- 70,80 ---- HistoricalMarketValueProvider historicalQuoteProviderForBackTester, ! historicalQuoteProviderForInSampleChooser, ! historicalQuoteProviderForStrategy; historicalQuoteProviderForBackTester = new HistoricalAdjustedQuoteProvider(); historicalQuoteProviderForInSampleChooser = historicalQuoteProviderForBackTester; historicalQuoteProviderForStrategy = historicalQuoteProviderForInSampleChooser; ! IEligiblesSelector eligiblesSelector = new DummyEligibleSelector(); *************** *** 85,103 **** PVO_OTCStrategy strategy = new PVO_OTCStrategy(eligiblesSelector, 1, ! positionsToTest, inSampleDays, ! benchmark , ! int.MaxValue , ! 0 , ! ((PVOPositions)positionsToTest[0]).OversoldThreshold, ! ((PVOPositions)positionsToTest[0]).OverboughtThreshold, ! historicalQuoteProviderForStrategy); EndOfDayStrategyBackTester endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( ! "PVO_OTC" , strategy , ! historicalQuoteProviderForBackTester , ! new SimpleAccountProvider(), ! firstDateTime , ! lastDateTime , benchmark , cashToStart , maxRunningHours ); // TO DO check if you can do this assign in the EndOfDayStrategyBackTester --- 85,107 ---- PVO_OTCStrategy strategy = new PVO_OTCStrategy(eligiblesSelector, 1, ! positionsToTest, inSampleDays, ! benchmark , ! int.MaxValue , ! 0 , ! ((PVOPositions)positionsToTest[0]).OversoldThreshold, ! ((PVOPositions)positionsToTest[0]).OverboughtThreshold, ! historicalQuoteProviderForStrategy); EndOfDayStrategyBackTester endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( ! "PVO_OTC" , ! new QuantProject.Business.Timing.IndexBasedEndOfDayTimer( ! HistoricalEndOfDayTimer.GetMarketOpen( firstDateTime ) , ! benchmark.Ticker ) , ! strategy , ! historicalQuoteProviderForBackTester , ! new SimpleAccountProvider(), ! firstDateTime , ! lastDateTime , benchmark , cashToStart , maxRunningHours ); // TO DO check if you can do this assign in the EndOfDayStrategyBackTester *************** *** 106,110 **** endOfDayStrategyBackTester.Run(); BackTesterReportViewer.ShowReport( lastDateTime , ! endOfDayStrategyBackTester ); } } --- 110,114 ---- endOfDayStrategyBackTester.Run(); BackTesterReportViewer.ShowReport( lastDateTime , ! endOfDayStrategyBackTester ); } } Index: PVO_OTCMain.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator/PVO_OTCMain.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PVO_OTCMain.cs 29 Sep 2008 21:17:48 -0000 1.8 --- PVO_OTCMain.cs 12 Nov 2008 20:42:39 -0000 1.9 *************** *** 19,23 **** along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ using System; --- 19,23 ---- along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ using System; *************** *** 76,80 **** int maxNumberOfEligiblesToBeChosen = 100; ! string tickersGroupId = "SP500"; --- 76,80 ---- int maxNumberOfEligiblesToBeChosen = 100; ! string tickersGroupId = "SP500"; *************** *** 88,97 **** IEligiblesSelector eligiblesSelector = new ByPriceMostLiquidLessVolatileOTCAlwaysQuoted( ! tickersGroupId , temporizedGroup , ! maxNumberOfEligiblesToBeChosen , ! maxNumberOfMostLiquidTickersToBeChosen , ! numDaysForAverageRawOpenPriceComputation , ! numDaysForVolatility , ! minPrice , maxPrice ); // IEligiblesSelector eligiblesSelector = // new ByPriceMostLiquidAlwaysQuoted( --- 88,97 ---- IEligiblesSelector eligiblesSelector = new ByPriceMostLiquidLessVolatileOTCAlwaysQuoted( ! tickersGroupId , temporizedGroup , ! maxNumberOfEligiblesToBeChosen , ! maxNumberOfMostLiquidTickersToBeChosen , ! numDaysForAverageRawOpenPriceComputation , ! numDaysForVolatility , ! minPrice , maxPrice ); // IEligiblesSelector eligiblesSelector = // new ByPriceMostLiquidAlwaysQuoted( *************** *** 106,112 **** // numDaysForAverageRawOpenPriceComputation , // minPrice , maxPrice ); ! // eligiblesSelector = // new DummyEligibleSelector(); ! // return eligiblesSelector; } --- 106,112 ---- // numDaysForAverageRawOpenPriceComputation , // minPrice , maxPrice ); ! // eligiblesSelector = // new DummyEligibleSelector(); ! // return eligiblesSelector; } *************** *** 134,145 **** //correlation is computed only for returns //between minimum and maximum ! // IInSampleChooser inSampleChooser = ! // new PVO_OTCCorrelationChooser(numberOfBestTestingPositionsToBeReturned, // maxCorrelationAllowed , balancedWeightsOnVolatilityBase, // minimumAbsoluteReturnValue , maximumAbsoluteReturnValue, this.benchmark.Ticker); ! IInSampleChooser inSampleChooser = ! new PVO_OTCCTOCorrelationChooser(numberOfBestTestingPositionsToBeReturned, ! maxCorrelationAllowed , balancedWeightsOnVolatilityBase, ! minimumAbsoluteReturnValue , maximumAbsoluteReturnValue, this.benchmark.Ticker); // //office // inSampleChooser = --- 134,145 ---- //correlation is computed only for returns //between minimum and maximum ! // IInSampleChooser inSampleChooser = ! // new PVO_OTCCorrelationChooser(numberOfBestTestingPositionsToBeReturned, // maxCorrelationAllowed , balancedWeightsOnVolatilityBase, // minimumAbsoluteReturnValue , maximumAbsoluteReturnValue, this.benchmark.Ticker); ! IInSampleChooser inSampleChooser = ! new PVO_OTCCTOCorrelationChooser(numberOfBestTestingPositionsToBeReturned, ! maxCorrelationAllowed , balancedWeightsOnVolatilityBase, ! minimumAbsoluteReturnValue , maximumAbsoluteReturnValue, this.benchmark.Ticker); // //office // inSampleChooser = *************** *** 171,180 **** // inSampleDays , benchmark , numDaysBetweenEachOptimization , // oversoldThreshold , overboughtThreshold , historicalQuoteProvider); ! // = new PVO_OTCStrategy(eligiblesSelector , ! minNumOfEligiblesForValidOptimization, inSampleChooser , ! inSampleDays , benchmark , numDaysBetweenEachOptimization , ! numOfClosingsBeforeExit, oversoldThreshold , overboughtThreshold , ! oversoldThresholdMAX , overboughtThresholdMAX , historicalQuoteProvider); return strategyForBacktester; } --- 171,180 ---- // inSampleDays , benchmark , numDaysBetweenEachOptimization , // oversoldThreshold , overboughtThreshold , historicalQuoteProvider); ! // = new PVO_OTCStrategy(eligiblesSelector , ! minNumOfEligiblesForValidOptimization, inSampleChooser , ! inSampleDays , benchmark , numDaysBetweenEachOptimization , ! numOfClosingsBeforeExit, oversoldThreshold , overboughtThreshold , ! oversoldThresholdMAX , overboughtThresholdMAX , historicalQuoteProvider); return strategyForBacktester; } *************** *** 198,205 **** EndOfDayStrategyBackTester endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( ! backTestId , this.strategyForBacktester , ! quoteProviderForBackTester , accountProvider , ! firstDateTime , lastDateTime , ! this.benchmark , cashToStart , maxRunningHours ); return endOfDayStrategyBackTester; } --- 198,209 ---- EndOfDayStrategyBackTester endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( ! backTestId , ! new QuantProject.Business.Timing.IndexBasedEndOfDayTimer( ! HistoricalEndOfDayTimer.GetMarketOpen( firstDateTime ) , ! this.benchmark.Ticker ) , ! this.strategyForBacktester , ! quoteProviderForBackTester , accountProvider , ! firstDateTime , lastDateTime , ! this.benchmark , cashToStart , maxRunningHours ); return endOfDayStrategyBackTester; } *************** *** 220,229 **** { string returnValue; ! string fullPathFileNameForMainAtHome = @"C:\Quant\QuantProject\b7_Scripts\TechnicalAnalysisTesting\Oscillators\FixedLevelOscillators\PortfolioValueOscillator\PVO_OTCMain.cs"; if( File.Exists(fullPathFileNameForMainAtHome) ) returnValue = fullPathFileNameForMainAtHome; else ! returnValue = @"C:\Utente\MarcoVarie\Vari\qP\QuantProject\b7_Scripts\TechnicalAnalysisTesting\Oscillators\FixedLevelOscillators\PortfolioValueOscillator\PVO_OTCMain.cs"; --- 224,233 ---- { string returnValue; ! string fullPathFileNameForMainAtHome = @"C:\Quant\QuantProject\b7_Scripts\TechnicalAnalysisTesting\Oscillators\FixedLevelOscillators\PortfolioValueOscillator\PVO_OTCMain.cs"; if( File.Exists(fullPathFileNameForMainAtHome) ) returnValue = fullPathFileNameForMainAtHome; else ! returnValue = @"C:\Utente\MarcoVarie\Vari\qP\QuantProject\b7_Scripts\TechnicalAnalysisTesting\Oscillators\FixedLevelOscillators\PortfolioValueOscillator\PVO_OTCMain.cs"; Index: PVOLogItem.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator/PVOLogItem.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PVOLogItem.cs 29 Sep 2008 21:18:13 -0000 1.5 --- PVOLogItem.cs 12 Nov 2008 20:42:39 -0000 1.6 *************** *** 19,23 **** along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ using System; --- 19,23 ---- along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ using System; *************** *** 40,53 **** namespace QuantProject.Scripts.TechnicalAnalysisTesting.Oscillators.FixedLevelOscillators.PortfolioValueOscillator { ! /// <summary> ! /// LogItem for the PVO strategy ! /// portfolio value oscillator strategy ! /// </summary> ! [Serializable] ! public class PVOLogItem : LogItem ! { protected DummyTesterForTestingPositions[] dummyTestersForBestTestingPositionsInSample; ! protected TestingPositions[] bestPVOPositionsInSample; protected int numberOfEligibleTickers; protected double fitnessOfFirstPVOPositionsInSample; --- 40,53 ---- namespace QuantProject.Scripts.TechnicalAnalysisTesting.Oscillators.FixedLevelOscillators.PortfolioValueOscillator { ! /// <summary> ! /// LogItem for the PVO strategy ! /// portfolio value oscillator strategy ! /// </summary> ! [Serializable] ! public class PVOLogItem : LogItem ! { protected DummyTesterForTestingPositions[] dummyTestersForBestTestingPositionsInSample; ! protected TestingPositions[] bestPVOPositionsInSample; protected int numberOfEligibleTickers; protected double fitnessOfFirstPVOPositionsInSample; *************** *** 67,72 **** if ( this.bestPVOPositionsInSample == null ) throw new Exception( "This property has not " + ! "been assigned yet! If you are loading the LogItem from " + ! "a log, this property was not set before logging the LogItem." ); return this.bestPVOPositionsInSample; } --- 67,72 ---- if ( this.bestPVOPositionsInSample == null ) throw new Exception( "This property has not " + ! "been assigned yet! If you are loading the LogItem from " + ! "a log, this property was not set before logging the LogItem." ); return this.bestPVOPositionsInSample; } *************** *** 79,84 **** if ( this.numberOfEligibleTickers == int.MinValue ) throw new Exception( "This property has not " + ! "been assigned yet! If you are loading the LogItem from " + ! "a log, this property was not set before logging the LogItem." ); return this.numberOfEligibleTickers; } --- 79,84 ---- if ( this.numberOfEligibleTickers == int.MinValue ) throw new Exception( "This property has not " + ! "been assigned yet! If you are loading the LogItem from " + ! "a log, this property was not set before logging the LogItem." ); return this.numberOfEligibleTickers; } *************** *** 91,96 **** if ( this.fitnessOfFirstPVOPositionsInSample == double.MinValue ) throw new Exception( "This property has not " + ! "been assigned yet! If you are loading the LogItem from " + ! "a log, this property was not set before logging the LogItem." ); return this.fitnessOfFirstPVOPositionsInSample; } --- 91,96 ---- if ( this.fitnessOfFirstPVOPositionsInSample == double.MinValue ) throw new Exception( "This property has not " + ! "been assigned yet! If you are loading the LogItem from " + ! "a log, this property was not set before logging the LogItem." ); return this.fitnessOfFirstPVOPositionsInSample; } *************** *** 103,108 **** if ( this.fitnessOfLastPVOPositionsInSample == double.MinValue ) throw new Exception( "This property has not " + ! "been assigned yet! If you are loading the LogItem from " + ! "a log, this property was not set before logging the LogItem." ); return this.fitnessOfLastPVOPositionsInSample; } --- 103,108 ---- if ( this.fitnessOfLastPVOPositionsInSample == double.MinValue ) throw new Exception( "This property has not " + ! "been assigned yet! If you are loading the LogItem from " + ! "a log, this property was not set before logging the LogItem." ); return this.fitnessOfLastPVOPositionsInSample; } *************** *** 168,178 **** double minimumAcceptableGain = 0.007; HistoricalMarketValueProvider historicalQuoteProviderForBackTester, ! historicalQuoteProviderForInSampleChooser, ! historicalQuoteProviderForStrategy; historicalQuoteProviderForBackTester = new HistoricalAdjustedQuoteProvider(); historicalQuoteProviderForInSampleChooser = historicalQuoteProviderForBackTester; historicalQuoteProviderForStrategy = historicalQuoteProviderForInSampleChooser; ! IEligiblesSelector eligiblesSelector = new DummyEligibleSelector(); --- 168,178 ---- double minimumAcceptableGain = 0.007; HistoricalMarketValueProvider historicalQuoteProviderForBackTester, ! historicalQuoteProviderForInSampleChooser, ! historicalQuoteProviderForStrategy; historicalQuoteProviderForBackTester = new HistoricalAdjustedQuoteProvider(); historicalQuoteProviderForInSampleChooser = historicalQuoteProviderForBackTester; historicalQuoteProviderForStrategy = historicalQuoteProviderForInSampleChooser; ! IEligiblesSelector eligiblesSelector = new DummyEligibleSelector(); *************** *** 182,209 **** TestingPositions[] positionsToTest = //new TestingPositions[1]; ! // int idx = PVOLogItem.rand.Next(bestPVOPositionsInSample.Length); ! //positionsToTest[0] = this.bestPVOPositionsInSample[0]; ! positionsToTest = this.BestPVOPositionsInSample; PVOStrategy strategy = new PVOStrategy(eligiblesSelector, ! positionsToTest, this.numberOfInSampleDays, ! numDaysForOscillatingPeriodForOutOfSample, ! numberOfPortfolioPositions , benchmark , ! int.MaxValue , ! ((PVOPositions)positionsToTest[0]).OversoldThreshold, ! ((PVOPositions)positionsToTest[0]).OverboughtThreshold, ! historicalQuoteProviderForStrategy , ! maxAcceptableCloseToCloseDrawdown , minimumAcceptableGain ); EndOfDayStrategyBackTester endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( ! "PVO" , strategy , ! historicalQuoteProviderForBackTester , ! new SimpleAccountProvider(), firstDateTime , ! lastDateTime , benchmark , cashToStart , maxRunningHours ); endOfDayStrategyBackTester.Run(); BackTesterReportViewer.ShowReport( lastDateTime , ! endOfDayStrategyBackTester ); } --- 182,213 ---- TestingPositions[] positionsToTest = //new TestingPositions[1]; ! // int idx = PVOLogItem.rand.Next(bestPVOPositionsInSample.Length); ! //positionsToTest[0] = this.bestPVOPositionsInSample[0]; ! positionsToTest = this.BestPVOPositionsInSample; PVOStrategy strategy = new PVOStrategy(eligiblesSelector, ! positionsToTest, this.numberOfInSampleDays, ! numDaysForOscillatingPeriodForOutOfSample, ! numberOfPortfolioPositions , benchmark , ! int.MaxValue , ! ((PVOPositions)positionsToTest[0]).OversoldThreshold, ! ((PVOPositions)positionsToTest[0]).OverboughtThreshold, ! historicalQuoteProviderForStrategy , ! maxAcceptableCloseToCloseDrawdown , minimumAcceptableGain ); EndOfDayStrategyBackTester endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( ! "PVO" , ! new QuantProject.Business.Timing.IndexBasedEndOfDayTimer( ! HistoricalEndOfDayTimer.GetMarketOpen( firstDateTime ) , ! benchmark.Ticker ) , ! strategy , ! historicalQuoteProviderForBackTester , ! new SimpleAccountProvider(), firstDateTime , ! lastDateTime , benchmark , cashToStart , maxRunningHours ); endOfDayStrategyBackTester.Run(); BackTesterReportViewer.ShowReport( lastDateTime , ! endOfDayStrategyBackTester ); } *************** *** 219,223 **** simulatedCreationDateTime ); } ! private void showTestingPositionsClickEventHandler_setDummyTesters() { --- 223,227 ---- simulatedCreationDateTime ); } ! private void showTestingPositionsClickEventHandler_setDummyTesters() { *************** *** 245,251 **** menuItems[0] = new MenuItem("Run Strategy"); menuItems[1] = new MenuItem("Show TestingPositions"); ! menuItems[0].Click += new System.EventHandler(this.runStrategyClickEventHandler); ! menuItems[1].Click += new System.EventHandler(this.showTestingPositionsClickEventHandler); ContextMenu contextMenu = new ContextMenu(menuItems); --- 249,255 ---- menuItems[0] = new MenuItem("Run Strategy"); menuItems[1] = new MenuItem("Show TestingPositions"); ! menuItems[0].Click += new System.EventHandler(this.runStrategyClickEventHandler); ! menuItems[1].Click += new System.EventHandler(this.showTestingPositionsClickEventHandler); ContextMenu contextMenu = new ContextMenu(menuItems); Index: PVOMain.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator/PVOMain.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PVOMain.cs 29 Sep 2008 21:18:13 -0000 1.7 --- PVOMain.cs 12 Nov 2008 20:42:39 -0000 1.8 *************** *** 19,23 **** along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ using System; --- 19,23 ---- along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ using System; *************** *** 76,80 **** int maxNumberOfEligiblesToBeChosen = 100; ! string tickersGroupId = "SP500"; --- 76,80 ---- int maxNumberOfEligiblesToBeChosen = 100; ! string tickersGroupId = "SP500"; *************** *** 88,97 **** IEligiblesSelector eligiblesSelector = new ByPriceMostLiquidLessVolatileCTCAlwaysQuoted( ! tickersGroupId , temporizedGroup , ! maxNumberOfEligiblesToBeChosen , ! maxNumberOfMostLiquidTickersToBeChosen , ! numDaysForAverageRawOpenPriceComputation , ! numDaysForVolatility , ! minPrice , maxPrice ); // IEligiblesSelector eligiblesSelector = // new ByPriceMostLiquidAlwaysQuoted( --- 88,97 ---- IEligiblesSelector eligiblesSelector = new ByPriceMostLiquidLessVolatileCTCAlwaysQuoted( ! tickersGroupId , temporizedGroup , ! maxNumberOfEligiblesToBeChosen , ! maxNumberOfMostLiquidTickersToBeChosen , ! numDaysForAverageRawOpenPriceComputation , ! numDaysForVolatility , ! minPrice , maxPrice ); // IEligiblesSelector eligiblesSelector = // new ByPriceMostLiquidAlwaysQuoted( *************** *** 106,112 **** // numDaysForAverageRawOpenPriceComputation , // minPrice , maxPrice ); ! eligiblesSelector = new DummyEligibleSelector(); ! // return eligiblesSelector; } --- 106,112 ---- // numDaysForAverageRawOpenPriceComputation , // minPrice , maxPrice ); ! eligiblesSelector = new DummyEligibleSelector(); ! // return eligiblesSelector; } *************** *** 135,147 **** //correlation is computed only for returns //between minimum and maximum ! IInSampleChooser inSampleChooser = ! // new PVO_CTCCorrelationChooser(numberOfBestTestingPositionsToBeReturned, // closeToCloseIntervalLengthForCorrelation , maxCorrelationAllowed , balancedWeightsOnVolatilityBase, // minimumAbsoluteReturnValue , maximumAbsoluteReturnValue, this.benchmark.Ticker ); ! new PVO_CTCStrongCorrelationChooser(numberOfBestTestingPositionsToBeReturned, ! maxCorrelationAllowed , minimumAbsoluteReturnValue , maximumAbsoluteReturnValue, ! balancedWeightsOnVolatilityBase, this.benchmark.Ticker ); ! // IInSampleChooser inSampleChooser = ! // new PVO_OTCCTOCorrelationChooser(numberOfBestTestingPositionsToBeReturned, // maxCorrelationAllowed , balancedWeightsOnVolatilityBase, // minimumAbsoluteReturnValue , maximumAbsoluteReturnValue); --- 135,147 ---- //correlation is computed only for returns //between minimum and maximum ! IInSampleChooser inSampleChooser = ! // new PVO_CTCCorrelationChooser(numberOfBestTestingPositionsToBeReturned, // closeToCloseIntervalLengthForCorrelation , maxCorrelationAllowed , balancedWeightsOnVolatilityBase, // minimumAbsoluteReturnValue , maximumAbsoluteReturnValue, this.benchmark.Ticker ); ! new PVO_CTCStrongCorrelationChooser(numberOfBestTestingPositionsToBeReturned, ! maxCorrelationAllowed , minimumAbsoluteReturnValue , maximumAbsoluteReturnValue, ! balancedWeightsOnVolatilityBase, this.benchmark.Ticker ); ! // IInSampleChooser inSampleChooser = ! // new PVO_OTCCTOCorrelationChooser(numberOfBestTestingPositionsToBeReturned, // maxCorrelationAllowed , balancedWeightsOnVolatilityBase, // minimumAbsoluteReturnValue , maximumAbsoluteReturnValue); *************** *** 152,159 **** // numberOfBestTestingPositionsToBeReturned); //home ! inSampleChooser = ! new PVOChooserFromSavedBackTestLog( ! @"C:\Utente\MarcoVarie\Vari\qP\LogArchive\2008_06_03_18_33_29_PVO_CTC_from_2001_01_01_to_2004_12_31_annlRtrn_4.72_maxDD_13.57\2008_06_03_18_33_29_PVO_CTC_from_2001_01_01_to_2004_12_31_annlRtrn_4.72_maxDD_13.57.qpL", ! numberOfBestTestingPositionsToBeReturned); return inSampleChooser; } --- 152,159 ---- // numberOfBestTestingPositionsToBeReturned); //home ! inSampleChooser = ! new PVOChooserFromSavedBackTestLog( ! @"C:\Utente\MarcoVarie\Vari\qP\LogArchive\2008_06_03_18_33_29_PVO_CTC_from_2001_01_01_to_2004_12_31_annlRtrn_4.72_maxDD_13.57\2008_06_03_18_33_29_PVO_CTC_from_2001_01_01_to_2004_12_31_annlRtrn_4.72_maxDD_13.57.qpL", ! numberOfBestTestingPositionsToBeReturned); return inSampleChooser; } *************** *** 176,185 **** // inSampleDays , benchmark , numDaysBetweenEachOptimization , // oversoldThreshold , overboughtThreshold , historicalQuoteProvider); ! // = new PVOStrategy(eligiblesSelector , inSampleChooser , ! inSampleDays , closeToCloseIntervalLength , 2 , benchmark , numDaysBetweenEachOptimization , ! oversoldThreshold , overboughtThreshold , ! oversoldThresholdMAX , overboughtThresholdMAX , historicalQuoteProvider, ! maxAcceptableDrawDown, minimumAcceptableGain ); return strategyForBacktester; } --- 176,185 ---- // inSampleDays , benchmark , numDaysBetweenEachOptimization , // oversoldThreshold , overboughtThreshold , historicalQuoteProvider); ! // = new PVOStrategy(eligiblesSelector , inSampleChooser , ! inSampleDays , closeToCloseIntervalLength , 2 , benchmark , numDaysBetweenEachOptimization , ! oversoldThreshold , overboughtThreshold , ! oversoldThresholdMAX , overboughtThresholdMAX , historicalQuoteProvider, ! maxAcceptableDrawDown, minimumAcceptableGain ); return strategyForBacktester; } *************** *** 203,210 **** EndOfDayStrategyBackTester endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( ! backTestId , this.strategyForBacktester , ! quoteProviderForBackTester , accountProvider , ! firstDateTime , lastDateTime , ! this.benchmark , cashToStart , maxRunningHours ); return endOfDayStrategyBackTester; } --- 203,214 ---- EndOfDayStrategyBackTester endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( ! backTestId , ! new QuantProject.Business.Timing.IndexBasedEndOfDayTimer( ! HistoricalEndOfDayTimer.GetMarketOpen( firstDateTime ) , ! this.benchmark.Ticker ) , ! this.strategyForBacktester , ! quoteProviderForBackTester , accountProvider , ! firstDateTime , lastDateTime , ! this.benchmark , cashToStart , maxRunningHours ); return endOfDayStrategyBackTester; } *************** *** 225,234 **** { string returnValue; ! string fullPathFileNameForMainAtHome = @"C:\Quant\QuantProject\b7_Scripts\TechnicalAnalysisTesting\Oscillators\FixedLevelOscillators\PortfolioValueOscillator\PVOMain.cs"; if( File.Exists(fullPathFileNameForMainAtHome) ) returnValue = fullPathFileNameForMainAtHome; else ! returnValue = @"C:\Utente\MarcoVarie\Vari\qP\QuantProject\b7_Scripts\TechnicalAnalysisTesting\Oscillators\FixedLevelOscillators\PortfolioValueOscillator\PVOMain.cs"; --- 229,238 ---- { string returnValue; ! string fullPathFileNameForMainAtHome = @"C:\Quant\QuantProject\b7_Scripts\TechnicalAnalysisTesting\Oscillators\FixedLevelOscillators\PortfolioValueOscillator\PVOMain.cs"; if( File.Exists(fullPathFileNameForMainAtHome) ) returnValue = fullPathFileNameForMainAtHome; else ! returnValue = @"C:\Utente\MarcoVarie\Vari\qP\QuantProject\b7_Scripts\TechnicalAnalysisTesting\Oscillators\FixedLevelOscillators\PortfolioValueOscillator\PVOMain.cs"; Index: PVO_CTOLogItem.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator/PVO_CTOLogItem.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PVO_CTOLogItem.cs 29 Sep 2008 21:17:47 -0000 1.2 --- PVO_CTOLogItem.cs 12 Nov 2008 20:42:39 -0000 1.3 *************** *** 95,99 **** EndOfDayStrategyBackTester endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( ! "PVO_CTO" , strategy , historicalQuoteProviderForBackTester , new SimpleAccountProvider(), --- 95,103 ---- EndOfDayStrategyBackTester endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( ! "PVO_CTO" , ! new QuantProject.Business.Timing.IndexBasedEndOfDayTimer( ! HistoricalEndOfDayTimer.GetMarketOpen( firstDateTime ) , ! benchmark.Ticker ) , ! strategy , historicalQuoteProviderForBackTester , new SimpleAccountProvider(), Index: PVO_CTOMain.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TechnicalAnalysisTesting/Oscillators/FixedLevelOscillators/PortfolioValueOscillator/PVO_CTOMain.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PVO_CTOMain.cs 29 Sep 2008 21:17:48 -0000 1.3 --- PVO_CTOMain.cs 12 Nov 2008 20:42:39 -0000 1.4 *************** *** 216,220 **** EndOfDayStrategyBackTester endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( ! backTestId , this.strategyForBacktester , quoteProviderForBackTester , accountProvider , firstDateTime , lastDateTime , --- 216,224 ---- EndOfDayStrategyBackTester endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( ! backTestId , ! new QuantProject.Business.Timing.IndexBasedEndOfDayTimer( ! HistoricalEndOfDayTimer.GetMarketOpen( firstDateTime ) , ! this.benchmark.Ticker ) , ! this.strategyForBacktester , quoteProviderForBackTester , accountProvider , firstDateTime , lastDateTime , |