[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/PairsTrading/Strategies Pairs
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2008-09-29 21:21:51
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/PairsTrading/Strategies In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18913/Strategies Modified Files: PairsTradingStrategy.cs Log Message: The new revision moves toward an intraday enabled framework. EndOfDayDate time has been removed, DateTime is used now. The code has been changed accordingly. Index: PairsTradingStrategy.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/PairsTrading/Strategies/PairsTradingStrategy.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PairsTradingStrategy.cs 17 May 2008 18:06:22 -0000 1.4 --- PairsTradingStrategy.cs 29 Sep 2008 21:21:35 -0000 1.5 *************** *** 40,47 **** /// Pairs Trading strategy with in sample optimizations /// </summary> public class PairsTradingStrategy : SymmetricEndOfDayStrategyForBacktester { ! private IHistoricalQuoteProvider ! historicalQuoteProviderForChosingPositionsOutOfSample; private OutOfSampleChooser outOfSampleChooser; --- 40,48 ---- /// Pairs Trading strategy with in sample optimizations /// </summary> + [Serializable] public class PairsTradingStrategy : SymmetricEndOfDayStrategyForBacktester { ! private HistoricalMarketValueProvider ! historicalMarketValueProviderForChosingPositionsOutOfSample; private OutOfSampleChooser outOfSampleChooser; *************** *** 53,59 **** IEligiblesSelector eligiblesSelector , IInSampleChooser inSampleChooser , ! IHistoricalQuoteProvider historicalQuoteProviderForInSample , ! IHistoricalQuoteProvider ! historicalQuoteProviderForChosingPositionsOutOfSample , OutOfSampleChooser outOfSampleChooser ) : base( --- 54,60 ---- IEligiblesSelector eligiblesSelector , IInSampleChooser inSampleChooser , ! HistoricalMarketValueProvider historicalMarketValueProviderForInSample , ! HistoricalMarketValueProvider ! historicalMarketValueProviderForChosingPositionsOutOfSample , OutOfSampleChooser outOfSampleChooser ) : base( *************** *** 64,71 **** eligiblesSelector , inSampleChooser , ! historicalQuoteProviderForInSample ) { ! this.historicalQuoteProviderForChosingPositionsOutOfSample = ! historicalQuoteProviderForChosingPositionsOutOfSample; this.outOfSampleChooser = outOfSampleChooser; } --- 65,72 ---- eligiblesSelector , inSampleChooser , ! historicalMarketValueProviderForInSample ) { ! this.historicalMarketValueProviderForChosingPositionsOutOfSample = ! historicalMarketValueProviderForChosingPositionsOutOfSample; this.outOfSampleChooser = outOfSampleChooser; } *************** *** 94,98 **** ReturnInterval secondLastReturnInterval = this.getSecondLastReturnInterval(); ! areToBeClosed = this.now().IsEqualTo( secondLastReturnInterval.End ); } return ( areToBeClosed ); --- 95,99 ---- ReturnInterval secondLastReturnInterval = this.getSecondLastReturnInterval(); ! areToBeClosed = ( this.now() == secondLastReturnInterval.End ); } return ( areToBeClosed ); *************** *** 103,108 **** { bool beginsTheLastInterval = ! ( this.now().IsEqualTo( ! this.lastIntervalAppended().Begin ) ); return ( beginsTheLastInterval ); } --- 104,109 ---- { bool beginsTheLastInterval = ! ( this.now() == ! this.lastIntervalAppended().Begin ); return ( beginsTheLastInterval ); } *************** *** 114,118 **** this.bestTestingPositionsInSample , this.returnIntervals , ! this.historicalQuoteProviderForChosingPositionsOutOfSample , this.inSampleReturnsManager ); return weightedPositions; --- 115,119 ---- this.bestTestingPositionsInSample , this.returnIntervals , ! this.historicalMarketValueProviderForChosingPositionsOutOfSample , this.inSampleReturnsManager ); return weightedPositions; |