[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank ChosenTicker
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2004-12-20 00:24:30
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30566/b7_Scripts/WalkForwardTesting/WalkForwardOneRank Modified Files: ChosenTickers.cs Log Message: Bug fixed: better use for SortedList now (ComparableAccount is used as IComparer) Index: ChosenTickers.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank/ChosenTickers.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ChosenTickers.cs 29 Nov 2004 14:29:52 -0000 1.1 --- ChosenTickers.cs 20 Dec 2004 00:24:21 -0000 1.2 *************** *** 41,48 **** SortedList sortedList = new SortedList(); foreach ( string ticker in bestPerformingTickers.Keys ) ! sortedList.Add( ( ( ComparableAccount )bestPerformingTickers[ ticker ]).Goodness , ! ticker ); for ( int n=0; n<=this.numberTickersToBeChosen ; n++ ) ! this.Add( sortedList.GetByIndex( n ) , 1 ); } /// <summary> --- 41,50 ---- SortedList sortedList = new SortedList(); foreach ( string ticker in bestPerformingTickers.Keys ) ! sortedList.Add( ticker , ( ( ComparableAccount )bestPerformingTickers[ ticker ]).Goodness ); for ( int n=0; n<=this.numberTickersToBeChosen ; n++ ) ! { ! string key = (string)sortedList.GetKey( n ); ! this.Add( key , key ); ! } } /// <summary> |