[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/FixedLengthTwoPhases/Logging
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2008-09-29 21:20:34
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/FixedLengthTwoPhases/Logging In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18157/Logging Modified Files: TesterForFLTPTestingPositions.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: TesterForFLTPTestingPositions.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/FixedLengthTwoPhases/Logging/TesterForFLTPTestingPositions.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TesterForFLTPTestingPositions.cs 16 Aug 2008 19:18:52 -0000 1.1 --- TesterForFLTPTestingPositions.cs 29 Sep 2008 21:20:14 -0000 1.2 *************** *** 46,50 **** private FLTPTestingPositions testingPositions; private int numberOfInSampleDays; ! private EndOfDayDateTime endOfDayDateTimeWhenThisObjectWasLogged; /// <summary> --- 46,50 ---- private FLTPTestingPositions testingPositions; private int numberOfInSampleDays; ! private DateTime dateTimeWhenThisObjectWasLogged; /// <summary> *************** *** 75,79 **** TestingPositions testingPositions , int numberOfInSampleDays , ! EndOfDayDateTime endOfDayDateTimeWhenThisObjectWasLogged ) { this.checkParameters( testingPositions ); --- 75,79 ---- TestingPositions testingPositions , int numberOfInSampleDays , ! DateTime dateTimeWhenThisObjectWasLogged ) { this.checkParameters( testingPositions ); *************** *** 81,86 **** (FLTPTestingPositions)testingPositions; this.numberOfInSampleDays = numberOfInSampleDays; ! this.endOfDayDateTimeWhenThisObjectWasLogged = ! endOfDayDateTimeWhenThisObjectWasLogged; } private void checkParameters( TestingPositions testingPositions ) --- 81,86 ---- (FLTPTestingPositions)testingPositions; this.numberOfInSampleDays = numberOfInSampleDays; ! this.dateTimeWhenThisObjectWasLogged = ! dateTimeWhenThisObjectWasLogged; } private void checkParameters( TestingPositions testingPositions ) *************** *** 96,100 **** WeightedPositions weightedPositions , IIntervalsSelector intervalsSelector , ! IHistoricalQuoteProvider historicalQuoteProvider , Benchmark benchmark , double cashToStart ) --- 96,100 ---- WeightedPositions weightedPositions , IIntervalsSelector intervalsSelector , ! HistoricalMarketValueProvider HistoricalMarketValueProvider , Benchmark benchmark , double cashToStart ) *************** *** 102,119 **** FLTPSimpleStrategy fLTPSimpleStrategy = new FLTPSimpleStrategy( weightedPositions , ! intervalsSelector , historicalQuoteProvider ); IAccountProvider accountProvider = new SimpleAccountProvider(); DateTime firstDateTime = ! this.endOfDayDateTimeWhenThisObjectWasLogged.DateTime.AddDays( - this.numberOfInSampleDays ); DateTime lastDateTime = ! this.endOfDayDateTimeWhenThisObjectWasLogged.DateTime; double maxRunningHours = 0.3; EndOfDayStrategyBackTester endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( "SimpleFLTP" , fLTPSimpleStrategy , ! historicalQuoteProvider , accountProvider , firstDateTime , lastDateTime , benchmark , cashToStart , maxRunningHours ); --- 102,119 ---- FLTPSimpleStrategy fLTPSimpleStrategy = new FLTPSimpleStrategy( weightedPositions , ! intervalsSelector , HistoricalMarketValueProvider ); IAccountProvider accountProvider = new SimpleAccountProvider(); DateTime firstDateTime = ! this.dateTimeWhenThisObjectWasLogged.AddDays( - this.numberOfInSampleDays ); DateTime lastDateTime = ! this.dateTimeWhenThisObjectWasLogged; double maxRunningHours = 0.3; EndOfDayStrategyBackTester endOfDayStrategyBackTester = new EndOfDayStrategyBackTester( "SimpleFLTP" , fLTPSimpleStrategy , ! HistoricalMarketValueProvider , accountProvider , firstDateTime , lastDateTime , benchmark , cashToStart , maxRunningHours ); *************** *** 150,154 **** Benchmark benchmark = new Benchmark( "MSFT" ); ! IHistoricalQuoteProvider historicalQuoteProvider = new HistoricalAdjustedQuoteProvider(); --- 150,154 ---- Benchmark benchmark = new Benchmark( "MSFT" ); ! HistoricalMarketValueProvider historicalMarketValueProvider = new HistoricalAdjustedQuoteProvider(); *************** *** 171,175 **** AccountReport accountReport = this.getAccountReport( weightedPositions , intervalsSelector , ! historicalQuoteProvider , benchmark , 30000 ); --- 171,175 ---- AccountReport accountReport = this.getAccountReport( weightedPositions , intervalsSelector , ! historicalMarketValueProvider , benchmark , 30000 ); |