[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/PairsTrading PairsTradingMain
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2008-05-17 18:10:48
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/PairsTrading In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22276/b7_Scripts/WalkForwardTesting/PairsTrading Modified Files: PairsTradingMain.cs Log Message: Some code has been added, to test the CTO strategy Index: PairsTradingMain.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/PairsTrading/PairsTradingMain.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** PairsTradingMain.cs 11 May 2008 19:13:22 -0000 1.15 --- PairsTradingMain.cs 17 May 2008 18:10:41 -0000 1.16 *************** *** 66,73 **** --- 66,79 ---- this.historicalQuoteProviderForInSample = new HistoricalRawQuoteProvider(); + this.historicalQuoteProviderForChosingPositionsOutOfSample = new HistoricalAdjustedQuoteProvider(); + this.historicalQuoteProviderForChosingPositionsOutOfSample = + new HistoricalRawQuoteProvider(); + this.historicalQuoteProviderForTheBacktesterAccount = new HistoricalRawQuoteProvider(); + this.historicalQuoteProviderForTheBacktesterAccount = + new HistoricalAdjustedQuoteProvider(); // definition for the Fitness Evaluator *************** *** 150,154 **** // inSampleChooser = // new PairsTradingChooserFromSavedBackTestLog( ! // @"C:\qpReports\pairsTrading\longOnly\2008_04_27_4_41_53_pairsTrdng2Long_from_2001_01_01_to_2004_12_31_annlRtrn_128.52_maxDD_25.70\2008_04_27_4_41_53_pairsTrdng_from_2001_01_01_to_2004_12_31_annlRtrn_128.52_maxDD_25.70.qpL", // numberOfBestTestingPositionsToBeReturned); --- 156,160 ---- // inSampleChooser = // new PairsTradingChooserFromSavedBackTestLog( ! // @"C:\qpReports\pairsTrading\2008_05_08_23_49_18_pairsTrdng_from_2005_01_01_to_2008_04_30_annlRtrn_90.70_maxDD_5.43\2008_05_08_23_49_18_pairsTrdng_from_2005_01_01_to_2008_04_30_annlRtrn_90.70_maxDD_5.43.qpL", // numberOfBestTestingPositionsToBeReturned); *************** *** 166,171 **** IIntervalsSelector intervalsSelectorForOutOfSample = new OddIntervalsSelector( 1 , 1 , this.benchmark ); IIntervalsSelector intervalsSelectorForInSample = ! intervalsSelectorForOutOfSample; // uncomment the following two statements in order to use an --- 172,180 ---- IIntervalsSelector intervalsSelectorForOutOfSample = new OddIntervalsSelector( 1 , 1 , this.benchmark ); + // uncomment the following statement in order to test a CTO strategy (out of sample) + intervalsSelectorForOutOfSample = + new EvenIntervalsSelector( 1 , 1 , this.benchmark ); IIntervalsSelector intervalsSelectorForInSample = ! new OddIntervalsSelector( 1 , 1 , this.benchmark ); // uncomment the following two statements in order to use an *************** *** 215,220 **** DateTime firstDateTime = new DateTime( 2001 , 1 , 1 ); DateTime lastDateTime = new DateTime( 2008 , 4 , 30 ); ! // uncomment the following line for a faster script // lastDateTime = new DateTime( 2001 , 1 , 31 ); --- 224,232 ---- DateTime firstDateTime = new DateTime( 2001 , 1 , 1 ); + firstDateTime = new DateTime( 2005 , 1 , 1 ); DateTime lastDateTime = new DateTime( 2008 , 4 , 30 ); ! ! // uncomment the following two lines for a faster script ! // firstDateTime = new DateTime( 2001 , 1 , 1 ); // lastDateTime = new DateTime( 2001 , 1 , 31 ); |