[Quantproject-developers] QuantProject/b3_Data/Selectors SelectionType.cs,1.3,1.4 TickerSelector.cs,
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2004-08-02 23:19:11
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/Selectors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27950/b3_Data/Selectors Modified Files: SelectionType.cs TickerSelector.cs Log Message: Added new selection types (Volatility and AverageCloseToClosePerformance) to the TickerSelector class. Updated the classes (Quotes, both in DataAccess and Data) that provide these selections. Index: SelectionType.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/Selectors/SelectionType.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SelectionType.cs 25 Jul 2004 12:10:02 -0000 1.3 --- SelectionType.cs 2 Aug 2004 23:19:02 -0000 1.4 *************** *** 26,36 **** { /// <summary> ! /// Enum for SelectionRule class /// </summary> public enum SelectionType { Liquidity, ! Performance/* ! Volatility, StatisticalCorrelation*/ } --- 26,37 ---- { /// <summary> ! /// Enum for TickerSelector class /// </summary> public enum SelectionType { Liquidity, ! Performance, ! AverageCloseToClosePerformance, ! Volatility/* StatisticalCorrelation*/ } Index: TickerSelector.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/Selectors/TickerSelector.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TickerSelector.cs 25 Jul 2004 12:10:02 -0000 1.5 --- TickerSelector.cs 2 Aug 2004 23:19:02 -0000 1.6 *************** *** 140,143 **** --- 140,147 ---- case SelectionType.Performance: return this.getTickersByPerformance(); + case SelectionType.Volatility: + return this.getTickersByVolatility(); + case SelectionType.AverageCloseToClosePerformance: + return this.getTickersByAverageCloseToClosePerformance(); //this line should never be reached! default: *************** *** 181,184 **** --- 185,221 ---- } + private DataTable getTickersByAverageCloseToClosePerformance() + { + if(this.setOfTickersToBeSelected == null) + return QuantProject.DataAccess.Tables.Quotes.GetTickersByAverageCloseToClosePerformance(this.isOrderedInASCMode, + this.groupID, this.firstQuoteDate, + this.lastQuoteDate, + this.maxNumOfReturnedTickers); + else + return QuantProject.Data.DataTables.Quotes.GetTickersByAverageCloseToClosePerformance(this.isOrderedInASCMode, + this.setOfTickersToBeSelected, + this.firstQuoteDate, + this.lastQuoteDate, + this.maxNumOfReturnedTickers); + + } + + private DataTable getTickersByVolatility() + { + if(this.setOfTickersToBeSelected == null) + return QuantProject.DataAccess.Tables.Quotes.GetTickersByVolatility(this.isOrderedInASCMode, + this.groupID, + this.firstQuoteDate, + this.lastQuoteDate, + this.maxNumOfReturnedTickers); + + else + return QuantProject.Data.DataTables.Quotes.GetTickersByVolatility(this.isOrderedInASCMode, + this.setOfTickersToBeSelected, + this.firstQuoteDate, + this.lastQuoteDate, + this.maxNumOfReturnedTickers); + } + public void SelectAllTickers() { |