[Quantproject-developers] QuantProject/b7_Scripts/TickerSelectionTesting/SimpleSelection BestTickers
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2005-10-21 22:16:57
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/SimpleSelection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10523/b7_Scripts/TickerSelectionTesting/SimpleSelection Modified Files: BestTickersScreener.cs Log Message: Fixed bug. Index: BestTickersScreener.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/SimpleSelection/BestTickersScreener.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BestTickersScreener.cs 21 Oct 2005 17:54:11 -0000 1.1 --- BestTickersScreener.cs 21 Oct 2005 22:16:50 -0000 1.2 *************** *** 133,149 **** int numOfTickers = this.setOfCandidates.Length; this.setSetOfCandidates(true); ! for(int i = 0; i<numOfTickers; i++) allTickersShortOrLong[i] = new CandidateProperties(this.setOfCandidates[i].Ticker, ! this.setOfCandidates[i].ArrayOfRatesOfReturn); this.setSetOfCandidates(false); ! for(int i = numOfTickers; i<numOfTickers*2; i++) ! allTickersShortOrLong[i] = ! new CandidateProperties("-" + this.setOfCandidates[i].Ticker, ! this.setOfCandidates[i].ArrayOfRatesOfReturn); Array.Sort(allTickersShortOrLong); ! for(int i = 0; i<returnValue.Length; i++) ! returnValue[i] = allTickersShortOrLong[i].Ticker; } --- 133,155 ---- int numOfTickers = this.setOfCandidates.Length; this.setSetOfCandidates(true); ! int i = 0; ! for(; i<numOfTickers; i++) allTickersShortOrLong[i] = new CandidateProperties(this.setOfCandidates[i].Ticker, ! this.setOfCandidates[i].ArrayOfRatesOfReturn, ! this.setOfCandidates[i].Fitness); this.setSetOfCandidates(false); ! for(int j = 0; j<numOfTickers; j++) ! { ! allTickersShortOrLong[i] = ! new CandidateProperties("-" + this.setOfCandidates[j].Ticker, ! this.setOfCandidates[j].ArrayOfRatesOfReturn, ! this.setOfCandidates[j].Fitness); ! i++; ! } Array.Sort(allTickersShortOrLong); ! for(int t = 0; t<returnValue.Length; t++) ! returnValue[t] = allTickersShortOrLong[t].Ticker; } |