quantproject-developers Mailing List for QuantProject (Page 133)
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: Marco M. <mi...@us...> - 2004-07-25 12:02:47
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/DataTables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3969/b3_Data/DataTables Added Files: GroupQuotes.cs Log Message: Added GroupQuotes to the project. --- NEW FILE: GroupQuotes.cs --- /* QuantDownloader - Quantitative Finance Library GroupQuotes.cs Copyright (C) 2004 Marco Milletti This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using System; using System.Data; using System.Text; using QuantProject.ADT; using QuantProject.ADT.Histories; using QuantProject.DataAccess; using QuantProject.DataAccess.Tables; namespace QuantProject.Data.DataTables { /// <summary> /// DataTable for quotes of the tickers inside a given group /// </summary> public class GroupQuotes : DataTable { private string groupID; public GroupQuotes( string groupID, DateTime startDate, DateTime endDate) { this.groupID = groupID; this.fillDataTable( groupID ,startDate, endDate); } private void setPrimaryKeys() { DataColumn[] columnPrimaryKeys = new DataColumn[2]; columnPrimaryKeys[0] = this.Columns[Quotes.TickerFieldName]; columnPrimaryKeys[1] = this.Columns[Quotes.Date]; this.PrimaryKey = columnPrimaryKeys; } private void fillDataTable( string groupID , DateTime startDate , DateTime endDate ) { QuantProject.DataAccess.Tables.Quotes.SetDataTable( groupID , startDate , endDate , this ); this.setPrimaryKeys(); } /// <summary> /// Gets the groupID whose quotes are contained into the GroupQuotes object /// </summary> /// <returns></returns> public string GroupID { get{ return groupID; } } /// <summary> /// Gets the adjusted close for the given ticker at the given date /// </summary> /// <returns></returns> public float GetAdjustedClose( string ticker, DateTime date ) { object[] keys = new object[2]; keys[0] = ticker; keys[1] = date.Date; DataRow foundRow = this.Rows.Find(keys); if(foundRow==null) throw new Exception("No quote for such ticker and date!"); return (float)foundRow[Quotes.AdjustedClose]; } /// <summary> /// Gets the date of the first quote for the given ticker /// </summary> /// <returns></returns> public DateTime GetStartDate(string ticker) { //if (!this.HasTicker(ticker)) //throw new Exception("There's no such a ticker in the given group!"); DataRow[] rows = this.Select(Quotes.TickerFieldName + "='" + ticker + "'", Quotes.Date); return (DateTime) rows[0][Quotes.Date]; } /// <summary> /// Gets the date of the last quote for the given ticker /// </summary> /// <returns></returns> public DateTime GetEndDate(string ticker) { //if (!this.HasTicker(ticker)) //throw new Exception("There's no such a ticker in the given group!"); DataRow[] rows = this.Select(Quotes.TickerFieldName + "='" + ticker + "'", Quotes.Date); return (DateTime) rows[rows.Length - 1][Quotes.Date]; } /// <summary> /// Returns true if a quote is available at the given date for a specific ticker /// </summary> /// <param name="ticker">ticker inside the group</param> /// <param name="date">date</param> /// <returns></returns> public bool HasDate( string ticker, DateTime date ) { bool hasDate; object[] keys = new object[2]; keys[0] = ticker; keys[1] = date.Date; hasDate = this.Rows.Contains(keys); return hasDate; } /// <summary> /// Returns true if the given ticker is contained into the groupQuotes object /// </summary> /// <param name="ticker">ticker inside the group</param> /// <param name="date">date</param> /// <returns></returns> public bool HasTicker(string ticker) { DataRow[] rows = this.Select(Quotes.TickerFieldName + "='" + ticker + "'"); return rows.Length>0; } /// <summary> /// If the given ticker has a quote at the given date, then it returns the given date, /// else it returns the immediate following date at which a quote is available /// </summary> /// <param name="date">date</param> /// <returns></returns> public DateTime GetQuoteDateOrFollowing(string ticker, DateTime date ) { if(this.HasDate(ticker, date)) { return date; } else { return GetQuoteDateOrFollowing(ticker, date.AddDays(1)); } } /// <summary> /// If the given ticker has a quote at the given date, then it returns the given date, /// else it returns the immediate preceding date at which a quote is available /// </summary> /// <param name="date">date</param> /// <returns></returns> public DateTime GetQuoteDateOrPreceding( string ticker, DateTime date ) { if(this.HasDate(ticker, date)) { return date; } else { return GetQuoteDateOrPreceding(ticker, date.AddDays(-1)); } } /// <summary> /// Returns the number of quotes for the given ticker contained into the GroupQuotes object /// </summary> /// <param name="ticker">ticker for which the number of quotes has to be returned</param> /// <returns></returns> public int GetNumberOfQuotes( string ticker ) { DataRow[] rows = this.Select(Quotes.TickerFieldName + "='" + ticker + "'"); return rows.Length; } /// <summary> /// If the given ticker has a quote at the given date, then it returns the given date, /// else it returns the first valid following date at which a quote is available /// (or the first valid preceding date, in case date is >= the last available quote) /// </summary> /// <param name="date">date</param> /// <returns></returns> public DateTime GetFirstValidQuoteDate(string ticker, DateTime date) { DateTime startDate = this.GetStartDate(ticker); DateTime endDate = this.GetEndDate(ticker); if(date<startDate || (date>=startDate && date<=endDate)) { return this.GetQuoteDateOrFollowing(ticker, date); } else { return this.GetQuoteDateOrPreceding(ticker, date); } } } } |
|
From: Marco M. <mi...@us...> - 2004-07-25 12:01:31
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/Selectors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3768/b3_Data/Selectors Removed Files: SelectionRule.cs Log Message: Removed SelectionRule class. Now all the rule parameters are passed to the TickerSelector class --- SelectionRule.cs DELETED --- |
|
From: Glauco S. <gla...@us...> - 2004-07-07 20:26:34
|
Update of /cvsroot/quantproject/QuantProject In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21873 Modified Files: QuantProject.suo Log Message: - New external graphic library is used now (DateTime axis are supported) Index: QuantProject.suo =================================================================== RCS file: /cvsroot/quantproject/QuantProject/QuantProject.suo,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 Binary files /tmp/cvsTnu15A and /tmp/cvsl8YQ4v differ |
|
From: Glauco S. <gla...@us...> - 2004-07-07 20:25:35
|
Update of /cvsroot/quantproject/QuantProject/b5_Presentation/Charting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21677/b5_Presentation/Charting Modified Files: Chart.cs Log Message: - New external graphic library is used now (DateTime axis are supported) Index: Chart.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b5_Presentation/Charting/Chart.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Chart.cs 24 Jan 2004 19:09:49 -0000 1.1 --- Chart.cs 7 Jul 2004 20:25:26 -0000 1.2 *************** *** 22,25 **** --- 22,26 ---- using System; using System.Collections; + using System.Data; using System.Drawing; using scpl; *************** *** 70,101 **** } #region "OnPaint" ! private void onPaint_addLinePlot( ChartPlot chartPlot ) ! { ! int npt=chartPlot.History.Count; ! int startIndex = chartPlot.History.IndexOfKeyOrPrevious( chartPlot.StartDateTime ); ! int endIndex = chartPlot.History.IndexOfKeyOrPrevious( chartPlot.EndDateTime ); ! int plotLength = endIndex - startIndex + 1; ! float [] x = new float[ plotLength ]; ! float [] y = new float[ plotLength ]; ! float step=1.0F; ! for ( int i=startIndex ; i<=endIndex ; i++ ) ! { ! x[i-startIndex]=i*step; ! y[i-startIndex]=(float)chartPlot.History.GetByIndex( i ); ! } ! LinePlot lp=new LinePlot( new ArrayAdapter(x,y) ); ! Pen p=new Pen( chartPlot.Color ); ! lp.Pen=p; ! // base.Clear(); ! this.Add(lp); ! } ! protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { Console.WriteLine( "Chart.OnPaint()" ); foreach ( ChartPlot chartPlot in this.chartPlots ) ! onPaint_addLinePlot( chartPlot ); base.OnPaint( e ); } --- 71,132 ---- } #region "OnPaint" ! private void onPaint_addLinePlot_ok( ChartPlot chartPlot ) ! { ! int npt=chartPlot.History.Count; ! int startIndex = chartPlot.History.IndexOfKeyOrPrevious( chartPlot.StartDateTime ); ! int endIndex = chartPlot.History.IndexOfKeyOrPrevious( chartPlot.EndDateTime ); ! int plotLength = endIndex - startIndex + 1; ! ! DataTable dataTable = new DataTable(); ! dataTable.Columns.Add( "X" , DateTime.Now.GetType() ); ! dataTable.Columns.Add( "Y" , System.Type.GetType( "System.Single" ) ); ! for ( int i=startIndex ; i<=endIndex ; i++ ) ! { ! DataRow dataRow = dataTable.NewRow(); ! dataRow[ "X" ] = (DateTime)chartPlot.History.GetKey( i ); ! dataRow[ "Y" ] = (float)chartPlot.History.GetByIndex( i ); ! dataTable.Rows.Add( dataRow ); ! } ! LinePlot lp = new LinePlot(); ! lp.DataSource = dataTable; ! lp.AbscissaData = "X"; ! lp.ValueData = "Y"; ! Pen p=new Pen( chartPlot.Color ); ! lp.Pen=p; ! ! // base.Clear(); ! this.Add(lp); ! } ! private void onPaint_addLinePlot( ChartPlot chartPlot ) ! { ! int npt=chartPlot.History.Count; ! int startIndex = chartPlot.History.IndexOfKeyOrPrevious( chartPlot.StartDateTime ); ! int endIndex = chartPlot.History.IndexOfKeyOrPrevious( chartPlot.EndDateTime ); ! int plotLength = endIndex - startIndex + 1; ! float [] x = new float[ plotLength ]; ! float [] y = new float[ plotLength ]; ! ! float step=1.0F; ! for ( int i=startIndex ; i<=endIndex ; i++ ) ! { ! x[i-startIndex]=i*step; ! y[i-startIndex]=(float)chartPlot.History.GetByIndex( i ); ! } ! ! // LinePlot lp=new LinePlot( new ArrayAdapter(x,y) ); commentata per avere compilazione; rimuovi commenti per farlo funzionare con la vecchia scpl ! Pen p=new Pen( chartPlot.Color ); ! // lp.Pen=p; ! ! // base.Clear(); ! // this.Add(lp); ! } ! protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { Console.WriteLine( "Chart.OnPaint()" ); foreach ( ChartPlot chartPlot in this.chartPlots ) ! onPaint_addLinePlot_ok( chartPlot ); base.OnPaint( e ); } |
|
From: Glauco S. <gla...@us...> - 2004-07-07 20:25:17
|
Update of /cvsroot/quantproject/QuantProject In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21586 Modified Files: QuantProject.suo Log Message: - New external graphic library is used now (DateTime axis are supported) Index: QuantProject.suo =================================================================== RCS file: /cvsroot/quantproject/QuantProject/QuantProject.suo,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 Binary files /tmp/cvsNg4wLT and /tmp/cvsNs6hzU differ |
|
From: Glauco S. <gla...@us...> - 2004-07-07 20:24:57
|
Update of /cvsroot/quantproject/QuantProject/b5_Presentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21471/b5_Presentation Modified Files: b5_Presentation.csproj Log Message: - New external graphic library is used now (DateTime axis are supported) Index: b5_Presentation.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b5_Presentation/b5_Presentation.csproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** b5_Presentation.csproj 8 May 2004 17:37:41 -0000 1.3 --- b5_Presentation.csproj 7 Jul 2004 20:24:48 -0000 1.4 *************** *** 120,124 **** Name = "scpl" AssemblyName = "scpl" ! HintPath = "..\..\..\..\My Documents\nostri\GLAUCO\bin\scpl.dll" /> </References> --- 120,124 ---- Name = "scpl" AssemblyName = "scpl" ! HintPath = "..\b91_QuantProject\bin\Debug\scpl.dll" /> </References> |
|
From: Glauco S. <gla...@us...> - 2004-07-07 20:23:22
|
Update of /cvsroot/quantproject/QuantProject/b3_Data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20941/b3_Data Modified Files: b3_Data.csproj Log Message: Added the ExtendedDataTable class Index: b3_Data.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/b3_Data.csproj,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** b3_Data.csproj 26 May 2004 15:27:24 -0000 1.5 --- b3_Data.csproj 7 Jul 2004 20:23:13 -0000 1.6 *************** *** 132,135 **** --- 132,140 ---- /> <File + RelPath = "ExtendedDataTable.cs" + SubType = "Component" + BuildAction = "Compile" + /> + <File RelPath = "FilterBuilder.cs" SubType = "Code" |
|
From: Glauco S. <gla...@us...> - 2004-07-07 20:22:02
|
Update of /cvsroot/quantproject/QuantProject/b3_Data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20482/b3_Data Added Files: ExtendedDataTable.cs Removed Files: ExtendeDataTable.cs Log Message: The file name has been fixed --- ExtendeDataTable.cs DELETED --- --- NEW FILE: ExtendedDataTable.cs --- using System; using QuantProject.DataAccess; namespace QuantProject.Data { /// <summary> /// Extended DataTable /// </summary> public class ExtendedDataTable : QuantProject.ADT.ExtendedDataTable { private OleDbSingleTableAdapter oleDbSingleTableAdapter; public ExtendedDataTable( string sql ) { this.oleDbSingleTableAdapter = new OleDbSingleTableAdapter( sql , this ); } public void Update() { this.oleDbSingleTableAdapter.OleDbDataAdapter.Update( this ); } } } |
|
From: Glauco S. <gla...@us...> - 2004-07-07 20:17:20
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19411/b2_DataAccess Modified Files: DataBaseVersionManager.cs Log Message: qsAdjustedCloseToCloseRatio has been converted to single Index: DataBaseVersionManager.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/DataBaseVersionManager.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** DataBaseVersionManager.cs 26 Apr 2004 14:28:29 -0000 1.12 --- DataBaseVersionManager.cs 7 Jul 2004 20:17:11 -0000 1.13 *************** *** 143,147 **** "qsVolume SINGLE , " + "qsAdjustedClose SINGLE , " + ! "qsAdjustedCloseToCloseRatio DOUBLE , " + "qsEditDate DATETIME , " + "CONSTRAINT myKey PRIMARY KEY ( qsTicker , qsDate , qsSource ) )" ); --- 143,147 ---- "qsVolume SINGLE , " + "qsAdjustedClose SINGLE , " + ! "qsAdjustedCloseToCloseRatio SINGLE , " + "qsEditDate DATETIME , " + "CONSTRAINT myKey PRIMARY KEY ( qsTicker , qsDate , qsSource ) )" ); |
|
From: Glauco S. <gla...@us...> - 2004-07-07 20:11:08
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18012/Downloader Modified Files: Downloader.csproj Downloader.csproj.user Log Message: - Executables are instructed to use the Framework version 1.1 - DateTime axis are used for graphs now Index: Downloader.csproj.user =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Downloader.csproj.user,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Downloader.csproj.user 26 Apr 2004 15:51:48 -0000 1.4 --- Downloader.csproj.user 7 Jul 2004 20:10:29 -0000 1.5 *************** *** 2,6 **** <CSHARP> <Build> ! <Settings ReferencePath = "c:\windows\assembly\gac\crystaldecisions.windows.forms\9.1.3300.0__692fbea5521e1304\;C:\Documents and Settings\Glauco\Desktop\QuantProject\lib\;C:\Documents and Settings\Glauco\Desktop\QuantProject\QuantDownloader\Downloader\bin\Debug\" > <Config Name = "Debug" --- 2,6 ---- <CSHARP> <Build> ! <Settings ReferencePath = "C:\Documents and Settings\Glauco\Desktop\QuantProject\QuantDownloader\Downloader\bin\Debug\;C:\Documents and Settings\Glauco\My Documents\nostri\GLAUCO\bin\;c:\windows\assembly\gac\crystaldecisions.windows.forms\9.1.3300.0__692fbea5521e1304\;C:\Documents and Settings\Glauco\Desktop\QuantProject\lib\" > <Config Name = "Debug" Index: Downloader.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/Downloader.csproj,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Downloader.csproj 27 May 2004 16:24:34 -0000 1.23 --- Downloader.csproj 7 Jul 2004 20:10:29 -0000 1.24 *************** *** 138,141 **** --- 138,145 ---- <Include> <File + RelPath = "app.config" + BuildAction = "None" + /> + <File RelPath = "App.ico" BuildAction = "Content" *************** *** 207,211 **** <File RelPath = "QuotesEditor\QuotesChart.cs" ! SubType = "Code" BuildAction = "Compile" /> --- 211,215 ---- <File RelPath = "QuotesEditor\QuotesChart.cs" ! SubType = "UserControl" BuildAction = "Compile" /> *************** *** 247,251 **** <File RelPath = "QuotesEditor\VisualValidationChart.cs" ! SubType = "Code" BuildAction = "Compile" /> --- 251,255 ---- <File RelPath = "QuotesEditor\VisualValidationChart.cs" ! SubType = "UserControl" BuildAction = "Compile" /> *************** *** 262,266 **** <File RelPath = "QuotesEditor\CloseToClose\CloseToCloseChart.cs" ! SubType = "Code" BuildAction = "Compile" /> --- 266,270 ---- <File RelPath = "QuotesEditor\CloseToClose\CloseToCloseChart.cs" ! SubType = "UserControl" BuildAction = "Compile" /> *************** *** 297,301 **** <File RelPath = "QuotesEditor\RangeToRange\RangeToRangeChart.cs" ! SubType = "Code" BuildAction = "Compile" /> --- 301,305 ---- <File RelPath = "QuotesEditor\RangeToRange\RangeToRangeChart.cs" ! SubType = "UserControl" BuildAction = "Compile" /> |
|
From: Glauco S. <gla...@us...> - 2004-07-07 20:10:44
|
Update of /cvsroot/quantproject/QuantDownloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18012 Modified Files: QuantDownloader.sln QuantDownloader.suo Log Message: - Executables are instructed to use the Framework version 1.1 - DateTime axis are used for graphs now Index: QuantDownloader.suo =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/QuantDownloader.suo,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 Binary files /tmp/cvspKxrcg and /tmp/cvs0hg2Fw differ Index: QuantDownloader.sln =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/QuantDownloader.sln,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** QuantDownloader.sln 25 Jan 2004 15:50:27 -0000 1.3 --- QuantDownloader.sln 7 Jul 2004 20:10:29 -0000 1.4 *************** *** 47,50 **** --- 47,52 ---- {6EE31501-376E-491B-869E-F06D5B7C9C30}.Release.Build.0 = Release|.NET EndGlobalSection + GlobalSection(SolutionItems) = postSolution + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection |
|
From: Glauco S. <gla...@us...> - 2004-07-07 20:07:33
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17403/Downloader Added Files: app.config Log Message: Executables are instructed to use the Framework version 1.1 --- NEW FILE: app.config --- (This appears to be a binary file; contents omitted.) |
|
From: Glauco S. <gla...@us...> - 2004-07-07 20:07:33
|
Update of /cvsroot/quantproject/QuantDownloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17403 Added Files: app.config Log Message: Executables are instructed to use the Framework version 1.1 --- NEW FILE: app.config --- (This appears to be a binary file; contents omitted.) |
|
From: Glauco S. <gla...@us...> - 2004-07-04 18:04:15
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4503/b2_DataAccess Modified Files: OleDbSingleTableAdapter.cs Log Message: Exceptions now are thrown up Index: OleDbSingleTableAdapter.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/OleDbSingleTableAdapter.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OleDbSingleTableAdapter.cs 20 Jun 2004 19:09:10 -0000 1.6 --- OleDbSingleTableAdapter.cs 4 Jul 2004 18:00:29 -0000 1.7 *************** *** 67,70 **** --- 67,71 ---- string exceptionMessage = ex.Message + "\n" + ex.StackTrace; Console.WriteLine( exceptionMessage ); + throw; } } |
|
From: Glauco S. <gla...@us...> - 2004-07-04 17:57:15
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3533/Downloader Modified Files: TickerDownloader.cs Log Message: New URL to download quotes from yahoo Index: TickerDownloader.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/TickerDownloader.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TickerDownloader.cs 17 Jun 2004 19:53:31 -0000 1.9 --- TickerDownloader.cs 4 Jul 2004 17:53:36 -0000 1.10 *************** *** 223,227 **** try { ! HttpWebRequest Req = (HttpWebRequest)WebRequest.Create("http:" + "//table.finance.yahoo.com/table.csv?a=" + a + "&b=" + b + "&c=" + c +"&d=" + d + "&e=" + e + "&f=" + f + "&s=" + p_quTicker + "&y=0&g=d&ignore=.csv"); Req.Method = "GET"; --- 223,227 ---- try { ! HttpWebRequest Req = (HttpWebRequest)WebRequest.Create("http:" + "//ichart.yahoo.com/table.csv?a=" + a + "&b=" + b + "&c=" + c +"&d=" + d + "&e=" + e + "&f=" + f + "&s=" + p_quTicker + "&y=0&g=d&ignore=.csv"); Req.Method = "GET"; *************** *** 539,545 **** try { ! Req = (HttpWebRequest)WebRequest.Create("http:" + "//table.finance.yahoo.com/table.csv?a=" ! + a + "&b=" + b + "&c=" + c +"&d=" + d + "&e=" + e + "&f=" + f + "&s=" + p_quTicker + "&y=0&g=d&ignore=.csv"); ! Req.Method = "GET"; Req.Timeout = ConstantsProvider.TimeOutValue; hwr = (HttpWebResponse)Req.GetResponse(); --- 539,548 ---- try { ! // Req = (HttpWebRequest)WebRequest.Create("http:" + "//table.finance.yahoo.com/table.csv?a=" ! // + a + "&b=" + b + "&c=" + c +"&d=" + d + "&e=" + e + "&f=" + f + "&s=" + p_quTicker + "&y=0&g=d&ignore=.csv"); ! string url = "http:" + "//ichart.yahoo.com/table.csv?a=" ! + a + "&b=" + b + "&c=" + c +"&d=" + d + "&e=" + e + "&f=" + f + "&s=" + p_quTicker + "&y=0&g=d&ignore=.csv"; ! Req = (HttpWebRequest)WebRequest.Create( url ); ! Req.Method = "GET"; Req.Timeout = ConstantsProvider.TimeOutValue; hwr = (HttpWebResponse)Req.GetResponse(); *************** *** 578,582 **** try { ! Req = (HttpWebRequest)WebRequest.Create("http:" + "//table.finance.yahoo.com/table.csv?a=" + a + "&b=" + b + "&c=" + c +"&d=" + d + "&e=" + e + "&f=" + f + "&s=" + p_quTicker + "&y=0&g=d&ignore=.csv"); Req.Method = "GET"; --- 581,585 ---- try { ! Req = (HttpWebRequest)WebRequest.Create("http:" + "//ichart.yahoo.com/table.csv?a=" + a + "&b=" + b + "&c=" + c +"&d=" + d + "&e=" + e + "&f=" + f + "&s=" + p_quTicker + "&y=0&g=d&ignore=.csv"); Req.Method = "GET"; |
|
From: Marco M. <mi...@us...> - 2004-07-03 19:20:05
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/Selectors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv480/b3_Data/Selectors Modified Files: SelectionType.cs Log Message: Update enumeration for selection type (used by SelectionRule) Index: SelectionType.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/Selectors/SelectionType.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SelectionType.cs 25 Apr 2004 17:32:55 -0000 1.1 --- SelectionType.cs 3 Jul 2004 19:19:56 -0000 1.2 *************** *** 30,36 **** public enum SelectionType { ! MostLiquid/*, LessVolatile, - BestPerformer, LessStatisticallyCorrelated*/ } --- 30,36 ---- public enum SelectionType { ! MostLiquid, ! BestPerformer/* LessVolatile, LessStatisticallyCorrelated*/ } |
|
From: Marco M. <mi...@us...> - 2004-06-27 19:21:51
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/TickerSelectors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21454/Downloader/TickerSelectors Modified Files: TickerGroupsViewer.cs TickerSelectorForm.cs TickerViewer.cs TickerViewerMenu.cs Log Message: Changed ITickerSelector interface and consequently modified classes that implement it. Method GetTableOfSelectedTickers now has to return a DataTable (not an upper class derived from a DataTable) Index: TickerSelectorForm.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/TickerSelectors/TickerSelectorForm.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TickerSelectorForm.cs 20 Jun 2004 10:16:09 -0000 1.3 --- TickerSelectorForm.cs 27 Jun 2004 19:21:42 -0000 1.4 *************** *** 66,71 **** this.dataGrid1.ContextMenu = new TickerViewerMenu(this); //TODO: complete comboBox's code with all possible types of selections ! this.comboBoxAvailableSelectionRules.Text = "Most liquid instrument"; ! this.comboBoxAvailableSelectionRules.Items.Add("Most liquid instrument"); } --- 66,73 ---- this.dataGrid1.ContextMenu = new TickerViewerMenu(this); //TODO: complete comboBox's code with all possible types of selections ! this.comboBoxAvailableSelectionRules.Text = "Most liquid instruments"; ! this.comboBoxAvailableSelectionRules.Items.Add("Most liquid instruments"); ! this.comboBoxAvailableSelectionRules.Text = "Best performing instruments"; ! this.comboBoxAvailableSelectionRules.Items.Add("Best performing instruments"); } *************** *** 294,301 **** // implementation of ITickerSelector interface ! public TickerDataTable GetTableOfSelectedTickers() { ! DataTable dataTableOfDataGrid1 = (DataTable)this.dataGrid1.DataSource; ! TickerDataTable tableOfSelectedTickers = new TickerDataTable(); int indexOfRow = 0; while(indexOfRow != dataTableOfDataGrid1.Rows.Count) --- 296,305 ---- // implementation of ITickerSelector interface ! public DataTable GetTableOfSelectedTickers() { ! /* ! DataTable dataTableOfDataGrid1 = (DataTable)this.dataGrid1.DataSource; ! DataTable tableOfSelectedTickers = new DataTable(); ! TickerDataTable.AddColumnsOfTickerTable(tableOfSelectedTickers); int indexOfRow = 0; while(indexOfRow != dataTableOfDataGrid1.Rows.Count) *************** *** 304,314 **** { DataRow dataRow = tableOfSelectedTickers.NewRow(); ! dataRow[0] = (string)dataTableOfDataGrid1.Rows[indexOfRow][0]; ! dataRow[1] = (string)dataTableOfDataGrid1.Rows[indexOfRow][1]; tableOfSelectedTickers.Rows.Add(dataRow); } indexOfRow++; ! } ! return tableOfSelectedTickers; } --- 308,318 ---- { DataRow dataRow = tableOfSelectedTickers.NewRow(); ! dataRow["Ticker"] = (string)dataTableOfDataGrid1.Rows[indexOfRow][0]; ! dataRow["CompanyName"] = (string)dataTableOfDataGrid1.Rows[indexOfRow][1]; tableOfSelectedTickers.Rows.Add(dataRow); } indexOfRow++; ! }*/ ! return TickerSelector.GetTableOfManuallySelectedTickers(this.dataGrid1); } *************** *** 327,333 **** private void buttonSelectTickers_Click(object sender, System.EventArgs e) { ! //TODO: complete code finding a way to construct the right ! // selection rule on the base of what selected by the user ! SelectionRule rule = new SelectionRule(SelectionType.MostLiquid, this.textBoxGroupID.Text, this.dateTimePickerFirstDate.Value, this.dateTimePickerLastDate.Value, --- 331,335 ---- private void buttonSelectTickers_Click(object sender, System.EventArgs e) { ! SelectionRule rule = new SelectionRule(this.GetTypeOfRuleSelectedByUser(), this.textBoxGroupID.Text, this.dateTimePickerFirstDate.Value, this.dateTimePickerLastDate.Value, *************** *** 340,346 **** this.dataGrid1.DataSource = selector.GetTableOfSelectedTickers(); this.dataGrid1.Refresh(); - } } } --- 342,357 ---- this.dataGrid1.DataSource = selector.GetTableOfSelectedTickers(); this.dataGrid1.Refresh(); } + private SelectionType GetTypeOfRuleSelectedByUser() + { + SelectionType typeSelected = SelectionType.MostLiquid; + if(this.comboBoxAvailableSelectionRules.Text == "Most liquid instruments") + typeSelected = SelectionType.MostLiquid; + else if (this.comboBoxAvailableSelectionRules.Text == "Best performing instruments") + typeSelected = SelectionType.BestPerformer; + return typeSelected; + } + } } Index: TickerViewer.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/TickerSelectors/TickerViewer.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TickerViewer.cs 25 Apr 2004 17:24:50 -0000 1.2 --- TickerViewer.cs 27 Jun 2004 19:21:42 -0000 1.3 *************** *** 420,427 **** // implementation of ITickerSelector interface ! public TickerDataTable GetTableOfSelectedTickers() { ! DataTable dataTableOfDataGrid1 = (DataTable)this.dataGrid1.DataSource; ! TickerDataTable tableOfSelectedTickers = new TickerDataTable(); int indexOfRow = 0; while(indexOfRow != dataTableOfDataGrid1.Rows.Count) --- 420,429 ---- // implementation of ITickerSelector interface ! public DataTable GetTableOfSelectedTickers() { ! /* ! DataTable dataTableOfDataGrid1 = (DataTable)this.dataGrid1.DataSource; ! DataTable tableOfSelectedTickers = new DataTable(); ! TickerDataTable.AddColumnsOfTickerTable(tableOfSelectedTickers); int indexOfRow = 0; while(indexOfRow != dataTableOfDataGrid1.Rows.Count) *************** *** 430,440 **** { DataRow dataRow = tableOfSelectedTickers.NewRow(); ! dataRow[0] = (string)dataTableOfDataGrid1.Rows[indexOfRow][0]; ! dataRow[1] = (string)dataTableOfDataGrid1.Rows[indexOfRow][1]; tableOfSelectedTickers.Rows.Add(dataRow); } indexOfRow++; ! } ! return tableOfSelectedTickers; } --- 432,442 ---- { DataRow dataRow = tableOfSelectedTickers.NewRow(); ! dataRow["Ticker"] = (string)dataTableOfDataGrid1.Rows[indexOfRow][0]; ! dataRow["CompanyName"] = (string)dataTableOfDataGrid1.Rows[indexOfRow][1]; tableOfSelectedTickers.Rows.Add(dataRow); } indexOfRow++; ! }*/ ! return TickerSelector.GetTableOfManuallySelectedTickers(this.dataGrid1); } Index: TickerViewerMenu.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/TickerSelectors/TickerViewerMenu.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TickerViewerMenu.cs 20 Jun 2004 10:18:00 -0000 1.4 --- TickerViewerMenu.cs 27 Jun 2004 19:21:42 -0000 1.5 *************** *** 27,31 **** using QuantProject.Data.DataTables; using QuantProject.Data.Selectors; ! //using QuantProject.Applications.Downloader.TickerSelectors; namespace QuantProject.Applications.Downloader.TickerSelectors --- 27,31 ---- using QuantProject.Data.DataTables; using QuantProject.Data.Selectors; ! namespace QuantProject.Applications.Downloader.TickerSelectors *************** *** 85,89 **** { ITickerSelector iTickerSelector = (ITickerSelector)this.parentForm; ! TickerDataTable tableOfSelectedTickers = iTickerSelector.GetTableOfSelectedTickers(); if(tableOfSelectedTickers.Rows.Count == 0) --- 85,89 ---- { ITickerSelector iTickerSelector = (ITickerSelector)this.parentForm; ! DataTable tableOfSelectedTickers = iTickerSelector.GetTableOfSelectedTickers(); if(tableOfSelectedTickers.Rows.Count == 0) *************** *** 101,105 **** { ITickerSelector iTickerSelector = (ITickerSelector)this.parentForm; ! TickerDataTable tableOfSelectedTickers = iTickerSelector.GetTableOfSelectedTickers(); if(tableOfSelectedTickers.Rows.Count == 0) { --- 101,105 ---- { ITickerSelector iTickerSelector = (ITickerSelector)this.parentForm; ! DataTable tableOfSelectedTickers = iTickerSelector.GetTableOfSelectedTickers(); if(tableOfSelectedTickers.Rows.Count == 0) { *************** *** 117,121 **** { ITickerSelector iTickerSelector = (ITickerSelector)this.parentForm; ! TickerDataTable tableOfSelectedTickers = iTickerSelector.GetTableOfSelectedTickers(); if(tableOfSelectedTickers.Rows.Count != 1) --- 117,121 ---- { ITickerSelector iTickerSelector = (ITickerSelector)this.parentForm; ! DataTable tableOfSelectedTickers = iTickerSelector.GetTableOfSelectedTickers(); if(tableOfSelectedTickers.Rows.Count != 1) *************** *** 136,140 **** Cursor.Current = Cursors.WaitCursor; ITickerSelector iTickerSelector = (ITickerSelector)this.parentForm; ! TickerDataTable tableOfSelectedTickers = iTickerSelector.GetTableOfSelectedTickers(); string currentTicker; foreach(DataRow row in tableOfSelectedTickers.Rows) --- 136,140 ---- Cursor.Current = Cursors.WaitCursor; ITickerSelector iTickerSelector = (ITickerSelector)this.parentForm; ! DataTable tableOfSelectedTickers = iTickerSelector.GetTableOfSelectedTickers(); string currentTicker; foreach(DataRow row in tableOfSelectedTickers.Rows) *************** *** 150,154 **** { ITickerSelector iTickerSelector = (ITickerSelector)this.parentForm; ! TickerDataTable tableOfSelectedTickers = iTickerSelector.GetTableOfSelectedTickers(); TickerSelectorForm selectorForm = new TickerSelectorForm(tableOfSelectedTickers); selectorForm.Show(); --- 150,154 ---- { ITickerSelector iTickerSelector = (ITickerSelector)this.parentForm; ! DataTable tableOfSelectedTickers = iTickerSelector.GetTableOfSelectedTickers(); TickerSelectorForm selectorForm = new TickerSelectorForm(tableOfSelectedTickers); selectorForm.Show(); Index: TickerGroupsViewer.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/TickerSelectors/TickerGroupsViewer.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TickerGroupsViewer.cs 11 May 2004 22:06:41 -0000 1.3 --- TickerGroupsViewer.cs 27 Jun 2004 19:21:42 -0000 1.4 *************** *** 161,177 **** private void addTickerToTable(DataTable tableToFill, string tickerID, ! string tickerDescription) { ! try ! { ! DataRow newRow = tableToFill.NewRow(); ! newRow[0] = tickerID; ! newRow[1] = tickerDescription; ! tableToFill.Rows.Add(newRow); ! } ! catch(Exception ex) ! { ! string notUsed = ex.ToString(); ! } } // implementation of ITickerSelector interface --- 161,170 ---- private void addTickerToTable(DataTable tableToFill, string tickerID, ! string tickerDescription) { ! DataRow newRow = tableToFill.NewRow(); ! newRow["tiTicker"] = tickerID; ! newRow["tiCompanyName"] = tickerDescription; ! tableToFill.Rows.Add(newRow); } // implementation of ITickerSelector interface *************** *** 184,190 **** } ! public TickerDataTable GetTableOfSelectedTickers() { ! TickerDataTable tableOfSelectedTickers = new TickerDataTable(); foreach(ListViewItem item in this.listViewGroupsAndTickers.SelectedItems) --- 177,184 ---- } ! public DataTable GetTableOfSelectedTickers() { ! DataTable tableOfSelectedTickers = new DataTable(); ! TickerDataTable.AddColumnsOfTickerTable(tableOfSelectedTickers); foreach(ListViewItem item in this.listViewGroupsAndTickers.SelectedItems) *************** *** 201,205 **** // so it stands for a group of tickers { ! //TODO: add method to retrieve MessageBox.Show("NOT IMPLEMENTED YET"); } --- 195,199 ---- // so it stands for a group of tickers { ! ///TODO: add method to retrieve MessageBox.Show("NOT IMPLEMENTED YET"); } *************** *** 718,722 **** //implementation of ITickerReceiver interface for this object ! public void ReceiveTickers(TickerDataTable tickers) { try --- 712,716 ---- //implementation of ITickerReceiver interface for this object ! public void ReceiveTickers(DataTable tickers) { try |
|
From: Marco M. <mi...@us...> - 2004-06-27 19:21:50
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21454/Downloader Modified Files: WebDownloader.cs Log Message: Changed ITickerSelector interface and consequently modified classes that implement it. Method GetTableOfSelectedTickers now has to return a DataTable (not an upper class derived from a DataTable) Index: WebDownloader.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/WebDownloader.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** WebDownloader.cs 17 Jun 2004 19:50:00 -0000 1.15 --- WebDownloader.cs 27 Jun 2004 19:21:42 -0000 1.16 *************** *** 518,525 **** #region ITickerSelector's implementation ! public TickerDataTable GetTableOfSelectedTickers() { DataTable dataTableOfDataGrid1 = (DataTable)this.dataGrid1.DataSource; ! TickerDataTable tableOfSelectedTickers = new TickerDataTable(); int indexOfRow = 0; while(indexOfRow != dataTableOfDataGrid1.Rows.Count) --- 518,527 ---- #region ITickerSelector's implementation ! public DataTable GetTableOfSelectedTickers() { + /* DataTable dataTableOfDataGrid1 = (DataTable)this.dataGrid1.DataSource; ! DataTable tableOfSelectedTickers = new DataTable(); ! TickerDataTable.AddColumnsOfTickerTable(tableOfSelectedTickers); int indexOfRow = 0; while(indexOfRow != dataTableOfDataGrid1.Rows.Count) *************** *** 528,537 **** { DataRow dataRow = tableOfSelectedTickers.NewRow(); ! dataRow[0] = (string)dataTableOfDataGrid1.Rows[indexOfRow][0]; tableOfSelectedTickers.Rows.Add(dataRow); } indexOfRow++; ! } ! return tableOfSelectedTickers; } --- 530,539 ---- { DataRow dataRow = tableOfSelectedTickers.NewRow(); ! dataRow["Ticker"] = (string)dataTableOfDataGrid1.Rows[indexOfRow][0]; tableOfSelectedTickers.Rows.Add(dataRow); } indexOfRow++; ! }*/ ! return TickerSelector.GetTableOfManuallySelectedTickers(this.dataGrid1); } |
|
From: Marco M. <mi...@us...> - 2004-06-27 19:20:39
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/Selectors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21315/b3_Data/Selectors Modified Files: ITickerReceiver.cs ITickerSelector.cs TickerSelector.cs Log Message: Changed ITickerSelector interface and consequently modified classes that implement it. Method GetTableOfSelectedTickers now has to return a DataTable (not an upper class derived from a DataTable) Index: ITickerReceiver.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/Selectors/ITickerReceiver.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ITickerReceiver.cs 25 Apr 2004 17:29:33 -0000 1.1 --- ITickerReceiver.cs 27 Jun 2004 19:20:31 -0000 1.2 *************** *** 22,26 **** using System; ! using QuantProject.Data.DataTables; --- 22,27 ---- using System; ! //using QuantProject.Data.DataTables; ! using System.Data; *************** *** 32,36 **** public interface ITickerReceiver { ! void ReceiveTickers(TickerDataTable tickersToReceive); } } --- 33,37 ---- public interface ITickerReceiver { ! void ReceiveTickers(DataTable tickersToReceive); } } Index: ITickerSelector.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/Selectors/ITickerSelector.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ITickerSelector.cs 25 Apr 2004 17:29:33 -0000 1.1 --- ITickerSelector.cs 27 Jun 2004 19:20:31 -0000 1.2 *************** *** 33,37 **** { void SelectAllTickers(); ! TickerDataTable GetTableOfSelectedTickers(); } } --- 33,37 ---- { void SelectAllTickers(); ! DataTable GetTableOfSelectedTickers(); } } Index: TickerSelector.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/Selectors/TickerSelector.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TickerSelector.cs 19 Jun 2004 01:13:00 -0000 1.3 --- TickerSelector.cs 27 Jun 2004 19:20:31 -0000 1.4 *************** *** 23,26 **** --- 23,27 ---- using System; using System.Data; + using System.Windows.Forms; using QuantProject.DataAccess.Tables; using QuantProject.Data.DataTables; *************** *** 52,56 **** } ! public DataTable GetSelectedTickers() { if(this.setOfTickersToBeSelected == null && --- 53,58 ---- } ! //implementation of ITickerSelector ! public DataTable GetTableOfSelectedTickers() { if(this.setOfTickersToBeSelected == null && *************** *** 70,73 **** --- 72,84 ---- this.selectionRule.MaxNumOfReturnedTickers); } + else if(this.setOfTickersToBeSelected == null && + this.selectionRule.TypeOfSelection == SelectionType.BestPerformer) + { + return TickerDataTable.GetBestPerformingTickers(this.selectionRule.GroupID, + this.selectionRule.FirstQuoteDate, + this.selectionRule.LastQuoteDate, + this.selectionRule.MaxNumOfReturnedTickers); + } + else return new DataTable(); *************** *** 75,85 **** } - - //implementation of ITickerSelector - public TickerDataTable GetTableOfSelectedTickers() - { - return TickerDataTable.ConvertToTickerDataTable(this.GetSelectedTickers()); - } - public void SelectAllTickers() { --- 86,89 ---- *************** *** 87,90 **** --- 91,123 ---- } // end of implementation of ITickerSelector + + /// <summary> + /// It returns a dataTable containing tickers selected by the user + /// </summary> + /// <param name="dataGrid">The data grid from which the user has selected tickers</param> + + + public static DataTable GetTableOfManuallySelectedTickers(DataGrid dataGrid) + { + DataTable dataTableOfDataGrid = (DataTable)dataGrid.DataSource; + DataTable tableOfSelectedTickers = new DataTable(); + TickerDataTable.AddColumnsOfTickerTable(tableOfSelectedTickers); + int indexOfRow = 0; + while(indexOfRow != dataTableOfDataGrid.Rows.Count) + { + if(dataGrid.IsSelected(indexOfRow)) + { + DataRow dataRow = tableOfSelectedTickers.NewRow(); + dataRow[0] = dataTableOfDataGrid.Rows[indexOfRow][0]; + //dataRow["tiTicker"] = dataTableOfDataGrid.Rows[indexOfRow][0]; + + dataRow[1] = dataTableOfDataGrid.Rows[indexOfRow][1]; + //dataRow["tiCompanyName"] = dataTableOfDataGrid.Rows[indexOfRow][0]; + tableOfSelectedTickers.Rows.Add(dataRow); + } + indexOfRow++; + } + return tableOfSelectedTickers; + } } |
|
From: Marco M. <mi...@us...> - 2004-06-27 19:20:39
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/DataTables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21315/b3_Data/DataTables Modified Files: TickerDataTable.cs Log Message: Changed ITickerSelector interface and consequently modified classes that implement it. Method GetTableOfSelectedTickers now has to return a DataTable (not an upper class derived from a DataTable) Index: TickerDataTable.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/DataTables/TickerDataTable.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TickerDataTable.cs 25 Apr 2004 17:28:46 -0000 1.1 --- TickerDataTable.cs 27 Jun 2004 19:20:31 -0000 1.2 *************** *** 23,26 **** --- 23,27 ---- using System; using System.Data; + using QuantProject.ADT; using QuantProject.DataAccess.Tables; *************** *** 29,39 **** /// <summary> /// The DataTable where to store tickers. - /// It has the same structure of DB's table /// </summary> public class TickerDataTable : DataTable { ! private static TickerDataTable clipboard; ! public static TickerDataTable Clipboard { get{ return TickerDataTable.clipboard; } --- 30,39 ---- /// <summary> /// The DataTable where to store tickers. /// </summary> public class TickerDataTable : DataTable { ! private static DataTable clipboard; ! public static DataTable Clipboard { get{ return TickerDataTable.clipboard; } *************** *** 41,84 **** } - - public TickerDataTable() { ! this.setStructure(); } ! private void setStructure() { ! DataColumn ticker = new DataColumn(Tickers.Ticker, System.Type.GetType("System.String")); ! ticker.Unique = true; ! ticker.AllowDBNull = false; ! DataColumn companyName = new DataColumn(Tickers.CompanyName, System.Type.GetType("System.String")); ! this.Columns.Add(ticker); ! this.Columns.Add(companyName); } ! ! public static TickerDataTable ConvertToTickerDataTable(DataTable dataTableToConvert) { ! TickerDataTable tickerDataTable = new TickerDataTable(); ! DataRow rowToAdd; try { ! foreach(DataRow row in dataTableToConvert.Rows) { ! rowToAdd = tickerDataTable.NewRow(); ! rowToAdd[Tickers.Ticker] = row[Tickers.Ticker]; ! rowToAdd[Tickers.CompanyName] = row[Tickers.CompanyName]; ! tickerDataTable.Rows.Add(rowToAdd); } ! } catch(Exception ex) { ! string notUsed = ex.ToString(); } ! return tickerDataTable; } } } --- 41,95 ---- } public TickerDataTable() { ! } ! public static void AddColumnsOfTickerTable(DataTable table) { ! try ! { ! table.Columns.Add("tiTicker", System.Type.GetType("System.String")); ! table.Columns.Add("tiCompanyName", System.Type.GetType("System.String")); ! } ! catch(Exception ex) ! { ! string notUsed = ex.ToString(); ! } } ! ! public static DataTable GetBestPerformingTickers(string groupID, ! DateTime firstQuoteDate, ! DateTime lastQuoteDate, ! long maxNumOfReturnedTickers) { ! DataTable groupOfTicker = Tickers_tickerGroups.GetTickers(groupID); ! //TO DO change to a structure compatible with TickerDataTable ! groupOfTicker.Columns.Add("SimpleReturn", System.Type.GetType("System.Double")); try { ! double firstQuote, lastQuote; ! foreach(DataRow row in groupOfTicker.Rows) { ! firstQuote = QuantProject.DataAccess.Tables.Quotes.GetAdjustedClose((string)row[0], ! firstQuoteDate); ! lastQuote = QuantProject.DataAccess.Tables.Quotes.GetAdjustedClose((string)row[0], ! lastQuoteDate); ! row["SimpleReturn"] = (lastQuote - firstQuote) / firstQuote; } ! } catch(Exception ex) { ! System.Windows.Forms.MessageBox.Show(ex.ToString()); } ! ExtendedDataTable.Sort(groupOfTicker, "SimpleReturn"); ! ExtendedDataTable.DeleteRows(groupOfTicker, maxNumOfReturnedTickers); ! return groupOfTicker; } + + } } |
|
From: Marco M. <mi...@us...> - 2004-06-27 19:20:39
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21315/b2_DataAccess/Tables Modified Files: Tickers_tickerGroups.cs Log Message: Changed ITickerSelector interface and consequently modified classes that implement it. Method GetTableOfSelectedTickers now has to return a DataTable (not an upper class derived from a DataTable) Index: Tickers_tickerGroups.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables/Tickers_tickerGroups.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Tickers_tickerGroups.cs 11 May 2004 21:55:49 -0000 1.1 --- Tickers_tickerGroups.cs 27 Jun 2004 19:20:30 -0000 1.2 *************** *** 81,87 **** } ! ! ! --- 81,94 ---- } ! /// <summary> ! /// It returns a table containing tickers of a given groupID ! /// </summary> ! public static DataTable GetTickers( string groupID) ! { ! /// TO DO use a join in order to return a table with tiTicker and company name ! return SqlExecutor.GetDataTable("SELECT " + Tickers_tickerGroups.Ticker + " FROM tickers_tickerGroups " + ! "WHERE " + Tickers_tickerGroups.GroupID + "='" + ! groupID + "'"); ! } |
|
From: Marco M. <mi...@us...> - 2004-06-27 19:16:24
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20236/b2_DataAccess/Tables Modified Files: Quotes.cs Log Message: Fixed minor bug Index: Quotes.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables/Quotes.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Quotes.cs 25 Jun 2004 14:12:23 -0000 1.12 --- Quotes.cs 27 Jun 2004 19:16:15 -0000 1.13 *************** *** 90,94 **** return dataTable.Rows.Count; } ! /// <summary> /// It provides updating the database for each closeToCloseRatio contained in the given table --- 90,107 ---- return dataTable.Rows.Count; } ! ! /// <summary> ! /// Returns the adjusted close value for the given ticker at the specified date ! /// </summary> ! /// <param name="ticker">ticker for which the adj close has to be returned</param> ! /// <returns></returns> ! public static float GetAdjustedClose( string ticker, DateTime date ) ! { ! DataTable dataTable = SqlExecutor.GetDataTable( ! "select quAdjustedClose from quotes where quTicker='" + ticker + "' " + ! "and quDate=" + SQLBuilder.GetDateConstant(date) ); ! return (float)dataTable.Rows[0][0]; ! } ! /// <summary> /// It provides updating the database for each closeToCloseRatio contained in the given table *************** *** 234,239 **** int numRows = tableDB.Rows.Count; DateTime date; ! double adjCTCInDatabase; ! double adjCTCInSource; double absoluteDifference; DataRow rowToCheck; --- 247,252 ---- int numRows = tableDB.Rows.Count; DateTime date; ! float adjCTCInDatabase; ! float adjCTCInSource; double absoluteDifference; DataRow rowToCheck; *************** *** 241,249 **** { date = (DateTime)tableDB.Rows[i][Quotes.Date]; ! adjCTCInDatabase = (double)tableDB.Rows[i][Quotes.AdjustedCloseToCloseRatio]; rowToCheck = tableSource.Rows.Find(date); if(rowToCheck != null) { ! adjCTCInSource = (double)rowToCheck[Quotes.AdjustedCloseToCloseRatio]; absoluteDifference = Math.Abs(adjCTCInDatabase - adjCTCInSource); if(absoluteDifference > ConstantsProvider.MaxDifferenceForCloseToCloseRatios ) --- 254,262 ---- { date = (DateTime)tableDB.Rows[i][Quotes.Date]; ! adjCTCInDatabase = (float)tableDB.Rows[i][Quotes.AdjustedCloseToCloseRatio]; rowToCheck = tableSource.Rows.Find(date); if(rowToCheck != null) { ! adjCTCInSource = (float)rowToCheck[Quotes.AdjustedCloseToCloseRatio]; absoluteDifference = Math.Abs(adjCTCInDatabase - adjCTCInSource); if(absoluteDifference > ConstantsProvider.MaxDifferenceForCloseToCloseRatios ) |
|
From: Marco M. <mi...@us...> - 2004-06-27 19:15:11
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19992/b1_ADT Modified Files: ExtendedDataTable.cs b1_ADT.csproj Log Message: Added Sort and Delete static methods to the class Index: b1_ADT.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b1_ADT/b1_ADT.csproj,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** b1_ADT.csproj 28 Mar 2004 20:12:16 -0000 1.6 --- b1_ADT.csproj 27 Jun 2004 19:15:02 -0000 1.7 *************** *** 98,101 **** --- 98,106 ---- /> <File + RelPath = "ExtendedDataTable.cs" + SubType = "Component" + BuildAction = "Compile" + /> + <File RelPath = "ExtendedDateTime.cs" SubType = "Code" Index: ExtendedDataTable.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b1_ADT/ExtendedDataTable.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ExtendedDataTable.cs 25 Jun 2004 14:10:08 -0000 1.1 --- ExtendedDataTable.cs 27 Jun 2004 19:15:02 -0000 1.2 *************** *** 15,18 **** --- 15,51 ---- // } + + /// <summary> + /// Sort the given DataTable by the specified field, in a DESC mode + /// </summary> + + public static void Sort(DataTable tableToSort, string sortingFieldName) + { + DataTable copyOfTableToSort = tableToSort.Copy(); + DataRow[] orderedRows = copyOfTableToSort.Select("", sortingFieldName + " DESC"); + int numRows = tableToSort.Rows.Count; + int numColumns = tableToSort.Columns.Count; + object[] valuesToAdd = new object[numColumns]; + tableToSort.Rows.Clear(); + for(int i = 0;i<numRows;i++) + { + for(int j = 0;j<numColumns;j++) + { + valuesToAdd[j]=orderedRows[i][j]; + } + tableToSort.Rows.Add(valuesToAdd); + } + tableToSort.AcceptChanges(); + + } + public static void DeleteRows(DataTable tableWithRowsToDelete, long indexOfRowFromWhichDeletionHasToBeDone) + { + for(long i = indexOfRowFromWhichDeletionHasToBeDone;i<tableWithRowsToDelete.Rows.Count;i++) + { + tableWithRowsToDelete.Rows.RemoveAt((int)i); + } + tableWithRowsToDelete.AcceptChanges(); + } + } } |
|
From: Glauco S. <gla...@us...> - 2004-06-25 14:12:31
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31005/b2_DataAccess/Tables Modified Files: Quotes.cs Log Message: Added the order by clause to the select statement Index: Quotes.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables/Quotes.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Quotes.cs 19 Jun 2004 01:07:32 -0000 1.11 --- Quotes.cs 25 Jun 2004 14:12:23 -0000 1.12 *************** *** 498,503 **** "select * from quotes " + "where " + Quotes.TickerFieldName + "='" + ticker + "' " + ! "and " + Quotes.Date + ">=" + SQLBuilder.GetDateConstant( startDate ) + ! "and " + Quotes.Date + "<=" + SQLBuilder.GetDateConstant( endDate ); SqlExecutor.SetDataTable( sql , dataTable ); } --- 498,504 ---- "select * from quotes " + "where " + Quotes.TickerFieldName + "='" + ticker + "' " + ! "and " + Quotes.Date + ">=" + SQLBuilder.GetDateConstant( startDate ) + " " + ! "and " + Quotes.Date + "<=" + SQLBuilder.GetDateConstant( endDate ) + " " + ! "order by " + Quotes.Date; SqlExecutor.SetDataTable( sql , dataTable ); } |
|
From: Glauco S. <gla...@us...> - 2004-06-25 14:10:17
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30476/b1_ADT Added Files: ExtendedDataTable.cs Log Message: Extended DataTable --- NEW FILE: ExtendedDataTable.cs --- using System; using System.Data; namespace QuantProject.ADT { /// <summary> /// Extended DataTable /// </summary> public class ExtendedDataTable : DataTable { public ExtendedDataTable() { // // TODO: Add constructor logic here // } } } |