[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/LinearCombination/WalkForwardTe
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2005-12-27 15:43:23
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/LinearCombination/WalkForwardTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11770/b7_Scripts/WalkForwardTesting/LinearCombination/WalkForwardTest Modified Files: RunWalkForwardLinearCombination.cs Log Message: maxRunningHours has been added to the constructor Index: RunWalkForwardLinearCombination.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/LinearCombination/WalkForwardTest/RunWalkForwardLinearCombination.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RunWalkForwardLinearCombination.cs 11 Dec 2005 18:06:52 -0000 1.3 --- RunWalkForwardLinearCombination.cs 27 Dec 2005 15:43:14 -0000 1.4 *************** *** 56,59 **** --- 56,60 ---- private bool openToCloseDaily; + private DateTime deadlineForScript; private IHistoricalQuoteProvider historicalQuoteProvider; *************** *** 70,74 **** DateTime firstDate, DateTime lastDate, double targetReturn, PortfolioType portfolioType , ! bool openToCloseDaily ) { this.tickerGroupID = tickerGroupID; --- 71,76 ---- DateTime firstDate, DateTime lastDate, double targetReturn, PortfolioType portfolioType , ! bool openToCloseDaily , ! double maxRunningHours ) { this.tickerGroupID = tickerGroupID; *************** *** 87,90 **** --- 89,93 ---- this.portfolioType = portfolioType; this.openToCloseDaily = openToCloseDaily; + this.deadlineForScript = DateTime.Now.AddHours( maxRunningHours ); } *************** *** 92,97 **** EndOfDayTimingEventArgs endOfDayTimingEventArgs ) { ! if ( this.account.EndOfDayTimer.GetCurrentTime().DateTime >= ! this.lastDate ) this.account.EndOfDayTimer.Stop(); } --- 95,101 ---- EndOfDayTimingEventArgs endOfDayTimingEventArgs ) { ! if ( ( this.account.EndOfDayTimer.GetCurrentTime().DateTime >= ! this.lastDate ) || ! ( DateTime.Now > this.deadlineForScript ) ) this.account.EndOfDayTimer.Stop(); } *************** *** 125,129 **** new IndexBasedEndOfDayTimer( new EndOfDayDateTime( this.firstDate , ! EndOfDaySpecificTime.MarketOpen ) , "DYN" ); run_setHistoricalQuoteProvider(); this.account = new Account( "LinearCombination" , historicalEndOfDayTimer , --- 129,133 ---- new IndexBasedEndOfDayTimer( new EndOfDayDateTime( this.firstDate , ! EndOfDaySpecificTime.MarketOpen ) , "MSFT" ); run_setHistoricalQuoteProvider(); this.account = new Account( "LinearCombination" , historicalEndOfDayTimer , |