[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/PairsTrading PairsTradingMain
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2008-04-01 21:33:11
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/PairsTrading In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv16225/b7_Scripts/WalkForwardTesting/PairsTrading Modified Files: PairsTradingMain.cs Log Message: Three different IHistoricalQuoteProvider are now used (the previous version used just a single IHistoricalQuoteProvider): this.historicalQuoteProviderForInSample this.historicalQuoteProviderForChosingPositionsOutOfSample this.historicalQuoteProviderForTheBacktesterAccount Index: PairsTradingMain.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/PairsTrading/PairsTradingMain.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PairsTradingMain.cs 30 Mar 2008 15:49:07 -0000 1.6 --- PairsTradingMain.cs 1 Apr 2008 21:33:07 -0000 1.7 *************** *** 52,56 **** { private Benchmark benchmark; ! private IHistoricalQuoteProvider historicalQuoteProvider; public PairsTradingMain() --- 52,61 ---- { private Benchmark benchmark; ! private IHistoricalQuoteProvider historicalQuoteProviderForInSample; ! private IHistoricalQuoteProvider ! historicalQuoteProviderForChosingPositionsOutOfSample; ! private IHistoricalQuoteProvider ! historicalQuoteProviderForTheBacktesterAccount; ! public PairsTradingMain() *************** *** 58,63 **** this.benchmark = new Benchmark( "BMC" ); ! this.historicalQuoteProvider = new HistoricalAdjustedQuoteProvider(); // definition for the Fitness Evaluator --- 63,72 ---- this.benchmark = new Benchmark( "BMC" ); ! this.historicalQuoteProviderForInSample = ! new HistoricalRawQuoteProvider(); ! this.historicalQuoteProviderForChosingPositionsOutOfSample = new HistoricalAdjustedQuoteProvider(); + this.historicalQuoteProviderForTheBacktesterAccount = + this.historicalQuoteProviderForInSample; // definition for the Fitness Evaluator *************** *** 103,107 **** this.benchmark , decoderForWeightedPositions , fitnessEvaluator , ! historicalQuoteProvider , crossoverRate , mutationRate , elitismRate , populationSizeForGeneticOptimizer , --- 112,116 ---- this.benchmark , decoderForWeightedPositions , fitnessEvaluator , ! this.historicalQuoteProviderForInSample , crossoverRate , mutationRate , elitismRate , populationSizeForGeneticOptimizer , *************** *** 113,118 **** numberOfBestTestingPositionsToBeReturned , decoderForWeightedPositions , ! fitnessEvaluator , ! historicalQuoteProvider ); } --- 122,126 ---- numberOfBestTestingPositionsToBeReturned , decoderForWeightedPositions , ! fitnessEvaluator ); } *************** *** 129,133 **** new PairsTradingStrategy( 7 , inSampleDays , intervalsSelector , ! eligiblesSelector , inSampleChooser , historicalQuoteProvider , 0.005 , 0.99 , 0.005 , 0.99 ); } --- 137,143 ---- new PairsTradingStrategy( 7 , inSampleDays , intervalsSelector , ! eligiblesSelector , inSampleChooser , ! this.historicalQuoteProviderForInSample , ! this.historicalQuoteProviderForChosingPositionsOutOfSample , 0.005 , 0.99 , 0.005 , 0.99 ); } *************** *** 138,149 **** double cashToStart = 30000; ! DateTime firstDateTime = new DateTime( 2001 , 1 , 1 ); DateTime lastDateTime = new DateTime( 2004 , 12 , 31 ); ! double maxRunningHours = 7; this.endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( backTestId , this.endOfDayStrategy , ! historicalQuoteProvider , accountProvider , firstDateTime , lastDateTime , this.benchmark , cashToStart , maxRunningHours ); --- 148,160 ---- double cashToStart = 30000; ! DateTime firstDateTime = new DateTime( 2001 , 1 , 4 ); DateTime lastDateTime = new DateTime( 2004 , 12 , 31 ); ! double maxRunningHours = 9; this.endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( backTestId , this.endOfDayStrategy , ! this.historicalQuoteProviderForTheBacktesterAccount , ! accountProvider , firstDateTime , lastDateTime , this.benchmark , cashToStart , maxRunningHours ); |