quantproject-developers Mailing List for QuantProject (Page 137)
Brought to you by:
glauco_1
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(7) |
Nov
(103) |
Dec
(67) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(52) |
Feb
(9) |
Mar
(69) |
Apr
(53) |
May
(80) |
Jun
(23) |
Jul
(24) |
Aug
(112) |
Sep
(9) |
Oct
|
Nov
(58) |
Dec
(93) |
| 2005 |
Jan
(90) |
Feb
(93) |
Mar
(61) |
Apr
(56) |
May
(37) |
Jun
(61) |
Jul
(55) |
Aug
(68) |
Sep
(25) |
Oct
(46) |
Nov
(41) |
Dec
(37) |
| 2006 |
Jan
(33) |
Feb
(7) |
Mar
(19) |
Apr
(27) |
May
(73) |
Jun
(49) |
Jul
(83) |
Aug
(66) |
Sep
(45) |
Oct
(16) |
Nov
(15) |
Dec
(7) |
| 2007 |
Jan
(14) |
Feb
(33) |
Mar
|
Apr
(21) |
May
|
Jun
(34) |
Jul
(18) |
Aug
(100) |
Sep
(39) |
Oct
(55) |
Nov
(12) |
Dec
(2) |
| 2008 |
Jan
(120) |
Feb
(133) |
Mar
(129) |
Apr
(104) |
May
(42) |
Jun
(2) |
Jul
(52) |
Aug
(99) |
Sep
(134) |
Oct
|
Nov
(137) |
Dec
(48) |
| 2009 |
Jan
(48) |
Feb
(55) |
Mar
(61) |
Apr
(3) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(51) |
Sep
|
Oct
(7) |
Nov
|
Dec
|
| 2010 |
Jan
(7) |
Feb
(1) |
Mar
(145) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(8) |
Dec
|
| 2011 |
Jan
(78) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(88) |
Sep
(6) |
Oct
(1) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
(6) |
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:31:04
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9205/Downloader/QuotesEditor Modified Files: ValidationTabPage.cs Log Message: Now the ConstantsProvider is used to provide the SuspiciousRatio constant Index: ValidationTabPage.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/ValidationTabPage.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ValidationTabPage.cs 26 Apr 2004 15:48:04 -0000 1.2 --- ValidationTabPage.cs 8 May 2004 17:30:55 -0000 1.3 *************** *** 1,5 **** using System; using System.Windows.Forms; - using QuantProject.Applications.Downloader.Validate; using QuantProject.Business.Validation; --- 1,4 ---- *************** *** 36,40 **** base.OnEnter( e ); this.validateDataTable.Rows.Clear(); ! this.validateDataTable.AddRows( this.ticker , this.suspiciousRatio ); } } --- 35,39 ---- base.OnEnter( e ); this.validateDataTable.Rows.Clear(); ! this.validateDataTable.AddRows( ((QuotesEditor)this.FindForm()).Ticker ); } } |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:31:04
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9205/Downloader/Validate Modified Files: ValidateDataGrid.cs Log Message: Now the ConstantsProvider is used to provide the SuspiciousRatio constant Index: ValidateDataGrid.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Validate/ValidateDataGrid.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ValidateDataGrid.cs 26 Apr 2004 15:48:05 -0000 1.5 --- ValidateDataGrid.cs 8 May 2004 17:30:54 -0000 1.6 *************** *** 21,25 **** this.validateDataTable = new ValidateDataTable(); this.DataSource = validateDataTable; ! validateDataTable.AddRows( tickerIsLike , Convert.ToDouble( suspiciousRatio ) ); return this.validateDataTable; } --- 21,25 ---- this.validateDataTable = new ValidateDataTable(); this.DataSource = validateDataTable; ! validateDataTable.AddRows( tickerIsLike ); return this.validateDataTable; } *************** *** 31,35 **** // // styles have not been defined yet // validate_setTableStyle(); ! validateDataTable.AddRows(Convert.ToDouble( suspiciousRatio ) ); return this.validateDataTable; } --- 31,35 ---- // // styles have not been defined yet // validate_setTableStyle(); ! validateDataTable.AddRows( "pippo" ); return this.validateDataTable; } |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:29:47
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/RangeToRange In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8921/Downloader/QuotesEditor/RangeToRange Modified Files: RangeToRangeDataGrid.cs Log Message: The namespace QuantProject.Applications.Downloader.Validate is not used anymore Index: RangeToRangeDataGrid.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/RangeToRange/RangeToRangeDataGrid.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RangeToRangeDataGrid.cs 26 Apr 2004 15:48:04 -0000 1.3 --- RangeToRangeDataGrid.cs 8 May 2004 17:29:38 -0000 1.4 *************** *** 1,4 **** using System; - using QuantProject.Applications.Downloader.Validate; using QuantProject.Business.Validation; using QuantProject.DataAccess.Tables; --- 1,3 ---- |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:28:26
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8713/Downloader/QuotesEditor Modified Files: ValidationTabControl.cs VisualValidationDataGrid.cs Log Message: The namespace QuantProject.Applications.Downloader.Validate is not used anymore Index: ValidationTabControl.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/ValidationTabControl.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ValidationTabControl.cs 21 Mar 2004 16:51:23 -0000 1.1 --- ValidationTabControl.cs 8 May 2004 17:28:17 -0000 1.2 *************** *** 1,5 **** using System; using System.Windows.Forms; ! using QuantProject.Applications.Downloader.Validate; namespace QuantProject.Applications.Downloader --- 1,5 ---- using System; using System.Windows.Forms; ! using QuantProject.Business.Validation; namespace QuantProject.Applications.Downloader Index: VisualValidationDataGrid.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/VisualValidationDataGrid.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** VisualValidationDataGrid.cs 26 Apr 2004 15:48:04 -0000 1.3 --- VisualValidationDataGrid.cs 8 May 2004 17:28:17 -0000 1.4 *************** *** 24,28 **** using System.Data; using System.Windows.Forms; - using QuantProject.Applications.Downloader.Validate; using QuantProject.Business.Validation; using QuantProject.DataAccess.Tables; --- 24,27 ---- |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:26:15
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/OHLC In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8314/Downloader/QuotesEditor/OHLC Modified Files: OHLCdataGrid.cs OHLCtabPage.cs OHLCuserControl.cs Log Message: The namespace QuantProject.Applications.Downloader.Validate is not used anymore Index: OHLCtabPage.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/OHLC/OHLCtabPage.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OHLCtabPage.cs 21 Mar 2004 16:58:40 -0000 1.1 --- OHLCtabPage.cs 8 May 2004 17:26:04 -0000 1.2 *************** *** 3,7 **** using System.Drawing; using System.Windows.Forms; ! using QuantProject.Applications.Downloader.Validate; namespace QuantProject.Applications.Downloader --- 3,7 ---- using System.Drawing; using System.Windows.Forms; ! using QuantProject.Business.Validation; namespace QuantProject.Applications.Downloader Index: OHLCuserControl.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/OHLC/OHLCuserControl.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OHLCuserControl.cs 26 Apr 2004 15:48:04 -0000 1.3 --- OHLCuserControl.cs 8 May 2004 17:26:04 -0000 1.4 *************** *** 27,31 **** using System.Data; using System.Windows.Forms; - using QuantProject.Applications.Downloader.Validate; using QuantProject.Business.Validation; --- 27,30 ---- Index: OHLCdataGrid.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/OHLC/OHLCdataGrid.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** OHLCdataGrid.cs 26 Apr 2004 15:48:04 -0000 1.4 --- OHLCdataGrid.cs 8 May 2004 17:26:04 -0000 1.5 *************** *** 24,28 **** using System.Data; using System.Windows.Forms; - using QuantProject.Applications.Downloader.Validate; using QuantProject.Business.Validation; --- 24,27 ---- |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:26:12
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/CloseToClose In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8314/Downloader/QuotesEditor/CloseToClose Modified Files: CloseToCloseTabPage.cs Log Message: The namespace QuantProject.Applications.Downloader.Validate is not used anymore Index: CloseToCloseTabPage.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/CloseToClose/CloseToCloseTabPage.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CloseToCloseTabPage.cs 21 Mar 2004 16:59:31 -0000 1.1 --- CloseToCloseTabPage.cs 8 May 2004 17:26:03 -0000 1.2 *************** *** 2,6 **** using System.Drawing; using System.Windows.Forms; ! using QuantProject.Applications.Downloader.Validate; namespace QuantProject.Applications.Downloader --- 2,6 ---- using System.Drawing; using System.Windows.Forms; ! using QuantProject.Business.Validation; namespace QuantProject.Applications.Downloader |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:24:46
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/CloseToClose In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8039/Downloader/QuotesEditor/CloseToClose Modified Files: CloseToCloseDataGrid.cs Log Message: The namespace QuantProject.Applications.Downloader.Validate is not used anymore Index: CloseToCloseDataGrid.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/CloseToClose/CloseToCloseDataGrid.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CloseToCloseDataGrid.cs 26 Apr 2004 15:48:03 -0000 1.3 --- CloseToCloseDataGrid.cs 8 May 2004 17:24:23 -0000 1.4 *************** *** 25,29 **** using System.Windows.Forms; using QuantProject.DataAccess.Tables; - using QuantProject.Applications.Downloader.Validate; using QuantProject.Business.Validation; --- 25,28 ---- |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:23:13
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7845/b4_Business/a0_Validation Modified Files: Validator.cs Log Message: The IsValid method has been added Index: Validator.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Validator.cs 26 Apr 2004 15:37:59 -0000 1.1 --- Validator.cs 8 May 2004 17:23:03 -0000 1.2 *************** *** 1,6 **** using System; using System.Data; using QuantProject.DataAccess; - using QuantProject.DataAccess.Tables; namespace QuantProject.Business.Validation --- 1,6 ---- using System; using System.Data; + using QuantProject.Data.DataTables; using QuantProject.DataAccess; namespace QuantProject.Business.Validation *************** *** 17,31 **** // } ! #region IsValid ! private static bool isValid_withoutNewBeguinningQuotes( string ticker , DataTable validatedTicker ) { ! bool returnValue = ( ( validatedTicker.Rows.Count > 0 ) && ! ( (string)validatedTicker.Rows[ 0 ][ ValidatedTickers.HashValue ] == ! ValidatedTickers.GetHashValue( ticker , (DateTime)validatedTicker.Rows[ 0 ][ ValidatedTickers.StartDate ] , ! (DateTime)validatedTicker.Rows[ 0 ][ ValidatedTickers.EndDate ] ) ) ); ! if ( returnValue ) ! // the validated period is st qui!!!! ! returnValue = returnValue; ! return returnValue; } /// <summary> --- 17,32 ---- // } ! /// <summary> ! /// Validates (if the case) the given ticker from startDate to endDate ! /// </summary> ! /// <param name="ticker"></param> ! /// <param name="startDate"></param> ! /// <param name="endDate"></param> ! /// <returns>True if and only if the ticker is validated for the given range</returns> ! private static bool Validate( string ticker , DateTime startDate , DateTime endDate ) { ! ValidateDataTable validateDataTable = new ValidateDataTable(); ! validateDataTable.AddRows( ticker , startDate , endDate ); ! return ( validateDataTable.Rows.Count == 0 ); } /// <summary> *************** *** 34,49 **** /// <param name="ticker">Instrument's ticker</param> /// <returns></returns> ! public static bool IsValid( string ticker ) { ! DataTable validatedTicker = ! SqlExecutor.GetDataTable( "select * from validatedTickers where vvTicker='" + ticker + "'" ); ! // if ( ( validatedTicker.Rows.Count > 0 ) && ! // ( (DateTime)validatedTicker.Rows[ 0 ][ ValidatedTickers.StartDate ] < ! // Quotes.GetStartDate( ticker ) ) ) ! // // new quotes have been added at the beguinning of the ticker quotes, since when it was validated ! // ValidatedTickers.RemoveValidation( ticker ); ! return isValid_withoutNewBeguinningQuotes( ticker , validatedTicker ); } - #endregion } } --- 35,46 ---- /// <param name="ticker">Instrument's ticker</param> /// <returns></returns> ! public static bool IsValid( string ticker , DateTime startDate , DateTime endDate ) { ! QuantProject.Data.DataTables.ValidatedTickers validatedTickers = ! new QuantProject.Data.DataTables.ValidatedTickers( ticker ); ! return ( ( validatedTickers.Rows.Count > 0 ) && ! ( (DateTime)validatedTickers.Rows[ 0 ][ ValidatedTickers.StartDate ] > startDate ) && ! ( (DateTime)validatedTickers.Rows[ 0 ][ ValidatedTickers.EndDate ] > endDate ) ); } } } |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:21:59
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7666/b4_Business/a0_Validation Modified Files: ValidateDataTable.cs Log Message: - the new Quotes DataTable class is used for quotes to be validated - now the ConstantsProvider is used to provide the SuspiciousRatio constant Index: ValidateDataTable.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/ValidateDataTable.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ValidateDataTable.cs 26 Apr 2004 15:37:59 -0000 1.1 --- ValidateDataTable.cs 8 May 2004 17:21:50 -0000 1.2 *************** *** 2,6 **** --- 2,9 ---- using System.Data; using System.Data.OleDb; + using QuantProject.ADT; + using QuantProject.Business.Validation.Validators; using QuantProject.DataAccess; + using QuantProject.Data.DataTables; namespace QuantProject.Business.Validation *************** *** 93,115 **** //this.Rows.Add( quotesRow ); } ! public void AddRows( string tickerIsLike , double suspiciousRatio ) { ! QuotesToBeValidated quotesToBeValidated = new QuotesToBeValidated( tickerIsLike ); ! quotesToBeValidated.SuspiciousRatio = suspiciousRatio; ! quotesToBeValidated.SuspiciousDataRow += ! new SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); ! // new QuotesToBeValidated.SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); ! quotesToBeValidated.Validate(); this.AcceptChanges(); } ! public void AddRows(double suspiciousRatio ) { ! QuotesToBeValidated quotesToBeValidated = new QuotesToBeValidated(this.tableOfTickersToBeValidated); ! quotesToBeValidated.SuspiciousRatio = suspiciousRatio; ! quotesToBeValidated.SuspiciousDataRow += ! new SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); // new QuotesToBeValidated.SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); ! quotesToBeValidated.Validate(); ! this.AcceptChanges(); } /// <summary> --- 96,140 ---- //this.Rows.Add( quotesRow ); } ! private void addRows_with_quotesToBeValidated( Quotes quotes ) { ! // quotesToBeValidated.SuspiciousDataRow += ! // new SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); ! // quotesToBeValidated.Validate(); ! MultiValidator multiValidator = new MultiValidator(); ! // multiValidator.SuspiciousRatio = this.suspiciousRatio; ! multiValidator.SuspiciousDataRow += ! new SuspiciousDataRowEventHandler( this.suspiciousDataRowEventHandler ); ! multiValidator.Validate( quotes ); this.AcceptChanges(); } ! public void AddRows( string tickerIsLike ) { ! Quotes quotesToBeValidated = new Quotes( tickerIsLike ); ! // quotesToBeValidated.SuspiciousDataRow += ! // new SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); // new QuotesToBeValidated.SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); ! this.addRows_with_quotesToBeValidated( quotesToBeValidated ); ! } ! // public void AddRows(double suspiciousRatio ) ! // { ! // QuotesToBeValidated quotesToBeValidated = new QuotesToBeValidated(this.tableOfTickersToBeValidated); ! // quotesToBeValidated.SuspiciousRatio = suspiciousRatio; ! // quotesToBeValidated.SuspiciousDataRow += ! // new SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); ! // // new QuotesToBeValidated.SuspiciousDataRowEventHandler( suspiciousDataRowEventHandler ); ! // quotesToBeValidated.Validate(); ! // this.AcceptChanges(); ! // } ! /// <summary> ! /// Add suspicious rows for the given instrument, since the startDate to the endDate ! /// </summary> ! /// <param name="ticker"></param> ! /// <param name="startDate"></param> ! /// <param name="endDate"></param> ! public void AddRows( string ticker , DateTime startDate , DateTime endDate ) ! { ! Quotes quotesToBeValidated = ! new Quotes( ticker , startDate , endDate ); ! this.addRows_with_quotesToBeValidated( quotesToBeValidated ); } /// <summary> |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:19:49
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/Selectors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7277/b3_Data/Selectors Modified Files: TickerSelector.cs Log Message: Quotes becomes QuantProject.DataAccess.Tables.Quotes to resolve ambiguity Index: TickerSelector.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/Selectors/TickerSelector.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TickerSelector.cs 25 Apr 2004 17:32:56 -0000 1.1 --- TickerSelector.cs 8 May 2004 17:19:41 -0000 1.2 *************** *** 48,52 **** { //TODO: implement switching code to the proper method of selection ! return Quotes.GetMostLiquidTickers(this.selectionRule.GroupID, this.selectionRule.FirstQuoteDate, this.selectionRule.LastQuoteDate, --- 48,52 ---- { //TODO: implement switching code to the proper method of selection ! return QuantProject.DataAccess.Tables.Quotes.GetMostLiquidTickers(this.selectionRule.GroupID, this.selectionRule.FirstQuoteDate, this.selectionRule.LastQuoteDate, |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:17:55
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7009/b2_DataAccess Modified Files: SqlExecutor.cs Log Message: The SetDataTable static method has been added Index: SqlExecutor.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/SqlExecutor.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SqlExecutor.cs 17 Apr 2004 14:01:16 -0000 1.2 --- SqlExecutor.cs 8 May 2004 17:17:47 -0000 1.3 *************** *** 23,26 **** --- 23,31 ---- return dataTable; } + public static void SetDataTable( string SqlQuery , DataTable dataTable ) + { + OleDbDataAdapter oleDbDataAdapter = new OleDbDataAdapter( SqlQuery , ConnectionProvider.OleDbConnection ); + oleDbDataAdapter.Fill( dataTable ); + } public static void ExecuteNonQuery( string SqlNonQuery ) { |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:16:50
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6876/b4_Business/a0_Validation/Validators Modified Files: RangeToRangeValidator.cs Log Message: - the new Quotes DataTable class is used for quotes to be validated - now the ConstantsProvider is used to provide the SuspiciousRatio constant Index: RangeToRangeValidator.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators/RangeToRangeValidator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RangeToRangeValidator.cs 29 Apr 2004 12:30:05 -0000 1.1 --- RangeToRangeValidator.cs 8 May 2004 17:16:42 -0000 1.2 *************** *** 2,8 **** using System.Collections; using System.Data; using QuantProject.ADT.Histories; - using QuantProject.DataAccess.Tables; using QuantProject.Business.Validation; namespace QuantProject.Business.Validation.Validators --- 2,9 ---- using System.Collections; using System.Data; + using QuantProject.ADT; using QuantProject.ADT.Histories; using QuantProject.Business.Validation; + using QuantProject.Data.DataTables; namespace QuantProject.Business.Validation.Validators *************** *** 14,27 **** { private DataTable dataTableToBeValidated; - private double suspiciousRatio = 3; private ArrayList rangeToRangeVisuallyValidated; - public double SuspiciousRatio - { - get { return this.suspiciousRatio; } - set { this.suspiciousRatio = value; } - } - public RangeToRangeValidator() { --- 15,21 ---- *************** *** 58,62 **** DataRow quoteRow , double currentValue , double averageValue ) { ! if ( ( Math.Abs( currentValue / averageValue ) > this.suspiciousRatio ) && ( this.rangeToRangeVisuallyValidated.IndexOf( quoteRow[ "quDate" ] ) < 0 ) ) // the current close to close value is suspiciously larger --- 52,56 ---- DataRow quoteRow , double currentValue , double averageValue ) { ! if ( ( Math.Abs( currentValue / averageValue ) > ConstantsProvider.SuspiciousRatio ) && ( this.rangeToRangeVisuallyValidated.IndexOf( quoteRow[ "quDate" ] ) < 0 ) ) // the current close to close value is suspiciously larger *************** *** 87,91 **** private int validate_currentTicker( string currentTicker , int currentTickerStartingRowIndex ) { ! this.rangeToRangeVisuallyValidated = VisuallyValidatedQuotes.GetRangeToRangeValidated( currentTicker ); History rangeToRange = new History(); History rangeToRangeMovingAverage; --- 81,86 ---- private int validate_currentTicker( string currentTicker , int currentTickerStartingRowIndex ) { ! this.rangeToRangeVisuallyValidated = ! QuantProject.DataAccess.Tables.VisuallyValidatedQuotes.GetRangeToRangeValidated( currentTicker ); History rangeToRange = new History(); History rangeToRangeMovingAverage; *************** *** 103,107 **** /// </summary> /// <param name="dataTableToBeValidated">Quote rows to be validated</param> ! public void Validate( DataTable dataTableToBeValidated ) { int currentRowIndex = 0; --- 98,102 ---- /// </summary> /// <param name="dataTableToBeValidated">Quote rows to be validated</param> ! public void Validate( Quotes dataTableToBeValidated ) { int currentRowIndex = 0; |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:15:58
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6769/b4_Business/a0_Validation Modified Files: IValidator.cs Log Message: The Validate method now requires a DataTables.Quotes object Index: IValidator.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/IValidator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IValidator.cs 26 Apr 2004 15:37:59 -0000 1.1 --- IValidator.cs 8 May 2004 17:15:50 -0000 1.2 *************** *** 1,4 **** --- 1,5 ---- using System; using System.Data; + using QuantProject.Data.DataTables; namespace QuantProject.Business.Validation *************** *** 13,17 **** { event SuspiciousDataRowEventHandler SuspiciousDataRow; ! void Validate( DataTable dataTable ); } } --- 14,18 ---- { event SuspiciousDataRowEventHandler SuspiciousDataRow; ! void Validate( Quotes quotes ); } } |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:14:40
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6579/b2_DataAccess/Tables Modified Files: ValidatedTickers.cs Log Message: The SetDataTable static method has been added Index: ValidatedTickers.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables/ValidatedTickers.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ValidatedTickers.cs 26 Apr 2004 15:41:41 -0000 1.2 --- ValidatedTickers.cs 8 May 2004 17:14:32 -0000 1.3 *************** *** 35,38 **** --- 35,54 ---- return quotes.GetHashValue( startDate , endDate ); } + + /// <summary> + /// Returns (if present) the validated ticker row + /// </summary> + /// <param name="ticker"></param> + /// <param name="startDate"></param> + /// <param name="endDate"></param> + /// <returns></returns> + public static void SetDataTable( string ticker , DataTable dataTable) + { + string sql = + "select * from validatedTickers " + + "where " + ValidatedTickers.Ticker + "='" + ticker + "'"; + SqlExecutor.SetDataTable( sql , dataTable ); + } + } } |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:12:27
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6365/b4_Business/a0_Validation Removed Files: QuotesToBeValidated.cs Log Message: Replaced by the Quotes DataTable class --- QuotesToBeValidated.cs DELETED --- |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:10:42
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6123/b2_DataAccess/Tables Modified Files: Quotes.cs Log Message: - static fields have been created for field names - the SetDataTable static method has been added Index: Quotes.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables/Quotes.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Quotes.cs 25 Apr 2004 17:37:52 -0000 1.4 --- Quotes.cs 8 May 2004 17:10:33 -0000 1.5 *************** *** 14,17 **** --- 14,30 ---- private DataTable quotes; + // these static fields provide field name in the database table + // They are intended to be used through intellisense when necessary + public static string TickerFieldName = "quTicker"; // Ticker cannot be simply used because + // it is already used below + public static string Date = "quDate"; + public static string Open = "quOpen"; + public static string High = "quHigh"; + public static string Low = "quLow"; + public static string Close = "quClose"; + public static string Volume = "quVolume"; + public static string AdjustedClose = "quAdjustedClose"; + public static string AdjustedCloseToCloseRatio = "quAdjustedCloseToCloseRatio"; + /// <summary> *************** *** 29,32 **** --- 42,55 ---- } /// <summary> + /// Creates quotes for the given instrument, since the startDate to the endDate + /// </summary> + /// <param name="ticker"></param> + /// <param name="startDate"></param> + /// <param name="endDate"></param> + public Quotes( string ticker , DateTime startDate , DateTime endDate ) + { + /// TO DO + } + /// <summary> /// Returns the first date for the given ticker /// </summary> *************** *** 245,248 **** --- 268,288 ---- return SqlExecutor.GetDataTable( sql ); } + /// <summary> + /// Returns the quotes for the given instrument , since startDate to endDate + /// </summary> + /// <param name="ticker"></param> + /// <param name="startDate"></param> + /// <param name="endDate"></param> + /// <returns></returns> + public static void SetDataTable( string ticker , DateTime startDate , DateTime endDate , + DataTable dataTable) + { + string sql = + "select * from quotes " + + "where " + Quotes.TickerFieldName + "='" + ticker + "' " + + "and " + Quotes.Date + ">=" + SQLBuilder.GetDateConstant( startDate ) + + "and " + Quotes.Date + "<=" + SQLBuilder.GetDateConstant( endDate ); + SqlExecutor.SetDataTable( sql , dataTable ); + } /// <summary> |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:07:59
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5698/b4_Business/a0_Validation/Validators Modified Files: OHLCvalidator.cs Log Message: The new Quotes DataTable class is used for quotes to be validated Index: OHLCvalidator.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators/OHLCvalidator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OHLCvalidator.cs 29 Apr 2004 12:29:31 -0000 1.1 --- OHLCvalidator.cs 8 May 2004 17:07:50 -0000 1.2 *************** *** 2,5 **** --- 2,6 ---- using System.Data; using QuantProject.Business.Validation; + using QuantProject.Data.DataTables; namespace QuantProject.Business.Validation.Validators *************** *** 61,67 **** /// </summary> /// <param name="dataTable">Quote rows to be validated</param> ! public void Validate( DataTable dataTable ) { ! foreach ( DataRow quotesRow in dataTable.Rows ) this.validate_currentQuotesRow( quotesRow ); } --- 62,68 ---- /// </summary> /// <param name="dataTable">Quote rows to be validated</param> ! public void Validate( Quotes quotes ) { ! foreach ( DataRow quotesRow in quotes.Rows ) this.validate_currentQuotesRow( quotesRow ); } |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:07:03
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5550/b4_Business/a0_Validation/Validators Modified Files: MultiValidator.cs Log Message: - the new Quotes DataTable class is used for quotes to be validated - now the ConstantsProvider is used to provide the SuspiciousRatio constant Index: MultiValidator.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators/MultiValidator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MultiValidator.cs 29 Apr 2004 12:29:12 -0000 1.1 --- MultiValidator.cs 8 May 2004 17:06:55 -0000 1.2 *************** *** 2,5 **** --- 2,6 ---- using System.Data; using QuantProject.Business.Validation; + using QuantProject.Data.DataTables; namespace QuantProject.Business.Validation.Validators *************** *** 10,21 **** public class MultiValidator : IValidator { - private double suspiciousRatio; - - public double SuspiciousRatio - { - get { return this.suspiciousRatio; } - set { this.suspiciousRatio = value; } - } - public MultiValidator() { --- 11,14 ---- *************** *** 36,45 **** /// </summary> /// <param name="dataTable">Quote rows to be validated</param> ! private void validate_OHLC( DataTable dataTable ) { OHLCvalidator oHLCvalidator = new OHLCvalidator(); oHLCvalidator.SuspiciousDataRow += new SuspiciousDataRowEventHandler( suspiciousDataRowHandler ); ! oHLCvalidator.Validate( dataTable ); } /// <summary> --- 29,38 ---- /// </summary> /// <param name="dataTable">Quote rows to be validated</param> ! private void validate_OHLC( Quotes quotes ) { OHLCvalidator oHLCvalidator = new OHLCvalidator(); oHLCvalidator.SuspiciousDataRow += new SuspiciousDataRowEventHandler( suspiciousDataRowHandler ); ! oHLCvalidator.Validate( quotes ); } /// <summary> *************** *** 47,57 **** /// </summary> /// <param name="dataTable">Quote rows to be validated</param> ! private void validate_CloseToClose( DataTable dataTable ) { CloseToCloseValidator closeToCloseValidator = new CloseToCloseValidator(); - closeToCloseValidator.SuspiciousRatio = this.suspiciousRatio; closeToCloseValidator.SuspiciousDataRow += new SuspiciousDataRowEventHandler( suspiciousDataRowHandler ); ! closeToCloseValidator.Validate( dataTable ); } /// <summary> --- 40,49 ---- /// </summary> /// <param name="dataTable">Quote rows to be validated</param> ! private void validate_CloseToClose( Quotes quotes ) { CloseToCloseValidator closeToCloseValidator = new CloseToCloseValidator(); closeToCloseValidator.SuspiciousDataRow += new SuspiciousDataRowEventHandler( suspiciousDataRowHandler ); ! closeToCloseValidator.Validate( quotes ); } /// <summary> *************** *** 59,69 **** /// </summary> /// <param name="dataTable">Quote rows to be validated</param> ! private void validate_RangeToRange( DataTable dataTable ) { RangeToRangeValidator rangeToRangeValidator = new RangeToRangeValidator(); - rangeToRangeValidator.SuspiciousRatio = this.suspiciousRatio; rangeToRangeValidator.SuspiciousDataRow += new SuspiciousDataRowEventHandler( suspiciousDataRowHandler ); ! rangeToRangeValidator.Validate( dataTable ); } /// <summary> --- 51,60 ---- /// </summary> /// <param name="dataTable">Quote rows to be validated</param> ! private void validate_RangeToRange( Quotes quotes ) { RangeToRangeValidator rangeToRangeValidator = new RangeToRangeValidator(); rangeToRangeValidator.SuspiciousDataRow += new SuspiciousDataRowEventHandler( suspiciousDataRowHandler ); ! rangeToRangeValidator.Validate( quotes ); } /// <summary> *************** *** 71,79 **** /// </summary> /// <param name="dataTable">Contains the quotes rows to be validated</param> ! public void Validate( DataTable dataTable ) { ! this.validate_OHLC( dataTable ); ! this.validate_CloseToClose( dataTable ); ! this.validate_RangeToRange( dataTable ); } /// <summary> --- 62,70 ---- /// </summary> /// <param name="dataTable">Contains the quotes rows to be validated</param> ! public void Validate( Quotes quotes ) { ! this.validate_OHLC( quotes ); ! this.validate_CloseToClose( quotes ); ! this.validate_RangeToRange( quotes ); } /// <summary> |
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:06:06
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5409/b4_Business/a0_Validation/Validators Modified Files: CloseToCloseValidator.cs Log Message: - the new Quotes DataTable class is used for quotes to be validated - now the ConstantsProvider is used to provide the SuspiciousRatio constant Index: CloseToCloseValidator.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators/CloseToCloseValidator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CloseToCloseValidator.cs 29 Apr 2004 12:28:40 -0000 1.1 --- CloseToCloseValidator.cs 8 May 2004 17:05:55 -0000 1.2 *************** *** 1,6 **** --- 1,8 ---- using System; using System.Data; + using QuantProject.ADT; using QuantProject.ADT.Histories; using QuantProject.Business.Validation; + using QuantProject.Data.DataTables; namespace QuantProject.Business.Validation.Validators *************** *** 12,22 **** { private DataTable dataTableToBeValidated; - private double suspiciousRatio = 2; - - public double SuspiciousRatio - { - get { return this.suspiciousRatio; } - set { this.suspiciousRatio = value; } - } public CloseToCloseValidator() --- 14,17 ---- *************** *** 52,56 **** DataRow quoteRow , double currentValue , double averageValue ) { ! if ( Math.Abs( currentValue / averageValue ) > this.suspiciousRatio ) // the current close to close value is suspiciously larger // than the average close to close ratio --- 47,51 ---- DataRow quoteRow , double currentValue , double averageValue ) { ! if ( Math.Abs( currentValue / averageValue ) > ConstantsProvider.SuspiciousRatio ) // the current close to close value is suspiciously larger // than the average close to close ratio *************** *** 98,102 **** /// </summary> /// <param name="dataTableToBeValidated">Quote rows to be validated</param> ! public void Validate( DataTable dataTableToBeValidated ) { int currentRowIndex = 0; --- 93,97 ---- /// </summary> /// <param name="dataTableToBeValidated">Quote rows to be validated</param> ! public void Validate( Quotes dataTableToBeValidated ) { int currentRowIndex = 0; |
|
From: Glauco S. <gla...@us...> - 2004-04-29 12:30:15
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14673 Added Files: RangeToRangeValidator.cs Log Message: Searches for range to range divergences --- NEW FILE: RangeToRangeValidator.cs --- using System; using System.Collections; using System.Data; using QuantProject.ADT.Histories; using QuantProject.DataAccess.Tables; using QuantProject.Business.Validation; namespace QuantProject.Business.Validation.Validators { /// <summary> /// Searches for range to range divergences /// </summary> public class RangeToRangeValidator : IValidator { private DataTable dataTableToBeValidated; private double suspiciousRatio = 3; private ArrayList rangeToRangeVisuallyValidated; public double SuspiciousRatio { get { return this.suspiciousRatio; } set { this.suspiciousRatio = value; } } public RangeToRangeValidator() { // // TODO: Add constructor logic here // } public event SuspiciousDataRowEventHandler SuspiciousDataRow; #region "Validate" private int validate_currentTicker_set_rangeToRange( string currentTicker , int currentTickerStartingRowIndex , History rangeToRange ) { rangeToRange.Clear(); int localCurrentRowIndex = currentTickerStartingRowIndex + 1; rangeToRange.Add( this.dataTableToBeValidated.Rows[ currentTickerStartingRowIndex ][ "quDate" ] , null ); while ( ( localCurrentRowIndex < this.dataTableToBeValidated.Rows.Count ) && ( (string)this.dataTableToBeValidated.Rows[ localCurrentRowIndex ][ "quTicker" ] == currentTicker ) ) { double currentRange = ( Convert.ToDouble( this.dataTableToBeValidated.Rows[ localCurrentRowIndex ][ "quHigh" ] ) - Convert.ToDouble( this.dataTableToBeValidated.Rows[ localCurrentRowIndex ][ "quLow" ] ) ) * Convert.ToDouble( this.dataTableToBeValidated.Rows[ localCurrentRowIndex ][ "quAdjustedClose" ] ) / Convert.ToDouble( this.dataTableToBeValidated.Rows[ localCurrentRowIndex ][ "quClose" ] ); rangeToRange.Add( this.dataTableToBeValidated.Rows[ localCurrentRowIndex ][ "quDate" ] , currentRange ); localCurrentRowIndex++; } return localCurrentRowIndex; } private void validate_currentTicker_withHistories_validateRow( DataRow quoteRow , double currentValue , double averageValue ) { if ( ( Math.Abs( currentValue / averageValue ) > this.suspiciousRatio ) && ( this.rangeToRangeVisuallyValidated.IndexOf( quoteRow[ "quDate" ] ) < 0 ) ) // the current close to close value is suspiciously larger // than the average close to close ratio // and it has not been visually validated yet this.SuspiciousDataRow( this , new SuspiciousDataRowEventArgs( quoteRow , ValidationWarning.SuspiciousRangeToRangeRatio ) ); } private void validate_currentTicker_withHistories( History rangeToRange , History rangeToRangeMovingAverage , int currentTickerStartingRowIndex , int nextTickerStartingRowIndex ) { for (int i = currentTickerStartingRowIndex ; i < nextTickerStartingRowIndex ; i++ ) if ( rangeToRangeMovingAverage.GetByIndex( i - currentTickerStartingRowIndex ) != null ) try { validate_currentTicker_withHistories_validateRow( this.dataTableToBeValidated.Rows[ i ] , Convert.ToDouble(rangeToRange.GetByIndex( i - currentTickerStartingRowIndex )) , (double)(rangeToRangeMovingAverage.GetByIndex( i - currentTickerStartingRowIndex )) ); } catch (Exception ex) { Console.WriteLine( ex.ToString() ); } } private int validate_currentTicker( string currentTicker , int currentTickerStartingRowIndex ) { this.rangeToRangeVisuallyValidated = VisuallyValidatedQuotes.GetRangeToRangeValidated( currentTicker ); History rangeToRange = new History(); History rangeToRangeMovingAverage; int nextTickerStartingRowIndex = validate_currentTicker_set_rangeToRange( currentTicker , currentTickerStartingRowIndex , rangeToRange ); rangeToRangeMovingAverage = rangeToRange.GetSimpleMovingAverage( 20 ); validate_currentTicker_withHistories( rangeToRange , rangeToRangeMovingAverage , currentTickerStartingRowIndex , nextTickerStartingRowIndex ); return nextTickerStartingRowIndex; } /// <summary> /// Validates range to range divergencies /// </summary> /// <param name="dataTableToBeValidated">Quote rows to be validated</param> public void Validate( DataTable dataTableToBeValidated ) { int currentRowIndex = 0; string currentTicker; this.dataTableToBeValidated = dataTableToBeValidated; while ( currentRowIndex < dataTableToBeValidated.Rows.Count ) { currentTicker = (string)this.dataTableToBeValidated.Rows[ currentRowIndex ][ "quTicker" ]; currentRowIndex = validate_currentTicker( currentTicker , currentRowIndex ); } } #endregion } } |
|
From: Glauco S. <gla...@us...> - 2004-04-29 12:29:40
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14479 Added Files: OHLCvalidator.cs Log Message: Validates OHLC quote values --- NEW FILE: OHLCvalidator.cs --- using System; using System.Data; using QuantProject.Business.Validation; namespace QuantProject.Business.Validation.Validators { /// <summary> /// Validates OHLC quotes values /// </summary> public class OHLCvalidator : IValidator { public event SuspiciousDataRowEventHandler SuspiciousDataRow; public OHLCvalidator() { // // TODO: Add constructor logic here // } #region "Validate" #region "validate_currentQuotesRow_checkLogicalErrors" /// <summary> /// Adds a row if not ((Low <= Open) and (Open <= High) and (Low <= Close) and (Close <= High)) /// </summary> /// <param name="quotesRow">Row of quotes to be checked</param> private void validate_currentQuotesRow_checkLogicalErrors_checkOHLC( DataRow quotesRow ) { if (! ( ( Convert.ToDouble( quotesRow[ "quLow" ] ) <= ( Convert.ToDouble( quotesRow[ "quOpen" ] ) ) ) && ( Convert.ToDouble( quotesRow[ "quOpen" ] ) <= ( Convert.ToDouble( quotesRow[ "quHigh" ] ) ) ) && ( Convert.ToDouble( quotesRow[ "quLow" ] ) <= ( Convert.ToDouble( quotesRow[ "quClose" ] ) ) ) && ( Convert.ToDouble( quotesRow[ "quClose" ] ) <= ( Convert.ToDouble( quotesRow[ "quHigh" ] ) ) ) ) ) SuspiciousDataRow( this , new SuspiciousDataRowEventArgs( quotesRow , ValidationWarning.OpenHighLowCloseLogicalInconsistency ) ); } /// <summary> /// Adds an error row if quotesRow doesn't respect logical constraints /// </summary> /// <param name="quotesRow">Row of quotes to be checked</param> private void validate_currentQuotesRow_checkLogicalErrors( DataRow quotesRow ) { validate_currentQuotesRow_checkLogicalErrors_checkOHLC( quotesRow ); } #endregion /// <summary> /// Adds errors for the current quotesRow (if any) /// </summary> /// <param name="quotesRow">Row of quotes to be checked</param> private void validate_currentQuotesRow( DataRow quotesRow ) { validate_currentQuotesRow_checkLogicalErrors( quotesRow ); } /// <summary> /// Validates Open High Low Close consistencies /// </summary> /// <param name="dataTable">Quote rows to be validated</param> public void Validate( DataTable dataTable ) { foreach ( DataRow quotesRow in dataTable.Rows ) this.validate_currentQuotesRow( quotesRow ); } } #endregion } |
|
From: Glauco S. <gla...@us...> - 2004-04-29 12:29:22
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14381 Added Files: MultiValidator.cs Log Message: Calls several different quotes' validators --- NEW FILE: MultiValidator.cs --- using System; using System.Data; using QuantProject.Business.Validation; namespace QuantProject.Business.Validation.Validators { /// <summary> /// Calls several different quotes' validators /// </summary> public class MultiValidator : IValidator { private double suspiciousRatio; public double SuspiciousRatio { get { return this.suspiciousRatio; } set { this.suspiciousRatio = value; } } public MultiValidator() { // // TODO: Add constructor logic here // } public event SuspiciousDataRowEventHandler SuspiciousDataRow; #region "Validate" private void suspiciousDataRowHandler( Object sender , SuspiciousDataRowEventArgs eventArgs ) { SuspiciousDataRow( this , eventArgs ); } /// <summary> /// Validates the Open High Low Close consistencies /// </summary> /// <param name="dataTable">Quote rows to be validated</param> private void validate_OHLC( DataTable dataTable ) { OHLCvalidator oHLCvalidator = new OHLCvalidator(); oHLCvalidator.SuspiciousDataRow += new SuspiciousDataRowEventHandler( suspiciousDataRowHandler ); oHLCvalidator.Validate( dataTable ); } /// <summary> /// Validates the Close to Close differencies /// </summary> /// <param name="dataTable">Quote rows to be validated</param> private void validate_CloseToClose( DataTable dataTable ) { CloseToCloseValidator closeToCloseValidator = new CloseToCloseValidator(); closeToCloseValidator.SuspiciousRatio = this.suspiciousRatio; closeToCloseValidator.SuspiciousDataRow += new SuspiciousDataRowEventHandler( suspiciousDataRowHandler ); closeToCloseValidator.Validate( dataTable ); } /// <summary> /// Validates the Range to Range differencies /// </summary> /// <param name="dataTable">Quote rows to be validated</param> private void validate_RangeToRange( DataTable dataTable ) { RangeToRangeValidator rangeToRangeValidator = new RangeToRangeValidator(); rangeToRangeValidator.SuspiciousRatio = this.suspiciousRatio; rangeToRangeValidator.SuspiciousDataRow += new SuspiciousDataRowEventHandler( suspiciousDataRowHandler ); rangeToRangeValidator.Validate( dataTable ); } /// <summary> /// Validates the quotes rows /// </summary> /// <param name="dataTable">Contains the quotes rows to be validated</param> public void Validate( DataTable dataTable ) { this.validate_OHLC( dataTable ); this.validate_CloseToClose( dataTable ); this.validate_RangeToRange( dataTable ); } /// <summary> /// Validates the instrument quotes for the given ticker /// </summary> /// <param name="ticker">Instrument's ticker</param> public void Validate( string ticker ) { } } #endregion } |
|
From: Glauco S. <gla...@us...> - 2004-04-29 12:28:50
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14296 Added Files: CloseToCloseValidator.cs Log Message: Searches for close to close divergences --- NEW FILE: CloseToCloseValidator.cs --- using System; using System.Data; using QuantProject.ADT.Histories; using QuantProject.Business.Validation; namespace QuantProject.Business.Validation.Validators { /// <summary> /// Searches for close to close divergences /// </summary> public class CloseToCloseValidator : IValidator { private DataTable dataTableToBeValidated; private double suspiciousRatio = 2; public double SuspiciousRatio { get { return this.suspiciousRatio; } set { this.suspiciousRatio = value; } } public CloseToCloseValidator() { // // TODO: Add constructor logic here // } public event SuspiciousDataRowEventHandler SuspiciousDataRow; #region "Validate" private int validate_currentTicker_set_closeToClose( string currentTicker , int currentTickerStartingRowIndex , History closeToClose ) { closeToClose.Clear(); int localCurrentRowIndex = currentTickerStartingRowIndex + 1; closeToClose.Add( this.dataTableToBeValidated.Rows[ currentTickerStartingRowIndex ][ "quDate" ] , null ); while ( ( localCurrentRowIndex < this.dataTableToBeValidated.Rows.Count ) && ( (string)this.dataTableToBeValidated.Rows[ localCurrentRowIndex ][ "quTicker" ] == currentTicker ) ) { closeToClose.Add( this.dataTableToBeValidated.Rows[ localCurrentRowIndex ][ "quDate" ] , Math.Abs( Convert.ToDouble( this.dataTableToBeValidated.Rows[ localCurrentRowIndex ][ "quAdjustedClose" ] ) - Convert.ToDouble( this.dataTableToBeValidated.Rows[ localCurrentRowIndex - 1 ][ "quAdjustedClose" ] ) ) ); localCurrentRowIndex++; } return localCurrentRowIndex; } private void validate_currentTicker_withHistories_validateRow( DataRow quoteRow , double currentValue , double averageValue ) { if ( Math.Abs( currentValue / averageValue ) > this.suspiciousRatio ) // the current close to close value is suspiciously larger // than the average close to close ratio this.SuspiciousDataRow( this , new SuspiciousDataRowEventArgs( quoteRow , ValidationWarning.SuspiciousCloseToCloseRatio ) ); } private void validate_currentTicker_withHistories( History closeToClose , History closeToCloseMovingAverage , int currentTickerStartingRowIndex , int nextTickerStartingRowIndex ) { for (int i = currentTickerStartingRowIndex ; i < nextTickerStartingRowIndex ; i++ ) if ( closeToCloseMovingAverage.GetByIndex( i - currentTickerStartingRowIndex ) != null ) try { // validate_currentTicker_withHistories_validateRow( // this.dataTableToBeValidated.Rows[ i ] , // (double)closeToClose.GetByIndex( i - currentTickerStartingRowIndex ) , // (double)closeToCloseMovingAverage.GetByIndex( i - currentTickerStartingRowIndex ) ); validate_currentTicker_withHistories_validateRow( this.dataTableToBeValidated.Rows[ i ] , Convert.ToDouble(closeToClose.GetByIndex( i - currentTickerStartingRowIndex )) , (double)(closeToCloseMovingAverage.GetByIndex( i - currentTickerStartingRowIndex )) ); } catch (Exception ex) { Console.WriteLine( ex.ToString() ); } } private int validate_currentTicker( string currentTicker , int currentTickerStartingRowIndex ) { History closeToClose = new History(); History closeToCloseMovingAverage; int nextTickerStartingRowIndex = validate_currentTicker_set_closeToClose( currentTicker , currentTickerStartingRowIndex , closeToClose ); closeToCloseMovingAverage = closeToClose.GetSimpleMovingAverage( 20 ); validate_currentTicker_withHistories( closeToClose , closeToCloseMovingAverage , currentTickerStartingRowIndex , nextTickerStartingRowIndex ); return nextTickerStartingRowIndex; } /// <summary> /// Validates close to close divergencies /// </summary> /// <param name="dataTableToBeValidated">Quote rows to be validated</param> public void Validate( DataTable dataTableToBeValidated ) { int currentRowIndex = 0; string currentTicker; this.dataTableToBeValidated = dataTableToBeValidated; while ( currentRowIndex < dataTableToBeValidated.Rows.Count ) { currentTicker = (string)this.dataTableToBeValidated.Rows[ currentRowIndex ][ "quTicker" ]; currentRowIndex = validate_currentTicker( currentTicker , currentRowIndex ); } } #endregion } } |
|
From: Glauco S. <gla...@us...> - 2004-04-29 12:23:47
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate/Validators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13335 Removed Files: CloseToCloseValidator.cs MultiValidator.cs OHLCvalidator.cs RangeToRangeValidator.cs Log Message: Remove validators from old position --- MultiValidator.cs DELETED --- --- CloseToCloseValidator.cs DELETED --- --- OHLCvalidator.cs DELETED --- --- RangeToRangeValidator.cs DELETED --- |
|
From: Glauco S. <gla...@us...> - 2004-04-29 12:14:00
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/Validate/Validators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11512 Modified Files: CloseToCloseValidator.cs Log Message: Force commit again Index: CloseToCloseValidator.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Validate/Validators/CloseToCloseValidator.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CloseToCloseValidator.cs 29 Apr 2004 12:11:31 -0000 1.4 --- CloseToCloseValidator.cs 29 Apr 2004 12:13:51 -0000 1.5 *************** *** 1,3 **** ! using System; using System.Data; using QuantProject.ADT.Histories; --- 1,3 ---- ! using System; using System.Data; using QuantProject.ADT.Histories; |