[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank BestPerformi
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2005-06-07 15:19:09
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25264/b7_Scripts/WalkForwardTesting/WalkForwardOneRank Modified Files: BestPerformingTickers.cs Log Message: Best performing tickers are properly computed now: EstimatedObject(s) are used, instead of SortedList. Index: BestPerformingTickers.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank/BestPerformingTickers.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** BestPerformingTickers.cs 30 May 2005 18:32:35 -0000 1.9 --- BestPerformingTickers.cs 7 Jun 2005 15:18:56 -0000 1.10 *************** *** 49,53 **** private ArrayList eligibleAccounts; ! private SortedList tickersWithGoodness; private DateTime lastUpdate; --- 49,53 ---- private ArrayList eligibleAccounts; ! private ArrayList tickersWithGoodness; private DateTime lastUpdate; *************** *** 64,68 **** this.numberDaysForPerformanceCalculation = numberDaysForPerformanceCalculation; this.eligibleAccounts = new ArrayList(); ! this.tickersWithGoodness = new SortedList(); } --- 64,68 ---- this.numberDaysForPerformanceCalculation = numberDaysForPerformanceCalculation; this.eligibleAccounts = new ArrayList(); ! this.tickersWithGoodness = new ArrayList(); } *************** *** 127,131 **** this.historicalQuoteProvider ) ); OneRank oneRank = new OneRank( account , dateTime ); ! this.tickersWithGoodness.Add( account.Key , account.Goodness ); } private void setTickers_build( EligibleTickers eligibleTickers , DateTime dateTime ) --- 127,131 ---- this.historicalQuoteProvider ) ); OneRank oneRank = new OneRank( account , dateTime ); ! this.tickersWithGoodness.Add( new EstimatedObject( account.Key , account.Goodness ) ); } private void setTickers_build( EligibleTickers eligibleTickers , DateTime dateTime ) *************** *** 151,159 **** } } for ( int index=this.tickersWithGoodness.Count - 1 ; index >= this.tickersWithGoodness.Count - this.numberBestPerformingTickers ; index-- ) { ! this.Add( this.tickersWithGoodness.GetKey( index ) ); } } --- 151,160 ---- } } + this.tickersWithGoodness.Sort(); for ( int index=this.tickersWithGoodness.Count - 1 ; index >= this.tickersWithGoodness.Count - this.numberBestPerformingTickers ; index-- ) { ! this.Add( ((EstimatedObject)this.tickersWithGoodness[ index ]).ObjectToBeEstimated ); } } |