quantproject-developers Mailing List for QuantProject (Page 119)
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...> - 2005-01-20 01:26:03
|
Update of /cvsroot/quantproject/QuantProject/b5_Presentation/Reporting/WindowsForm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5166/b5_Presentation/Reporting/WindowsForm Modified Files: EquityChartTabPage.cs Log Message: The benchmark buy and hold equity line has been added to the report Index: EquityChartTabPage.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b5_Presentation/Reporting/WindowsForm/EquityChartTabPage.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EquityChartTabPage.cs 1 Aug 2004 00:31:53 -0000 1.2 --- EquityChartTabPage.cs 20 Jan 2005 01:25:54 -0000 1.3 *************** *** 21,27 **** --- 21,31 ---- */ using System; + using System.Drawing; using System.Windows.Forms; using QuantProject.ADT.Histories; + using QuantProject.Data.DataProviders; + using QuantProject.Business.DataProviders; using QuantProject.Business.Financial.Accounting.Reporting; + using QuantProject.Business.Timing; using QuantProject.Presentation.Charting; *************** *** 35,39 **** private AccountReport accountReport; private Chart equityChart; ! public EquityChartTabPage( AccountReport accountReport ) { --- 39,65 ---- private AccountReport accountReport; private Chart equityChart; ! private History equity = new History(); ! private History benchmark; ! ! /// <summary> ! /// Returns the history for the BuyAndHoldTicker, normalized for ! /// a proper display, that is, to be displayed overlapped to ! /// the equity line ! /// </summary> ! /// <returns></returns> ! private History getBenchmark() ! { ! History buyAndHoldTickerEquityLine = ! HistoricalDataProvider.GetAdjustedCloseHistory( ! this.accountReport.BuyAndHoldTicker ); ! HistoricalAdjustedQuoteProvider quoteProvider = ! new HistoricalAdjustedQuoteProvider(); ! DateTime firstDate = (DateTime)this.equity.GetKey( 0 ); ! double normalizingFactor = ! ( double )this.equity[ firstDate ] / ! ( double )quoteProvider.GetMarketValue( this.accountReport.BuyAndHoldTicker , ! new EndOfDayDateTime( firstDate , EndOfDaySpecificTime.MarketClose ) ); ! return buyAndHoldTickerEquityLine.MultiplyBy( normalizingFactor ); ! } public EquityChartTabPage( AccountReport accountReport ) { *************** *** 42,50 **** this.equityChart = new Chart(); this.equityChart.Dock = DockStyle.Fill; ! History historyToBeCharted = new History(); ! historyToBeCharted.Import( this.accountReport.Equity.DataTable , QuantProject.Business.Financial.Accounting.Reporting.Tables.Equity.Date , QuantProject.Business.Financial.Accounting.Reporting.Tables.Equity.AccountValue ); ! this.equityChart.Add( historyToBeCharted ); this.Controls.Add( this.equityChart ); } --- 68,78 ---- this.equityChart = new Chart(); this.equityChart.Dock = DockStyle.Fill; ! this.equity.Import( this.accountReport.Equity.DataTable , QuantProject.Business.Financial.Accounting.Reporting.Tables.Equity.Date , QuantProject.Business.Financial.Accounting.Reporting.Tables.Equity.AccountValue ); ! this.equityChart.Add( equity , Color.Red ); ! this.benchmark = this.getBenchmark(); ! this.equityChart.Add( benchmark , Color.Blue , (DateTime)this.equity.GetKey( 0 ) , ! (DateTime)this.equity.GetKey( this.equity.Count - 1 ) ); this.Controls.Add( this.equityChart ); } |
|
From: Glauco S. <gla...@us...> - 2005-01-20 01:22:42
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT/Histories In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4478/b1_ADT/Histories Modified Files: History.cs Log Message: The method MultiplyBy has been added Index: History.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b1_ADT/Histories/History.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** History.cs 11 Jan 2004 19:09:11 -0000 1.6 --- History.cs 20 Jan 2005 01:22:31 -0000 1.7 *************** *** 82,85 **** --- 82,122 ---- } + + #region MultiplyBy + private double multiplyBy_getCurrentValue( DateTime key ) + { + double returnValue; + try + { + returnValue = Convert.ToDouble( this[ key ] ); + } + catch ( Exception exception ) + { + string errorMessage = "The current History object contains a value " + + "that cannot be converted to a double. The wrong value is at the date " + + key.ToString() + ".\nOriginal error message: " + exception.Message; + throw new Exception( errorMessage ); + } + return returnValue; + } + /// <summary> + /// Returns an history where each value is multiplied by the given factor. + /// The History instance must contain only numeric values + /// </summary> + /// <param name="factor"></param> + /// <returns></returns> + public History MultiplyBy( double factor ) + { + if ( factor == 0.0 ) + throw new Exception( "factor can not be equal to zero" ); + History returnValue = new History(); + foreach ( DateTime key in this.Keys ) + { + double currentValue = this.multiplyBy_getCurrentValue( key ); + returnValue.Add( key , currentValue * factor ); + } + return returnValue; + } + #endregion public DateTime GetNextDay( DateTime dateTime ) { |
|
From: Glauco S. <gla...@us...> - 2005-01-20 01:21:33
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/DataProviders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4264/b3_Data/DataProviders Modified Files: HistoricalDataProvider.cs Log Message: Minor code cleaning Index: HistoricalDataProvider.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/DataProviders/HistoricalDataProvider.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** HistoricalDataProvider.cs 9 Jan 2005 22:36:19 -0000 1.6 --- HistoricalDataProvider.cs 20 Jan 2005 01:21:21 -0000 1.7 *************** *** 85,94 **** // } // - public static History GetOpenHistory( string instrumentKey ) - { - return (History)((Hashtable)cachedHistories[ instrumentKey ])[ - BarComponent.Open ]; - } - private static History getHistory( string instrumentKey , QuoteField quoteField ) { --- 85,88 ---- *************** *** 103,106 **** --- 97,105 ---- } + public static History GetOpenHistory( string instrumentKey ) + { + return getHistory( instrumentKey , QuoteField.Open ); + } + public static History GetCloseHistory( string instrumentKey ) { *************** *** 118,121 **** --- 117,125 ---- } + public static History GetAdjustedCloseHistory( string instrumentKey ) + { + return getHistory( instrumentKey , QuoteField.AdjustedClose ); + } + private static void cache( string instrumentKey , QuoteField quoteField ) { |
|
From: Glauco S. <gla...@us...> - 2005-01-20 01:19:34
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3810/b7_Scripts/WalkForwardTesting/WalkForwardOneRank Modified Files: ComparableAccount.cs Log Message: - bug fixed: proper max acceptable drop down is used now - bug fixed: proper fitness value is computed now Index: ComparableAccount.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank/ComparableAccount.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ComparableAccount.cs 9 Jan 2005 22:17:19 -0000 1.4 --- ComparableAccount.cs 20 Jan 2005 01:19:24 -0000 1.5 *************** *** 36,40 **** public class ComparableAccount : Account { ! private double maxAcceptableDrawDown = 0.3; private IHistoricalQuoteProvider historicalQuoteProvider = --- 36,40 ---- public class ComparableAccount : Account { ! private double maxAcceptableDrawDown = 30; private IHistoricalQuoteProvider historicalQuoteProvider = *************** *** 70,74 **** else // max draw down is acceptable and the strategy is better than buy and hold ! returnValue = this.accountReport.Summary.TotalPnl - this.accountReport.Summary.BuyAndHoldPercentageReturn; return returnValue; --- 70,74 ---- else // max draw down is acceptable and the strategy is better than buy and hold ! returnValue = this.accountReport.Summary.ReturnOnAccount - this.accountReport.Summary.BuyAndHoldPercentageReturn; return returnValue; |
|
From: Glauco S. <gla...@us...> - 2005-01-20 01:17:27
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3375/b7_Scripts/WalkForwardTesting/WalkForwardOneRank Modified Files: ChosenTickers.cs Log Message: Bug fixed: tickers are chosen among best performing, now Index: ChosenTickers.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank/ChosenTickers.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ChosenTickers.cs 9 Jan 2005 22:16:23 -0000 1.4 --- ChosenTickers.cs 20 Jan 2005 01:17:16 -0000 1.5 *************** *** 63,69 **** Account account ) { ! int index = bestPerformingTickers.Count - 1; while ( ( this.Count < this.numberTickersToBeChosen ) && ! ( index >= 0) ) { string ticker = ((Account)bestPerformingTickers[ index ]).Key; --- 63,69 ---- Account account ) { ! int index = 0; while ( ( this.Count < this.numberTickersToBeChosen ) && ! ( index <= ( bestPerformingTickers.Count - 1 ) ) ) { string ticker = ((Account)bestPerformingTickers[ index ]).Key; *************** *** 71,75 **** setTickers_build_handleTicker( ticker , account ); ! index--; } } --- 71,75 ---- setTickers_build_handleTicker( ticker , account ); ! index++; } } |
|
From: Glauco S. <gla...@us...> - 2005-01-20 01:16:12
|
Update of /cvsroot/quantproject/QuantProject/b5_Presentation/Charting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3005/b5_Presentation/Charting Modified Files: Chart.cs Log Message: New constructors have been added Index: Chart.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b5_Presentation/Charting/Chart.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Chart.cs 1 Aug 2004 00:27:14 -0000 1.3 --- Chart.cs 20 Jan 2005 01:15:53 -0000 1.4 *************** *** 52,61 **** /// </summary> /// <param name="history">History for the new ChartPlot</param> ! public void Add( History history ) ! { ! ChartPlot chartPlot = new ChartPlot( history ); ! this.chartPlots.Add( chartPlot ); ! } ! /// <summary> /// Adds a new ChartPlot to the Chart, using the given arguments for the Color, /// the StartDate and the EndDate --- 52,66 ---- /// </summary> /// <param name="history">History for the new ChartPlot</param> ! public void Add( History history ) ! { ! ChartPlot chartPlot = new ChartPlot( history , Color.Red ); ! this.chartPlots.Add( chartPlot ); ! } ! public void Add( History history , Color color ) ! { ! ChartPlot chartPlot = new ChartPlot( history , color ); ! this.chartPlots.Add( chartPlot ); ! } ! /// <summary> /// Adds a new ChartPlot to the Chart, using the given arguments for the Color, /// the StartDate and the EndDate |
|
From: Glauco S. <gla...@us...> - 2005-01-20 01:15:27
|
Update of /cvsroot/quantproject/QuantProject/b5_Presentation/Charting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2851/b5_Presentation/Charting Modified Files: CharPlot.cs Log Message: Several new constructors have been added Index: CharPlot.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b5_Presentation/Charting/CharPlot.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CharPlot.cs 24 Jan 2004 19:27:15 -0000 1.1 --- CharPlot.cs 20 Jan 2005 01:15:15 -0000 1.2 *************** *** 60,77 **** } - public ChartPlot( History history ) - { - this.history = history; - this.color = Color.Red; - this.startDateTime = (DateTime)this.history.GetKey( 0 ); - this.endDateTime = (DateTime)this.history.GetKey( this.history.Count - 1 ); - } ! public ChartPlot( History history , Color color , DateTime startDateTime , DateTime endDateTime ) { ! this.history = history; ! this.color = color; ! this.startDateTime = startDateTime; ! this.endDateTime = endDateTime; } } --- 60,86 ---- } ! private void chartPlot( History history , Color color , ! DateTime startDateTime , DateTime endDateTime ) ! { ! this.history = history; ! this.color = color; ! this.startDateTime = startDateTime; ! this.endDateTime = endDateTime; ! } ! public ChartPlot( History history , Color color ) ! { ! this.chartPlot( history , color , ! (DateTime)history.GetKey( 0 ) , (DateTime)history.GetKey( history.Count - 1 ) ); ! } ! ! // public ChartPlot( History history ) ! // { ! // ChartPlot( history , Color.Red ); ! // } ! ! public ChartPlot( History history , Color color , DateTime startDateTime , DateTime endDateTime ) { ! this.chartPlot( history , color , startDateTime , endDateTime ); } } |
|
From: Glauco S. <gla...@us...> - 2005-01-20 01:14:30
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2563/b7_Scripts/WalkForwardTesting/WalkForwardOneRank Modified Files: BestPerformingTickers.cs Log Message: Best performing tickers are actually chosen now Index: BestPerformingTickers.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank/BestPerformingTickers.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** BestPerformingTickers.cs 9 Jan 2005 22:13:12 -0000 1.6 --- BestPerformingTickers.cs 20 Jan 2005 01:14:20 -0000 1.7 *************** *** 96,100 **** } this.eligibleAccounts.Sort(); ! for ( int index=this.numberBestPerformingTickers - 1 ; index >= 0 ; index-- ) this.Add( this.eligibleAccounts[ index ] ); } --- 96,102 ---- } this.eligibleAccounts.Sort(); ! for ( int index=this.eligibleAccounts.Count - 1 ; ! index >= this.eligibleAccounts.Count - this.numberBestPerformingTickers ; ! index-- ) this.Add( this.eligibleAccounts[ index ] ); } |
|
From: Glauco S. <gla...@us...> - 2005-01-20 01:11:47
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1799/b7_Scripts Modified Files: b7_Scripts.csproj Log Message: Useless changes, required by a known bug of the development tool we use. Index: b7_Scripts.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/b7_Scripts.csproj,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** b7_Scripts.csproj 9 Jan 2005 20:01:55 -0000 1.17 --- b7_Scripts.csproj 20 Jan 2005 01:11:33 -0000 1.18 *************** *** 74,82 **** /> <Reference - Name = "ADT" - Project = "{B8A01161-3698-4591-B1EF-90F5FC7D8DBA}" - Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" - /> - <Reference Name = "b4_Business" Project = "{6EE31501-376E-491B-869E-F06D5B7C9C30}" --- 74,77 ---- *************** *** 84,92 **** /> <Reference - Name = "b5_Presentation" - Project = "{D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}" - Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" - /> - <Reference Name = "System.Windows.Forms" AssemblyName = "System.Windows.Forms" --- 79,82 ---- *************** *** 103,106 **** --- 93,106 ---- HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll" /> + <Reference + Name = "b5_Presentation" + Project = "{D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> + <Reference + Name = "b1_ADT" + Project = "{B8A01161-3698-4591-B1EF-90F5FC7D8DBA}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> </References> </Build> |
|
From: Glauco S. <gla...@us...> - 2005-01-20 01:11:47
|
Update of /cvsroot/quantproject/QuantProject/b5_Presentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1799/b5_Presentation Modified Files: b5_Presentation.csproj Log Message: Useless changes, required by a known bug of the development tool we use. Index: b5_Presentation.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b5_Presentation/b5_Presentation.csproj,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** b5_Presentation.csproj 20 Dec 2004 00:09:51 -0000 1.16 --- b5_Presentation.csproj 20 Jan 2005 01:11:32 -0000 1.17 *************** *** 121,129 **** /> <Reference - Name = "b1_ADT" - Project = "{B8A01161-3698-4591-B1EF-90F5FC7D8DBA}" - Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" - /> - <Reference Name = "Microsoft.Office.Core" Guid = "{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}" --- 121,124 ---- *************** *** 134,140 **** /> <Reference Name = "scpl" AssemblyName = "scpl" ! HintPath = "..\b91_QuantProject\bin\Debug\scpl.dll" /> </References> --- 129,145 ---- /> <Reference + Name = "b3_Data" + Project = "{6AC0A2C1-B926-4921-A685-F5AA80E81C94}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> + <Reference + Name = "b1_ADT" + Project = "{B8A01161-3698-4591-B1EF-90F5FC7D8DBA}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> + <Reference Name = "scpl" AssemblyName = "scpl" ! HintPath = "..\..\QuantDownloader\Downloader\bin\Debug\scpl.dll" /> </References> |
|
From: Glauco S. <gla...@us...> - 2005-01-20 01:11:47
|
Update of /cvsroot/quantproject/QuantProject/b4_Business In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1799/b4_Business Modified Files: b4_Business.csproj Log Message: Useless changes, required by a known bug of the development tool we use. Index: b4_Business.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/b4_Business.csproj,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** b4_Business.csproj 9 Jan 2005 19:44:45 -0000 1.17 --- b4_Business.csproj 20 Jan 2005 01:11:32 -0000 1.18 *************** *** 74,82 **** /> <Reference - Name = "b1_ADT" - Project = "{B8A01161-3698-4591-B1EF-90F5FC7D8DBA}" - Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" - /> - <Reference Name = "b3_Data" Project = "{6AC0A2C1-B926-4921-A685-F5AA80E81C94}" --- 74,77 ---- *************** *** 138,141 **** --- 133,141 ---- WrapperTool = "primary" /> + <Reference + Name = "b1_ADT" + Project = "{B8A01161-3698-4591-B1EF-90F5FC7D8DBA}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> </References> </Build> |
|
From: Glauco S. <gla...@us...> - 2005-01-20 01:11:47
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1799/b2_DataAccess Modified Files: b2_DataAccess.csproj Log Message: Useless changes, required by a known bug of the development tool we use. Index: b2_DataAccess.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/b2_DataAccess.csproj,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** b2_DataAccess.csproj 9 Jan 2005 19:41:54 -0000 1.13 --- b2_DataAccess.csproj 20 Jan 2005 01:11:32 -0000 1.14 *************** *** 74,86 **** /> <Reference - Name = "b1_ADT" - Project = "{B8A01161-3698-4591-B1EF-90F5FC7D8DBA}" - Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" - /> - <Reference Name = "System.Windows.Forms" AssemblyName = "System.Windows.Forms" HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll" /> </References> </Build> --- 74,86 ---- /> <Reference Name = "System.Windows.Forms" AssemblyName = "System.Windows.Forms" HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll" /> + <Reference + Name = "b1_ADT" + Project = "{B8A01161-3698-4591-B1EF-90F5FC7D8DBA}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> </References> </Build> |
|
From: Glauco S. <gla...@us...> - 2005-01-20 01:11:47
|
Update of /cvsroot/quantproject/QuantProject/b3_Data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1799/b3_Data Modified Files: b3_Data.csproj Log Message: Useless changes, required by a known bug of the development tool we use. Index: b3_Data.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/b3_Data.csproj,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** b3_Data.csproj 9 Jan 2005 19:45:49 -0000 1.21 --- b3_Data.csproj 20 Jan 2005 01:11:32 -0000 1.22 *************** *** 74,82 **** /> <Reference - Name = "ADT" - Project = "{B8A01161-3698-4591-B1EF-90F5FC7D8DBA}" - Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" - /> - <Reference Name = "b2_DataAccess" Project = "{8CF7C0D8-A8CB-43DC-B406-77DE62729487}" --- 74,77 ---- *************** *** 133,136 **** --- 128,136 ---- WrapperTool = "primary" /> + <Reference + Name = "b1_ADT" + Project = "{B8A01161-3698-4591-B1EF-90F5FC7D8DBA}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> </References> </Build> |
|
From: Glauco S. <gla...@us...> - 2005-01-20 01:11:47
|
Update of /cvsroot/quantproject/QuantProject/b91_QuantProject In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1799/b91_QuantProject Modified Files: b91_QuantProject.csproj Log Message: Useless changes, required by a known bug of the development tool we use. Index: b91_QuantProject.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b91_QuantProject/b91_QuantProject.csproj,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** b91_QuantProject.csproj 1 Dec 2004 15:42:54 -0000 1.5 --- b91_QuantProject.csproj 20 Jan 2005 01:11:33 -0000 1.6 *************** *** 84,92 **** /> <Reference - Name = "b1_ADT" - Project = "{B8A01161-3698-4591-B1EF-90F5FC7D8DBA}" - Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" - /> - <Reference Name = "b4_Business" Project = "{6EE31501-376E-491B-869E-F06D5B7C9C30}" --- 84,87 ---- |
|
From: Marco M. <mi...@us...> - 2005-01-15 10:56:13
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24121/b7_Scripts/TickerSelectionTesting Modified Files: EndOfDayTimerHandler.cs RunEfficientCTOPortfolio.cs Log Message: Setted the RunEfficientCTOPortfolio script to be tested on 2000. Index: EndOfDayTimerHandler.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/EndOfDayTimerHandler.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** EndOfDayTimerHandler.cs 8 Jan 2005 11:59:14 -0000 1.7 --- EndOfDayTimerHandler.cs 15 Jan 2005 10:56:02 -0000 1.8 *************** *** 86,90 **** long quantity = Convert.ToInt64( Math.Floor( cashForSinglePosition / this.account.DataStreamer.GetCurrentBid( ticker ) ) ); ! Order order = new Order( OrderType.MarketBuy , new Instrument( ticker ) , quantity ); this.orders.Add(order); } --- 86,90 ---- long quantity = Convert.ToInt64( Math.Floor( cashForSinglePosition / this.account.DataStreamer.GetCurrentBid( ticker ) ) ); ! Order order = new Order( OrderType.MarketBuy, new Instrument( ticker ) , quantity ); this.orders.Add(order); } *************** *** 170,174 **** DataTable setOfTickersToBeOptimized = quotedInEachMarketDayFromMostLiquid.GetTableOfSelectedTickers(); ! // to check this: it doesn't work ! IGenomeManager genManEfficientCTOPortfolio = new GenomeManagerForEfficientCTOPortfolio(setOfTickersToBeOptimized, currentDate.AddDays(-30), --- 170,174 ---- DataTable setOfTickersToBeOptimized = quotedInEachMarketDayFromMostLiquid.GetTableOfSelectedTickers(); ! IGenomeManager genManEfficientCTOPortfolio = new GenomeManagerForEfficientCTOPortfolio(setOfTickersToBeOptimized, currentDate.AddDays(-30), Index: RunEfficientCTOPortfolio.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/RunEfficientCTOPortfolio.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** RunEfficientCTOPortfolio.cs 9 Jan 2005 23:44:53 -0000 1.8 --- RunEfficientCTOPortfolio.cs 15 Jan 2005 10:56:03 -0000 1.9 *************** *** 83,87 **** new DateTime( 2000 , 1 , 1 ) , EndOfDaySpecificTime.FiveMinutesBeforeMarketClose ); this.endDateTime = new EndOfDayDateTime( ! new DateTime( 2000 , 1 , 10 ) , EndOfDaySpecificTime.OneHourAfterMarketClose ); this.numIntervalDays = 7; } --- 83,87 ---- new DateTime( 2000 , 1 , 1 ) , EndOfDaySpecificTime.FiveMinutesBeforeMarketClose ); this.endDateTime = new EndOfDayDateTime( ! new DateTime( 2000 , 12 , 31 ) , EndOfDaySpecificTime.OneHourAfterMarketClose ); this.numIntervalDays = 7; } *************** *** 124,128 **** private void run_initializeEndOfDayTimerHandler() { ! this.endOfDayTimerHandler = new EndOfDayTimerHandler("STOCKMI",70,6,this.account,10); } /* --- 124,128 ---- private void run_initializeEndOfDayTimerHandler() { ! this.endOfDayTimerHandler = new EndOfDayTimerHandler("STOCKMI",70,6,this.account,7); } /* |
|
From: Marco M. <mi...@us...> - 2005-01-15 10:54:34
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a05_Timing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23847/b4_Business/a05_Timing Modified Files: HistoricalEndOfDayTimer.cs IndexBasedEndOfDayTimer.cs Log Message: Reorganized the classes, in order to avoid code duplication (the virtual method Start() has been divided into sub-methods) Index: HistoricalEndOfDayTimer.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a05_Timing/HistoricalEndOfDayTimer.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** HistoricalEndOfDayTimer.cs 8 Jan 2005 11:38:53 -0000 1.4 --- HistoricalEndOfDayTimer.cs 15 Jan 2005 10:54:14 -0000 1.5 *************** *** 53,60 **** // } ! public virtual event MarketOpenEventHandler MarketOpen; ! public virtual event FiveMinutesBeforeMarketCloseEventHandler FiveMinutesBeforeMarketClose; ! public virtual event MarketCloseEventHandler MarketClose; ! public virtual event OneHourAfterMarketCloseEventHandler OneHourAfterMarketClose; public HistoricalEndOfDayTimer( EndOfDayDateTime startDateTime ) --- 53,60 ---- // } ! public event MarketOpenEventHandler MarketOpen; ! public event FiveMinutesBeforeMarketCloseEventHandler FiveMinutesBeforeMarketClose; ! public event MarketCloseEventHandler MarketClose; ! public event OneHourAfterMarketCloseEventHandler OneHourAfterMarketClose; public HistoricalEndOfDayTimer( EndOfDayDateTime startDateTime ) *************** *** 64,68 **** --- 64,94 ---- this.tickers = new Hashtable(); } + + protected void callEvents() + { + if ( ( this.MarketOpen != null ) && ( this.currentTime.EndOfDaySpecificTime == + EndOfDaySpecificTime.MarketOpen ) ) + this.MarketOpen( this , new EndOfDayTimingEventArgs( this.currentTime ) ); + if ( ( this.FiveMinutesBeforeMarketClose != null ) && ( this.currentTime.EndOfDaySpecificTime == + EndOfDaySpecificTime.FiveMinutesBeforeMarketClose ) ) + this.FiveMinutesBeforeMarketClose( this , new EndOfDayTimingEventArgs( this.currentTime ) ); + if ( ( this.MarketClose != null ) && ( this.currentTime.EndOfDaySpecificTime == + EndOfDaySpecificTime.MarketClose ) ) + this.MarketClose( this , new EndOfDayTimingEventArgs( this.currentTime ) ); + if ( ( this.OneHourAfterMarketClose != null ) && ( this.currentTime.EndOfDaySpecificTime == + EndOfDaySpecificTime.OneHourAfterMarketClose ) ) + this.OneHourAfterMarketClose( this , new EndOfDayTimingEventArgs( this.currentTime ) ); + } + protected virtual void moveNext() + { + this.currentTime.MoveNext(); + } + + protected virtual void activeTimer() + { + this.isActive = true; + this.currentTime = this.startDateTime.Copy(); + } /// <summary> /// Starts the time walking simulation *************** *** 70,90 **** public virtual void Start() { ! this.isActive = true; ! this.currentTime = this.startDateTime.Copy(); while ( this.isActive ) { ! if ( ( this.MarketOpen != null ) && ( this.currentTime.EndOfDaySpecificTime == ! EndOfDaySpecificTime.MarketOpen ) ) ! this.MarketOpen( this , new EndOfDayTimingEventArgs( this.currentTime ) ); ! if ( ( this.FiveMinutesBeforeMarketClose != null ) && ( this.currentTime.EndOfDaySpecificTime == ! EndOfDaySpecificTime.FiveMinutesBeforeMarketClose ) ) ! this.FiveMinutesBeforeMarketClose( this , new EndOfDayTimingEventArgs( this.currentTime ) ); ! if ( ( this.MarketClose != null ) && ( this.currentTime.EndOfDaySpecificTime == ! EndOfDaySpecificTime.MarketClose ) ) ! this.MarketClose( this , new EndOfDayTimingEventArgs( this.currentTime ) ); ! if ( ( this.OneHourAfterMarketClose != null ) && ( this.currentTime.EndOfDaySpecificTime == ! EndOfDaySpecificTime.OneHourAfterMarketClose ) ) ! this.OneHourAfterMarketClose( this , new EndOfDayTimingEventArgs( this.currentTime ) ); ! this.currentTime.MoveNext(); } } --- 96,104 ---- public virtual void Start() { ! this.activeTimer(); while ( this.isActive ) { ! this.callEvents(); ! this.moveNext(); } } Index: IndexBasedEndOfDayTimer.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a05_Timing/IndexBasedEndOfDayTimer.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IndexBasedEndOfDayTimer.cs 8 Jan 2005 11:44:33 -0000 1.1 --- IndexBasedEndOfDayTimer.cs 15 Jan 2005 10:54:20 -0000 1.2 *************** *** 41,49 **** private Quotes indexQuotes; - public override event MarketOpenEventHandler MarketOpen; - public override event FiveMinutesBeforeMarketCloseEventHandler FiveMinutesBeforeMarketClose; - public override event MarketCloseEventHandler MarketClose; - public override event OneHourAfterMarketCloseEventHandler OneHourAfterMarketClose; - public IndexBasedEndOfDayTimer( EndOfDayDateTime startDateTime, string marketIndex): base(startDateTime) --- 41,44 ---- *************** *** 62,96 **** public override void Start() { ! this.isActive = true; ! this.currentTime = this.startDateTime.Copy(); while ( this.isActive ) { ! if ( ( this.MarketOpen != null ) && ( this.currentTime.EndOfDaySpecificTime == ! EndOfDaySpecificTime.MarketOpen ) ) ! this.MarketOpen( this , new EndOfDayTimingEventArgs( this.currentTime ) ); ! if ( ( this.FiveMinutesBeforeMarketClose != null ) && ( this.currentTime.EndOfDaySpecificTime == ! EndOfDaySpecificTime.FiveMinutesBeforeMarketClose ) ) ! this.FiveMinutesBeforeMarketClose( this , new EndOfDayTimingEventArgs( this.currentTime ) ); ! if ( ( this.MarketClose != null ) && ( this.currentTime.EndOfDaySpecificTime == ! EndOfDaySpecificTime.MarketClose ) ) ! this.MarketClose( this , new EndOfDayTimingEventArgs( this.currentTime ) ); ! if ( ( this.OneHourAfterMarketClose != null ) && ( this.currentTime.EndOfDaySpecificTime == ! EndOfDaySpecificTime.OneHourAfterMarketClose ) ) ! this.OneHourAfterMarketClose( this , new EndOfDayTimingEventArgs( this.currentTime ) ); ! this.moveNext(this.currentTime); } } //move the current endOfDayDateTime to the next moment //at which the market is surely open ! private void moveNext( EndOfDayDateTime endOfDayDateTimeToMove) { ! EndOfDaySpecificTime nextSpecificTime = endOfDayDateTimeToMove.GetNextEndOfDaySpecificTime(); ! if ( nextSpecificTime < endOfDayDateTimeToMove.EndOfDaySpecificTime ) { // the current end of day specific time is the last end of day specific time in the day ! endOfDayDateTimeToMove.DateTime = ! this.indexQuotes.GetFollowingDate(endOfDayDateTimeToMove.DateTime, 1); } ! endOfDayDateTimeToMove.EndOfDaySpecificTime = nextSpecificTime; } --- 57,79 ---- public override void Start() { ! base.activeTimer(); while ( this.isActive ) { ! base.callEvents(); ! this.moveNext(); } } //move the current endOfDayDateTime to the next moment //at which the market is surely open ! protected override void moveNext() { ! EndOfDaySpecificTime nextSpecificTime = this.currentTime.GetNextEndOfDaySpecificTime(); ! if ( nextSpecificTime < this.currentTime.EndOfDaySpecificTime ) { // the current end of day specific time is the last end of day specific time in the day ! this.currentTime.DateTime = ! this.indexQuotes.GetFollowingDate(this.currentTime.DateTime, 1); } ! this.currentTime.EndOfDaySpecificTime = nextSpecificTime; } |
|
From: Glauco S. <gl...@my...> - 2005-01-11 18:19:23
|
At 06:56 PM 1/10/2005 +0100, you wrote:
> >if ( this.accountReport =3D=3D null )
> >// the account report has not been computed yet
> >{
> > AccountReport accountReport =3D new AccountReport( this ,
> > new HistoricalAdjustedQuoteProvider() );
> > this.accountReport =3D accountReport.Create( this.Key ,
> > 1 , this.endOfDayTimer.GetCurrentTime() );
> >}
>
>Non =E8 che, per caso, il problema che ho riscontrato sia dovuto al fatto=
=20
>che l'account report, nel ricreare la storia dell'account, utilizza=20
>l'AdjustedQuoteProvider mentre il mio script si basa sul RawQuoteProvider?
No, lo usa solo nel GetFitnessValue, che non dovrebbe essere mai chiamata=20
nella classe base Account (o comunque, modificata in futuro).
>Domanda: in teoria non sarebbe meglio che l'unico parametro per il=20
>costruttore dell'account report fosse l'account stesso e basta (cos=EC=20
>saremmo sicuri che il tipo di IHistoricalQuoteProvider utilizzato sarebbe=
=20
>lo stesso dell'account - che immagino usi da qualche parte un=20
>IHistoricalQuoteProvider)?
L'Account non usa alcun IHistoricalQuoteProvider (dopo averci pensato per=20
un po' di tempo, non sono riuscito a trovare un motivo ragionevole per cui=
=20
un Account dovrebbe avere un IHistoricalQuoteProvider).
|
|
From: marco\.milletti\@l <mar...@li...> - 2005-01-10 17:57:11
|
> - the CreateReport method uses the the IHistoricalQuoteProvider "conc=
ept"
> now
>if ( this.accountReport =3D=3D null )
>// the account re=
port has not been computed yet
>{
> AccountReport accountReport =3D n=
ew AccountReport( this ,
> new HistoricalAdjustedQuoteProvider() );=0D
=
> this.accountReport =3D accountReport.Create( this.Key ,
> 1 , this.=
endOfDayTimer.GetCurrentTime() );
>}
Non =E8 che, per caso, il proble=
ma che ho riscontrato sia dovuto al fatto che l'account report, nel ricre=
are la storia dell'account, utilizza l'AdjustedQuoteProvider mentre il mi=
o script si basa sul RawQuoteProvider?
Domanda: in teoria non sarebbe =
meglio che l'unico parametro per il costruttore dell'account report fosse=
l'account stesso e basta (cos=EC saremmo sicuri che il tipo di IHistoric=
alQuoteProvider utilizzato sarebbe lo stesso dell'account - che immagino =
usi da qualche parte un IHistoricalQuoteProvider)?
=0A=0A=0A=0A_______=
_____________________________________________________=0ALibero ADSL: 3 me=
si gratis e navighi a 1.2 Mega. E poi hai l'Adsl senza limiti a meno di 1=
euro al giorno. =0AAbbonati subito senza costi di attivazione su http://=
www.libero.it=0A=0A
|
|
From: marco\.milletti\@l <mar...@li...> - 2005-01-10 13:29:52
|
> ! }
> ! /// <summary>
> ! /// Returns the adjusted market value=
for the given ticker, at the given ExtendedDateTime
> ! /// </summary=
>
> ! /// <param name=3D"instrumentKey">instrument identifier</param>=0D
=
> ! /// <param name=3D"extendedDateTime"></param>
> ! /// <returns><=
/returns>
> ! public static double GetAdjustedMarketValue( string inst=
rumentKey , ExtendedDateTime extendedDateTime )
> ! {
> ! double r=
eturnValue;
> ! double adjustedClose =3D getQuote( instrumentKey ,=0D
=
> ! extendedDateTime.DateTime , QuoteField.AdjustedClose );
> ! i=
f ( extendedDateTime.BarComponent =3D=3D BarComponent.Close )
> ! re=
turnValue =3D adjustedClose;
> ! else
> ! // extendedDateTime.Ba=
rComponent is equal to BarComponent.Open
> ! {
> ! double open =3D=
getQuote( instrumentKey ,
> ! extendedDateTime.DateTime , QuoteFie=
ld.Open );
> ! double close =3D getQuote( instrumentKey ,
> ! =
extendedDateTime.DateTime , QuoteField.Close );
> ! returnValue =3D =
open * adjustedClose / close;
> ! }
> ! return returnValue;
> ! =
}
> ! /// <summary>
> ! /// Returns the raw market value for the =
given ticker, at the given ExtendedDateTime
> ! /// </summary>
> ! =
/// <param name=3D"instrumentKey">instrument identifier</param>
> ! //=
/ <param name=3D"extendedDateTime"></param>
> ! /// <returns></returns=
>
> ! public static double GetRawMarketValue( string instrumentKey , E=
xtendedDateTime extendedDateTime )
> ! {
> ! double returnValue;=0D
=
> ! if ( extendedDateTime.BarComponent =3D=3D BarComponent.Close )
> =
! returnValue =3D getQuote( instrumentKey ,
> ! extendedDateTim=
e.DateTime , QuoteField.Close );
> ! else
> ! // extendedDateTim=
e.BarComponent is equal to BarComponent.Open
> ! returnValue =3D get=
Quote( instrumentKey ,
> ! extendedDateTime.DateTime , QuoteField.O=
pen );
> ! return returnValue;
> }
Glauco:
come mai in quest=
i due metodi non utilizzi una switch case invece dell'if, in modo da pote=
r restituire, poniamo, anche l'high e il low (adjusted e close)?
Pu=F2 e=
ssere che in qualche strategia l'high e il low possano tornare buoni ...=0D
=
=0A=0A=0A=0A_________________________________________________________=
___=0ALibero ADSL: 3 mesi gratis e navighi a 1.2 Mega. E poi hai l'Adsl s=
enza limiti a meno di 1 euro al giorno. =0AAbbonati subito senza costi di=
attivazione su http://www.libero.it=0A=0A
|
|
From: Glauco S. <gla...@us...> - 2005-01-09 23:49:53
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a3_Testing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17155/b4_Business/a3_Testing Modified Files: WalkForwardTester.cs Log Message: - the IDataStreamer "concept" has been introduced Index: WalkForwardTester.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a3_Testing/WalkForwardTester.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** WalkForwardTester.cs 23 Aug 2004 22:36:48 -0000 1.4 --- WalkForwardTester.cs 9 Jan 2005 23:49:35 -0000 1.5 *************** *** 43,46 **** --- 43,47 ---- private int outOfSampleWindowNumDays; private TestWindows testWindows; + private IDataStreamer dataStreamer; public DateTime StartDateTime *************** *** 89,94 **** } ! public WalkForwardTester() { } --- 90,96 ---- } ! public WalkForwardTester( IDataStreamer dataStreamer ) { + this.dataStreamer = dataStreamer; } *************** *** 103,107 **** { Tester tester = new Tester( testWindow , this.TradingSystems , ! this.Account.CashAmount ); tester.Parameters = this.Parameters.Copy(); tester.Optimize(); --- 105,109 ---- { Tester tester = new Tester( testWindow , this.TradingSystems , ! this.Account.CashAmount , this.dataStreamer ); tester.Parameters = this.Parameters.Copy(); tester.Optimize(); *************** *** 111,115 **** private void testNextStepOutOfSample( Parameters parameters , TestWindow testWindow ) { ! Tester tester = new Tester( testWindow , this.TradingSystems , this.Account.CashAmount ); tester.Account = this.Account; tester.Parameters = parameters; --- 113,118 ---- private void testNextStepOutOfSample( Parameters parameters , TestWindow testWindow ) { ! Tester tester = new Tester( testWindow , this.TradingSystems , this.Account.CashAmount , ! this.dataStreamer ); tester.Account = this.Account; tester.Parameters = parameters; *************** *** 128,132 **** public override void Test() { ! HistoricalDataProvider.SetCachedHistories( startDateTime , endDateTime ); testWindows = new TestWindows( startDateTime , endDateTime , inSampleWindowNumDays , outOfSampleWindowNumDays ); DateTime lastDateTime = new DateTime(); --- 131,135 ---- public override void Test() { ! // HistoricalDataProvider.SetCachedHistories( startDateTime , endDateTime ); testWindows = new TestWindows( startDateTime , endDateTime , inSampleWindowNumDays , outOfSampleWindowNumDays ); DateTime lastDateTime = new DateTime(); |
|
From: Glauco S. <gla...@us...> - 2005-01-09 23:49:08
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a3_Testing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16981/b4_Business/a3_Testing Modified Files: Tester.cs Log Message: - the IDataStreamer "concept" has been introduced Index: Tester.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a3_Testing/Tester.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Tester.cs 5 Dec 2004 02:49:16 -0000 1.6 --- Tester.cs 9 Jan 2005 23:48:58 -0000 1.7 *************** *** 30,33 **** --- 30,34 ---- using QuantProject.Business.Financial.Ordering; using QuantProject.Business.Timing; + using QuantProject.Data.DataProviders; *************** *** 43,46 **** --- 44,48 ---- private OrderManager orderManager = new OrderManager(); private double initialCash = 0.0; + private IDataStreamer dataStreamer; //private TestResults testResults; *************** *** 51,58 **** } ! public Tester(TestWindow testWindow , TradingSystems tradingSystems , double initialCash) { this.testWindow = testWindow; ! this.TradingSystems = tradingSystems; this.initialCash = initialCash; this.Account.AddCash( new EndOfDayDateTime( testWindow.StartDateTime , EndOfDaySpecificTime.MarketOpen ) , --- 53,62 ---- } ! public Tester(TestWindow testWindow , TradingSystems tradingSystems , double initialCash , ! IDataStreamer dataStreamer ) { this.testWindow = testWindow; ! this.dataStreamer = dataStreamer; ! this.TradingSystems = tradingSystems; this.initialCash = initialCash; this.Account.AddCash( new EndOfDayDateTime( testWindow.StartDateTime , EndOfDaySpecificTime.MarketOpen ) , *************** *** 66,71 **** initialCash ); this.Test(); ! return - this.Account.GetProfitNetLoss( ! new EndOfDayDateTime( testWindow.EndDateTime , EndOfDaySpecificTime.MarketClose ) ); } --- 70,74 ---- initialCash ); this.Test(); ! return - this.Account.GetFitnessValue(); } *************** *** 80,89 **** } } ! private void handleCurrentSignal( Signal signal ) { ! Orders orders = this.Account.AccountStrategy.GetOrders( signal ); foreach (Order order in orders ) { ! TimedTransaction transaction = this.OrderManager.GetTransaction( order ); this.Account.Add( transaction ); //Debug.WriteLine( account.ToString( dateTime ) ); --- 83,93 ---- } } ! private void handleCurrentSignal( Signal signal , IDataStreamer dataStreamer ) { ! Orders orders = this.Account.AccountStrategy.GetOrders( signal , dataStreamer ); foreach (Order order in orders ) { ! TimedTransaction transaction = this.OrderManager.GetTransaction( order , ! dataStreamer ); this.Account.Add( transaction ); //Debug.WriteLine( account.ToString( dateTime ) ); *************** *** 91,104 **** } private void testCurrentDateForTradingSystem( TradingSystem tradingSystem , ! ExtendedDateTime extendedDateTime ) { Signals signals = tradingSystem.GetSignals( extendedDateTime ); foreach (Signal signal in signals) ! handleCurrentSignal( signal ); } ! private void testCurrentExtendedDateTime( ExtendedDateTime extendedDateTime ) { foreach (TradingSystem tradingSystem in this.TradingSystems) ! testCurrentDateForTradingSystem( tradingSystem , extendedDateTime ); } public override void Test() --- 95,109 ---- } private void testCurrentDateForTradingSystem( TradingSystem tradingSystem , ! ExtendedDateTime extendedDateTime , IDataStreamer dataStreamer ) { Signals signals = tradingSystem.GetSignals( extendedDateTime ); foreach (Signal signal in signals) ! handleCurrentSignal( signal , dataStreamer ); } ! private void testCurrentExtendedDateTime( ExtendedDateTime extendedDateTime , ! IDataStreamer dataStreamer ) { foreach (TradingSystem tradingSystem in this.TradingSystems) ! testCurrentDateForTradingSystem( tradingSystem , extendedDateTime ,dataStreamer ); } public override void Test() *************** *** 108,113 **** while (dateTime <= this.testWindow.EndDateTime) { ! testCurrentExtendedDateTime( new ExtendedDateTime( dateTime , BarComponent.Open ) ); ! testCurrentExtendedDateTime( new ExtendedDateTime( dateTime , BarComponent.Close ) ); dateTime = dateTime.AddDays( 1 ); } --- 113,120 ---- while (dateTime <= this.testWindow.EndDateTime) { ! testCurrentExtendedDateTime( new ExtendedDateTime( dateTime , BarComponent.Open ) , ! dataStreamer ); ! testCurrentExtendedDateTime( new ExtendedDateTime( dateTime , BarComponent.Close ) , ! dataStreamer ); dateTime = dateTime.AddDays( 1 ); } |
|
From: Glauco S. <gla...@us...> - 2005-01-09 23:47:41
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/Tables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16679/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/Tables Modified Files: Summary.cs Log Message: - the IHistoricalQuoteProvider "concept" has been introduced Index: Summary.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/Tables/Summary.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Summary.cs 6 Aug 2004 13:47:42 -0000 1.9 --- Summary.cs 9 Jan 2005 23:47:31 -0000 1.10 *************** *** 2,5 **** --- 2,6 ---- using System.Data; using QuantProject.ADT; + using QuantProject.Business.DataProviders; using QuantProject.Business.Financial.Instruments; using QuantProject.Business.Financial.Accounting.Reporting; *************** *** 14,17 **** --- 15,19 ---- { private AccountReport accountReport; + private IHistoricalQuoteProvider historicalQuoteProvider; private double totalPnl; private double buyAndHoldPercentageReturn; *************** *** 98,107 **** ! public Summary( AccountReport accountReport ) : ! base( accountReport.Name + " - Summary" ) ! { ! this.accountReport = accountReport; ! this.getSummary(); ! } #region "getSummary" private void getSummaryTable_setColumns( DataTable equityDataTable ) --- 100,120 ---- ! private void summary( AccountReport accountReport ) ! { ! this.accountReport = accountReport; ! this.getSummary(); ! } ! public Summary( AccountReport accountReport ) : ! base( accountReport.Name + " - Summary" ) ! { ! this.summary( accountReport ); ! } ! public Summary( AccountReport accountReport , ! IHistoricalQuoteProvider historicalDataProvider ) : ! base( accountReport.Name + " - Summary" ) ! { ! this.historicalQuoteProvider = historicalDataProvider; ! this.summary( accountReport ); ! } #region "getSummary" private void getSummaryTable_setColumns( DataTable equityDataTable ) *************** *** 125,129 **** getSummary_setRow( new TotalNetProfit( this ) , summaryDataTable ); getSummary_setRow( new ReturnOnAccount( this ) , summaryDataTable ); ! getSummary_setRow( new BuyAndHoldPercentageReturn( this ) , summaryDataTable ); getSummary_setRow( new AnnualSystemPercentageReturn( this ) , summaryDataTable ); this.maxEquityDrawDown = new MaxEquityDrawDown( this ); --- 138,143 ---- getSummary_setRow( new TotalNetProfit( this ) , summaryDataTable ); getSummary_setRow( new ReturnOnAccount( this ) , summaryDataTable ); ! getSummary_setRow( new BuyAndHoldPercentageReturn( this , this.historicalQuoteProvider ) , ! summaryDataTable ); getSummary_setRow( new AnnualSystemPercentageReturn( this ) , summaryDataTable ); this.maxEquityDrawDown = new MaxEquityDrawDown( this ); |
|
From: Glauco S. <gla...@us...> - 2005-01-09 23:45:45
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16106/b7_Scripts/WalkForwardTesting/WalkForwardOneRank Modified Files: RunWalkForwardOneRank.cs Log Message: - the IHistoricalQuoteProvider "concept" has been introduced - the HistoricalAdjustedQuoteProvider is used Index: RunWalkForwardOneRank.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank/RunWalkForwardOneRank.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** RunWalkForwardOneRank.cs 26 Dec 2004 17:47:20 -0000 1.5 --- RunWalkForwardOneRank.cs 9 Jan 2005 23:45:20 -0000 1.6 *************** *** 25,28 **** --- 25,29 ---- using System.Data; using QuantProject.ADT; + using QuantProject.Business.DataProviders; using QuantProject.Business.Financial.Accounting; using QuantProject.Business.Financial.Accounting.Reporting; *************** *** 44,47 **** --- 45,50 ---- public class RunWalkForwardOneRank : Script { + private IHistoricalQuoteProvider historicalQuoteProvider = + new HistoricalAdjustedQuoteProvider(); private ReportTable reportTable; private EndOfDayDateTime startDateTime; *************** *** 62,71 **** this.reportTable = new ReportTable( "Summary_Reports" ); this.startDateTime = new EndOfDayDateTime( ! new DateTime( 2002 , 1 , 1 ) , EndOfDaySpecificTime.MarketOpen ); ! // this.endDateTime = new EndOfDayDateTime( ! // new DateTime( 2002 , 12 , 31 ) , EndOfDaySpecificTime.OneHourAfterMarketClose ); this.endDateTime = new EndOfDayDateTime( ! new DateTime( 2002 , 2 , 28 ) , EndOfDaySpecificTime.OneHourAfterMarketClose ); ! this.numIntervalDays = 7; } #region Run --- 65,72 ---- this.reportTable = new ReportTable( "Summary_Reports" ); this.startDateTime = new EndOfDayDateTime( ! new DateTime( 1998 , 1 , 1 ) , EndOfDaySpecificTime.MarketOpen ); this.endDateTime = new EndOfDayDateTime( ! new DateTime( 1998 , 1 , 30 ) , EndOfDaySpecificTime.OneHourAfterMarketClose ); ! this.numIntervalDays = 1; } #region Run *************** *** 78,83 **** { this.account = new Account( "WalkForwardOneRank" , this.endOfDayTimer , ! new HistoricalEndOfDayDataStreamer( this.endOfDayTimer ) , ! new HistoricalEndOfDayOrderExecutor( this.endOfDayTimer ) ); } private void run_initializeEndOfDayTimerHandler() --- 79,86 ---- { this.account = new Account( "WalkForwardOneRank" , this.endOfDayTimer , ! new HistoricalEndOfDayDataStreamer( this.endOfDayTimer , ! this.historicalQuoteProvider ) , ! new HistoricalEndOfDayOrderExecutor( this.endOfDayTimer , ! this.historicalQuoteProvider ) ); } private void run_initializeEndOfDayTimerHandler() *************** *** 131,135 **** this.account.EndOfDayTimer.Stop(); this.progressBarForm.Close(); ! Report report = new Report( this.account ); report.Show( "WFT One Rank" , this.numIntervalDays , this.endDateTime , "MSFT" ); } --- 134,138 ---- this.account.EndOfDayTimer.Stop(); this.progressBarForm.Close(); ! Report report = new Report( this.account , this.historicalQuoteProvider ); report.Show( "WFT One Rank" , this.numIntervalDays , this.endDateTime , "MSFT" ); } |
|
From: Glauco S. <gla...@us...> - 2005-01-09 23:45:07
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15937/b7_Scripts/TickerSelectionTesting Modified Files: RunEfficientCTOPortfolio.cs Log Message: - the IHistoricalQuoteProvider "concept" has been introduced - the HistoricalRawQuoteProvider is used Index: RunEfficientCTOPortfolio.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/RunEfficientCTOPortfolio.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RunEfficientCTOPortfolio.cs 8 Jan 2005 12:01:38 -0000 1.7 --- RunEfficientCTOPortfolio.cs 9 Jan 2005 23:44:53 -0000 1.8 *************** *** 26,29 **** --- 26,30 ---- using QuantProject.ADT; using QuantProject.ADT.Optimizing.Genetic; + using QuantProject.Business.DataProviders; using QuantProject.Business.Financial.Accounting; using QuantProject.Business.Financial.Accounting.Reporting; *************** *** 63,66 **** --- 64,70 ---- private EndOfDayDateTime endDateTime; private int numIntervalDays;// number of days for the equity line graph + private IHistoricalQuoteProvider historicalQuoteProvider = + new HistoricalRawQuoteProvider(); + //private ProgressBarForm progressBarForm; *************** *** 112,117 **** { this.account = new Account( "EfficientCloseToOpenPortfolio" , this.endOfDayTimer , ! new HistoricalEndOfDayDataStreamer( this.endOfDayTimer ) , ! new HistoricalEndOfDayOrderExecutor( this.endOfDayTimer ) ); } --- 116,123 ---- { this.account = new Account( "EfficientCloseToOpenPortfolio" , this.endOfDayTimer , ! new HistoricalEndOfDayDataStreamer( this.endOfDayTimer , ! this.historicalQuoteProvider ) , ! new HistoricalEndOfDayOrderExecutor( this.endOfDayTimer , ! this.historicalQuoteProvider ) ); } *************** *** 171,175 **** { this.endOfDayTimer.Stop(); ! report = new Report( this.account ); report.Show("CTO_Portfolio" , this.numIntervalDays , this.endDateTime , "^MIBTEL" ); --- 177,181 ---- { this.endOfDayTimer.Stop(); ! report = new Report( this.account , this.historicalQuoteProvider ); report.Show("CTO_Portfolio" , this.numIntervalDays , this.endDateTime , "^MIBTEL" ); |
|
From: Glauco S. <gla...@us...> - 2005-01-09 23:44:24
|
Update of /cvsroot/quantproject/QuantProject/b5_Presentation/Reporting/WindowsForm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15780/b5_Presentation/Reporting/WindowsForm Modified Files: Report.cs Log Message: - the IHistoricalQuoteProvider "concept" has been introduced Index: Report.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b5_Presentation/Reporting/WindowsForm/Report.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Report.cs 29 Nov 2004 16:20:00 -0000 1.3 --- Report.cs 9 Jan 2005 23:44:15 -0000 1.4 *************** *** 23,26 **** --- 23,27 ---- using System.Windows.Forms; using QuantProject.ADT; + using QuantProject.Business.DataProviders; using QuantProject.Business.Financial.Accounting; using QuantProject.Business.Financial.Accounting.Reporting; *************** *** 35,44 **** { private Account account; private AccountReport accountReport; private ReportTabControl reportTabControl; ! public Report( Account account ) { this.account = account; } --- 36,47 ---- { private Account account; + private IHistoricalQuoteProvider historicalQuoteProvider; private AccountReport accountReport; private ReportTabControl reportTabControl; ! public Report( Account account , IHistoricalQuoteProvider historicalQuoteProvider ) { this.account = account; + this.historicalQuoteProvider = historicalQuoteProvider; } *************** *** 51,55 **** if ( this.accountReport == null ) this.accountReport = this.account.CreateReport( reportName , ! numDaysForInterval , endDateTime , buyAndHoldTicker ); } private void show_populateForm() --- 54,59 ---- if ( this.accountReport == null ) this.accountReport = this.account.CreateReport( reportName , ! numDaysForInterval , endDateTime , buyAndHoldTicker , ! this.historicalQuoteProvider ); } private void show_populateForm() |