[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag WFLagEligibleT
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2007-02-18 01:34:38
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12505/b7_Scripts/WalkForwardTesting/WalkForwardLag Modified Files: WFLagEligibleTickers.cs Log Message: An exception is rised if a constructor's parameter contains an unexpected value. This approach should be extended to all constructors and methods... Index: WFLagEligibleTickers.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag/WFLagEligibleTickers.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** WFLagEligibleTickers.cs 8 Oct 2006 16:06:32 -0000 1.4 --- WFLagEligibleTickers.cs 18 Feb 2007 01:02:24 -0000 1.5 *************** *** 58,61 **** --- 58,64 ---- IEndOfDayTimer endOfDayTimer ) { + this.checkParametersForWFLagEligibleTickers( tickerGroupID , benchmark , + numberEligibleTickersToBeChosen , numberDaysForPerformanceCalculation , + endOfDayTimer ); this.tickerGroupID = tickerGroupID; this.benchmark = benchmark; *************** *** 65,68 **** --- 68,82 ---- this.eligibleTickers = new DataTable(); } + private void checkParametersForWFLagEligibleTickers( + string tickerGroupID , + string benchmark , + int numberEligibleTickersToBeChosen , + int numberDaysForPerformanceCalculation , + IEndOfDayTimer endOfDayTimer ) + { + if ( numberDaysForPerformanceCalculation <= 0 ) + throw new Exception( "numberDaysForPerformanceCalculation value is " + + numberDaysForPerformanceCalculation + "\nIt must be > 0" ); + } #region setTickers private DataTable setTickers_build_getSelectedTickers() |