quantproject-developers Mailing List for QuantProject (Page 99)
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...> - 2005-10-21 17:46:51
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/SimpleSelection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13819/SimpleSelection Log Message: Directory /cvsroot/quantproject/QuantProject/b7_Scripts/TickerSelectionTesting/SimpleSelection added to the repository |
|
From: Glauco S. <gla...@us...> - 2005-10-15 20:39:39
|
Update of /cvsroot/quantproject/QuantProject In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12219 Modified Files: QuantProject.sln Log Message: Minor change automatically applied by Visual Studio.net Index: QuantProject.sln =================================================================== RCS file: /cvsroot/quantproject/QuantProject/QuantProject.sln,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** QuantProject.sln 20 Jan 2005 01:26:28 -0000 1.4 --- QuantProject.sln 15 Oct 2005 20:39:31 -0000 1.5 *************** *** 10,17 **** Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "b4_Business", "b4_Business\b4_Business.csproj", "{6EE31501-376E-491B-869E-F06D5B7C9C30}" EndProject - Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "b7_Scripts", "b7_Scripts\b7_Scripts.csproj", "{451DB77D-D4C7-44D1-8047-2920D864A4CD}" - EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "b5_Presentation", "b5_Presentation\b5_Presentation.csproj", "{D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}" EndProject Global GlobalSection(SolutionConfiguration) = preSolution --- 10,17 ---- Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "b4_Business", "b4_Business\b4_Business.csproj", "{6EE31501-376E-491B-869E-F06D5B7C9C30}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "b5_Presentation", "b5_Presentation\b5_Presentation.csproj", "{D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}" EndProject + Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "b7_Scripts", "b7_Scripts\b7_Scripts.csproj", "{451DB77D-D4C7-44D1-8047-2920D864A4CD}" + EndProject Global GlobalSection(SolutionConfiguration) = preSolution *************** *** 36,51 **** {6EE31501-376E-491B-869E-F06D5B7C9C30}.4 = {8CF7C0D8-A8CB-43DC-B406-77DE62729487} {6EE31501-376E-491B-869E-F06D5B7C9C30}.5 = {6AC0A2C1-B926-4921-A685-F5AA80E81C94} ! {451DB77D-D4C7-44D1-8047-2920D864A4CD}.0 = {6EE31501-376E-491B-869E-F06D5B7C9C30} ! {451DB77D-D4C7-44D1-8047-2920D864A4CD}.1 = {6AC0A2C1-B926-4921-A685-F5AA80E81C94} ! {451DB77D-D4C7-44D1-8047-2920D864A4CD}.2 = {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402} ! {451DB77D-D4C7-44D1-8047-2920D864A4CD}.3 = {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402} ! {451DB77D-D4C7-44D1-8047-2920D864A4CD}.4 = {6AC0A2C1-B926-4921-A685-F5AA80E81C94} ! {451DB77D-D4C7-44D1-8047-2920D864A4CD}.5 = {6EE31501-376E-491B-869E-F06D5B7C9C30} ! {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.0 = {6EE31501-376E-491B-869E-F06D5B7C9C30} ! {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.1 = {6AC0A2C1-B926-4921-A685-F5AA80E81C94} ! {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.2 = {B8A01161-3698-4591-B1EF-90F5FC7D8DBA} ! {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.3 = {6AC0A2C1-B926-4921-A685-F5AA80E81C94} ! {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.4 = {6EE31501-376E-491B-869E-F06D5B7C9C30} ! {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.5 = {B8A01161-3698-4591-B1EF-90F5FC7D8DBA} EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution --- 36,45 ---- {6EE31501-376E-491B-869E-F06D5B7C9C30}.4 = {8CF7C0D8-A8CB-43DC-B406-77DE62729487} {6EE31501-376E-491B-869E-F06D5B7C9C30}.5 = {6AC0A2C1-B926-4921-A685-F5AA80E81C94} ! {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.0 = {B8A01161-3698-4591-B1EF-90F5FC7D8DBA} ! {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.1 = {6EE31501-376E-491B-869E-F06D5B7C9C30} ! {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.2 = {6AC0A2C1-B926-4921-A685-F5AA80E81C94} ! {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.3 = {B8A01161-3698-4591-B1EF-90F5FC7D8DBA} ! {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.4 = {6AC0A2C1-B926-4921-A685-F5AA80E81C94} ! {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.5 = {6EE31501-376E-491B-869E-F06D5B7C9C30} EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution *************** *** 70,81 **** {6EE31501-376E-491B-869E-F06D5B7C9C30}.Release.ActiveCfg = Release|.NET {6EE31501-376E-491B-869E-F06D5B7C9C30}.Release.Build.0 = Release|.NET - {451DB77D-D4C7-44D1-8047-2920D864A4CD}.Debug.ActiveCfg = Debug|.NET - {451DB77D-D4C7-44D1-8047-2920D864A4CD}.Debug.Build.0 = Debug|.NET - {451DB77D-D4C7-44D1-8047-2920D864A4CD}.Release.ActiveCfg = Release|.NET - {451DB77D-D4C7-44D1-8047-2920D864A4CD}.Release.Build.0 = Release|.NET {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.Debug.ActiveCfg = Debug|.NET {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.Debug.Build.0 = Debug|.NET {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.Release.ActiveCfg = Release|.NET {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.Release.Build.0 = Release|.NET EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution --- 64,75 ---- {6EE31501-376E-491B-869E-F06D5B7C9C30}.Release.ActiveCfg = Release|.NET {6EE31501-376E-491B-869E-F06D5B7C9C30}.Release.Build.0 = Release|.NET {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.Debug.ActiveCfg = Debug|.NET {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.Debug.Build.0 = Debug|.NET {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.Release.ActiveCfg = Release|.NET {D3DC9EA6-3B06-4255-B19A-5FC5B66A1402}.Release.Build.0 = Release|.NET + {451DB77D-D4C7-44D1-8047-2920D864A4CD}.Debug.ActiveCfg = Debug|.NET + {451DB77D-D4C7-44D1-8047-2920D864A4CD}.Debug.Build.0 = Debug|.NET + {451DB77D-D4C7-44D1-8047-2920D864A4CD}.Release.ActiveCfg = Release|.NET + {451DB77D-D4C7-44D1-8047-2920D864A4CD}.Release.Build.0 = Release|.NET EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:23:29
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/Tables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19392/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/Tables Modified Files: Summary.cs Log Message: EquityLine is now used instead of EquityHistory Index: Summary.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/Tables/Summary.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Summary.cs 3 Sep 2005 23:23:32 -0000 1.17 --- Summary.cs 15 Oct 2005 18:23:22 -0000 1.18 *************** *** 258,262 **** this.annualSystemPercentageReturn = new AnnualSystemPercentageReturn( this ); this.maxEquityDrawDown = new MaxEquityDrawDown( this ); ! this.sharpeRatio = new SharpeRatio( this.accountReport.EquityHistory ); this.totalNumberOfTrades = new TotalNumberOfTrades( this ); this.numberWinningTrades = new NumberWinningTrades( this ); --- 258,262 ---- this.annualSystemPercentageReturn = new AnnualSystemPercentageReturn( this ); this.maxEquityDrawDown = new MaxEquityDrawDown( this ); ! this.sharpeRatio = new SharpeRatio( this.accountReport.EquityLine ); this.totalNumberOfTrades = new TotalNumberOfTrades( this ); this.numberWinningTrades = new NumberWinningTrades( this ); |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:21:09
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18752/b7_Scripts/WalkForwardTesting/WalkForwardOneRank Modified Files: RunWalkForwardOneRank.cs Log Message: Some script parameters have been updated, to test the 2002 period Index: RunWalkForwardOneRank.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank/RunWalkForwardOneRank.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RunWalkForwardOneRank.cs 7 Jun 2005 15:32:06 -0000 1.10 --- RunWalkForwardOneRank.cs 15 Oct 2005 18:21:01 -0000 1.11 *************** *** 73,80 **** this.reportTable = new ReportTable( "Summary_Reports" ); this.startDateTime = new EndOfDayDateTime( ! new DateTime( 1998 , 1 , 1 ) , EndOfDaySpecificTime.MarketOpen ); this.endDateTime = new EndOfDayDateTime( ! new DateTime( 1998 , 12 , 31 ) , EndOfDaySpecificTime.OneHourAfterMarketClose ); ! this.numberDaysForPerformanceCalculation = 1800; this.numIntervalDays = 1; } --- 73,80 ---- 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.numberDaysForPerformanceCalculation = 120; this.numIntervalDays = 1; } *************** *** 99,103 **** private void run_initializeEndOfDayTimerHandler() { ! this.endOfDayTimerHandler = new EndOfDayTimerHandler( 200 , 20 , 5 , this.numberDaysForPerformanceCalculation , 30 , this.account ); --- 99,103 ---- private void run_initializeEndOfDayTimerHandler() { ! this.endOfDayTimerHandler = new EndOfDayTimerHandler( 400 , 20 , 5 , this.numberDaysForPerformanceCalculation , 30 , this.account ); |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:19:30
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18323/b4_Business/a1_Financial/a2_Accounting Modified Files: Position.cs Log Message: The Type property has been added (of type PositionType) Index: Position.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Position.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Position.cs 13 Oct 2003 21:58:40 -0000 1.1.1.1 --- Position.cs 15 Oct 2005 18:19:22 -0000 1.2 *************** *** 48,52 **** } ! public Position( Instrument instrument , long quantity ) { this.instrument = instrument; --- 48,68 ---- } ! public PositionType Type ! { ! get ! { ! if ( this.Quantity == 0 ) ! throw new Exception( "Position Type cannot be requested " + ! "when no position is held!" ); ! PositionType positionType; ! if ( this.Quantity > 0 ) ! positionType = PositionType.Long; ! else ! // this.Quantity < 0 ! positionType = PositionType.Short; ! return positionType; ! } ! } ! public Position( Instrument instrument , long quantity ) { this.instrument = instrument; |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:15:51
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17434/b4_Business/a1_Financial/a2_Accounting Modified Files: Portfolio.cs Log Message: public Position GetPosition( string ticker ) has been added Index: Portfolio.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Portfolio.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Portfolio.cs 23 Jul 2005 18:03:08 -0000 1.7 --- Portfolio.cs 15 Oct 2005 18:15:43 -0000 1.8 *************** *** 51,58 **** } ! public Position GetPosition( Instrument instrument ) ! { ! return ((Position)this[ instrument.Key ]); ! } public bool Contains( Instrument instrument ) --- 51,64 ---- } ! ! public Position GetPosition( string ticker ) ! { ! return ((Position)this[ ticker ]); ! } ! ! public Position GetPosition( Instrument instrument ) ! { ! return this.GetPosition( instrument.Key ); ! } public bool Contains( Instrument instrument ) |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:15:19
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/OneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17267/b7_Scripts/SimpleTesting/OneRank Modified Files: OneRank.cs Log Message: Changed to handle short positions also Index: OneRank.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/OneRank/OneRank.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** OneRank.cs 9 Jan 2005 23:25:44 -0000 1.6 --- OneRank.cs 15 Oct 2005 18:15:06 -0000 1.7 *************** *** 57,64 **** // cash has not been added yet this.account.AddCash( 10000 ); } ! private void fiveMinutesBeforeMarketCloseEventHandler_withTickerExchangedNow() { long sharesToBeBought; double todayMarketValueAtClose = this.account.DataStreamer.GetCurrentBid( this.account.Key ); --- 57,82 ---- // cash has not been added yet this.account.AddCash( 10000 ); + if ( endOfDayTimingEventArgs.EndOfDayDateTime.DateTime > + this.lastDateTime ) + this.account.EndOfDayTimer.Stop(); } ! private void buyLongTicker() { long sharesToBeBought; + sharesToBeBought = MaxBuyableShares( this.account.Key , + this.account.CashAmount , this.account.DataStreamer ); + this.account.AddOrder( new Order( OrderType.MarketBuy , + new Instrument( this.account.Key ) , sharesToBeBought ) ); + } + private void sellShortTicker() + { + long sharesToBeSold; + sharesToBeSold = MaxBuyableShares( this.account.Key , + this.account.CashAmount , this.account.DataStreamer ); + this.account.AddOrder( new Order( OrderType.MarketSellShort , + new Instrument( this.account.Key ) , sharesToBeSold ) ); + } + private void fiveMinutesBeforeMarketCloseEventHandler_withTickerExchangedNow() + { double todayMarketValueAtClose = this.account.DataStreamer.GetCurrentBid( this.account.Key ); *************** *** 68,87 **** double yesterdayMarketValueAtClose = this.historicalQuoteProvider.GetMarketValue( this.account.Key , yesterdayAtClose ); ! if ( ( todayMarketValueAtClose > yesterdayMarketValueAtClose ) && ! ( !this.account.Contains( this.account.Key ) ) ) { ! // today close is higher than yesterday close and no position ! // is kept in portfolio, yet ! sharesToBeBought = MaxBuyableShares( this.account.Key , ! this.account.CashAmount , this.account.DataStreamer ); ! this.account.AddOrder( new Order( OrderType.MarketBuy , ! new Instrument( this.account.Key ) , sharesToBeBought ) ); } - if ( ( todayMarketValueAtClose < yesterdayMarketValueAtClose ) && - ( this.account.Contains( this.account.Key ) ) ) - this.account.ClosePosition( this.account.Key ); - if ( this.account.EndOfDayTimer.GetCurrentTime().DateTime > - this.lastDateTime ) - this.account.EndOfDayTimer.Stop(); } private void fiveMinutesBeforeMarketCloseEventHandler( --- 86,129 ---- double yesterdayMarketValueAtClose = this.historicalQuoteProvider.GetMarketValue( this.account.Key , yesterdayAtClose ); ! if ( ( todayMarketValueAtClose > yesterdayMarketValueAtClose ) ) { ! if ( this.account.Contains( this.account.Key ) ) ! { ! // today close is higher than yesterday close and ! // a position is already kept in portfolio ! if ( this.account.Portfolio.GetPosition( ! this.account.Key ).Type == PositionType.Short ) ! // today close is higher than yesterday close and ! // a short position is kept in portfolio ! { ! this.account.ClosePosition( this.account.Key ); ! this.buyLongTicker(); ! } ! } ! else ! // today close is higher than yesterday close and ! // no position is kept in portfolio ! this.buyLongTicker(); ! } ! if ( ( todayMarketValueAtClose < yesterdayMarketValueAtClose ) ) ! { ! if ( this.account.Contains( this.account.Key ) ) ! { ! // today close is lower than yesterday close and ! // a position is already kept in portfolio ! if ( this.account.Portfolio.GetPosition( ! this.account.Key ).Type == PositionType.Long ) ! // today close is lower than yesterday close and ! // a long position is kept in portfolio ! { ! this.account.ClosePosition( this.account.Key ); ! this.sellShortTicker(); ! } ! } ! else ! // today close is lower than yesterday close and ! // no position is kept in portfolio ! this.sellShortTicker(); } } private void fiveMinutesBeforeMarketCloseEventHandler( |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:12:02
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16788/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows Modified Files: NumberWinningPeriods.cs Log Message: EquityLine is now used instead of EquityHistory Index: NumberWinningPeriods.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows/NumberWinningPeriods.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NumberWinningPeriods.cs 19 Jun 2005 14:47:40 -0000 1.3 --- NumberWinningPeriods.cs 15 Oct 2005 18:11:54 -0000 1.4 *************** *** 44,50 **** { double equityHistoryGain = ! ( (double)this.summary.AccountReport.EquityHistory.GetByIndex( i + 1 ) - ! (double)this.summary.AccountReport.EquityHistory.GetByIndex( i ) ) / ! (double)this.summary.AccountReport.EquityHistory.GetByIndex( i ); double benchmarkGain = ( Convert.ToDouble( this.summary.AccountReport.BenchmarkEquityLine.GetByIndex( i + 1 ) ) - --- 44,50 ---- { double equityHistoryGain = ! ( (double)this.summary.AccountReport.EquityLine.GetByIndex( i + 1 ) - ! (double)this.summary.AccountReport.EquityLine.GetByIndex( i ) ) / ! (double)this.summary.AccountReport.EquityLine.GetByIndex( i ); double benchmarkGain = ( Convert.ToDouble( this.summary.AccountReport.BenchmarkEquityLine.GetByIndex( i + 1 ) ) - *************** *** 67,71 **** this.numberLosingPeriods = 0; this.numberEvenPeriods = 0; ! for ( int i=0; i<this.summary.AccountReport.EquityHistory.Count - 1 ; i++ ) this.setWinningLosingAndEvenPeriods_forPeriod( i ); } --- 67,71 ---- this.numberLosingPeriods = 0; this.numberEvenPeriods = 0; ! for ( int i=0; i<this.summary.AccountReport.EquityLine.Count - 1 ; i++ ) this.setWinningLosingAndEvenPeriods_forPeriod( i ); } |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:10:31
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/DataProviders/Caching In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16411/b3_Data/DataProviders/Caching Modified Files: MissingQuoteException.cs Log Message: The Message property has been overridden to provide a more informative error message Index: MissingQuoteException.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/DataProviders/Caching/MissingQuoteException.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MissingQuoteException.cs 30 May 2005 18:35:03 -0000 1.1 --- MissingQuoteException.cs 15 Oct 2005 18:10:24 -0000 1.2 *************** *** 30,38 **** public class MissingQuoteException : Exception { public MissingQuoteException( string ticker , DateTime dateTime ) { ! // ! // TODO: Add constructor logic here ! // } } --- 30,47 ---- public class MissingQuoteException : Exception { + private string ticker; + private DateTime dateTime; + public override string Message + { + get + { + return "Missing quote for ticker " + + this.ticker + " for date " + this.dateTime.ToString(); + } + } public MissingQuoteException( string ticker , DateTime dateTime ) { ! this.ticker = ticker; ! this.dateTime = dateTime; } } |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:09:29
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/LinearCombination In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16053/b7_Scripts/WalkForwardTesting/LinearCombination Modified Files: MainForm.cs Log Message: Eligible tickers now are those in the S&P500 group Index: MainForm.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/LinearCombination/MainForm.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MainForm.cs 22 Aug 2005 22:25:31 -0000 1.6 --- MainForm.cs 15 Oct 2005 18:09:22 -0000 1.7 *************** *** 158,166 **** protected DataTable getSetOfTickersToBeOptimized() { ! SelectorByLiquidity mostLiquid = new SelectorByLiquidity(this.tickerGroupID, false, ! this.firstDate, this.lastDate, ! this.numberOfEligibleTickers); ! ! DataTable eligibleTickers = mostLiquid.GetTableOfSelectedTickers(); SelectorByQuotationAtEachMarketDay quotedAtEachMarketDayFromEligible = new SelectorByQuotationAtEachMarketDay( eligibleTickers, --- 158,170 ---- protected DataTable getSetOfTickersToBeOptimized() { ! // SelectorByLiquidity mostLiquid = new SelectorByLiquidity(this.tickerGroupID, false, ! // this.firstDate, this.lastDate, ! // this.numberOfEligibleTickers); ! // DataTable eligibleTickers = mostLiquid.GetTableOfSelectedTickers(); ! ! ! SelectorByGroup selectorByGroup = ! new SelectorByGroup( "SP500" , this.lastDate ); ! DataTable eligibleTickers = selectorByGroup.GetTableOfSelectedTickers(); SelectorByQuotationAtEachMarketDay quotedAtEachMarketDayFromEligible = new SelectorByQuotationAtEachMarketDay( eligibleTickers, |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:07:46
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a05_Timing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15765/b4_Business/a05_Timing Modified Files: IEndOfDayTimer.cs Log Message: Internal documentation has been improved Index: IEndOfDayTimer.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a05_Timing/IEndOfDayTimer.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IEndOfDayTimer.cs 29 Nov 2004 14:41:14 -0000 1.1 --- IEndOfDayTimer.cs 15 Oct 2005 18:07:39 -0000 1.2 *************** *** 53,56 **** --- 53,59 ---- /// </summary> void Start(); + /// <summary> + /// The timer is instructed to stop to fire timing events + /// </summary> void Stop(); } |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:06:52
|
Update of /cvsroot/quantproject/QuantProject/b5_Presentation/Reporting/WindowsForm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15639/b5_Presentation/Reporting/WindowsForm Modified Files: EquityChartTabPage.cs Log Message: Equity line class Index: EquityChartTabPage.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b5_Presentation/Reporting/WindowsForm/EquityChartTabPage.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EquityChartTabPage.cs 17 Apr 2005 02:15:28 -0000 1.5 --- EquityChartTabPage.cs 15 Oct 2005 18:06:36 -0000 1.6 *************** *** 50,56 **** { DateTime firstDate = ! (DateTime)this.accountReport.EquityHistory.GetKey( 0 ); double normalizingFactor = ! ( double )this.accountReport.EquityHistory[ firstDate ] / Convert.ToDouble( this.accountReport.BenchmarkEquityLine[ firstDate ] ); return this.accountReport.BenchmarkEquityLine.MultiplyBy( normalizingFactor ); --- 50,56 ---- { DateTime firstDate = ! (DateTime)this.accountReport.EquityLine.GetKey( 0 ); double normalizingFactor = ! ( double )this.accountReport.EquityLine[ firstDate ] / Convert.ToDouble( this.accountReport.BenchmarkEquityLine[ firstDate ] ); return this.accountReport.BenchmarkEquityLine.MultiplyBy( normalizingFactor ); *************** *** 62,66 **** this.equityChart = new Chart(); this.equityChart.Dock = DockStyle.Fill; ! this.equityChart.Add( accountReport.EquityHistory , Color.Red ); this.benchmark = this.getBenchmark(); // this.equityChart.Add( benchmark , Color.Blue , --- 62,66 ---- this.equityChart = new Chart(); this.equityChart.Dock = DockStyle.Fill; ! this.equityChart.Add( accountReport.EquityLine , Color.Red ); this.benchmark = this.getBenchmark(); // this.equityChart.Add( benchmark , Color.Blue , |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:06:43
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15563/b7_Scripts/WalkForwardTesting/WalkForwardOneRank Modified Files: EligibleTickers.cs Log Message: Eligible tickers now are those in the S&P500 group, quoted at each market day as the benchmark Index: EligibleTickers.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank/EligibleTickers.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** EligibleTickers.cs 7 Jun 2005 15:21:43 -0000 1.4 --- EligibleTickers.cs 15 Oct 2005 18:06:26 -0000 1.5 *************** *** 35,39 **** private int numberEligibleTickersToBeChosen; private int numberDaysForPerformanceCalculation; ! private int numDaysToComputeLiquidity = 10; public EligibleTickers( int numberEligibleTickersToBeChosen , --- 35,39 ---- private int numberEligibleTickersToBeChosen; private int numberDaysForPerformanceCalculation; ! // private int numDaysToComputeLiquidity = 10; public EligibleTickers( int numberEligibleTickersToBeChosen , *************** *** 47,57 **** private DataTable setTickers_build_getSelectedTickers( DateTime dateTime ) { ! SelectorByLiquidity mostLiquid = ! new SelectorByLiquidity("Test", false , dateTime.AddDays( - this.numDaysToComputeLiquidity ) , dateTime , ! this.numberEligibleTickersToBeChosen ); ! DataTable mostLiquidTickers = ! mostLiquid.GetTableOfSelectedTickers(); SelectorByQuotationAtEachMarketDay quotedInEachMarketDayFromMostLiquid = ! new SelectorByQuotationAtEachMarketDay( mostLiquidTickers, false, dateTime.AddDays( - this.numberDaysForPerformanceCalculation ) , dateTime, this.numberEligibleTickersToBeChosen,"^SPX"); --- 47,64 ---- private DataTable setTickers_build_getSelectedTickers( DateTime dateTime ) { ! SelectorByGroup selectorByGroup = ! new SelectorByGroup( "SP500" , dateTime ); ! // use the following for fast test ! // SelectorByGroup selectorByGroup = ! // new SelectorByGroup( "millo" , dateTime ); ! DataTable eligibleTickers = selectorByGroup.GetTableOfSelectedTickers(); ! ! // SelectorByLiquidity mostLiquid = ! // new SelectorByLiquidity("Test", false , dateTime.AddDays( - this.numDaysToComputeLiquidity ) , dateTime , ! // this.numberEligibleTickersToBeChosen ); ! // DataTable mostLiquidTickers = ! // mostLiquid.GetTableOfSelectedTickers(); SelectorByQuotationAtEachMarketDay quotedInEachMarketDayFromMostLiquid = ! new SelectorByQuotationAtEachMarketDay( eligibleTickers, false, dateTime.AddDays( - this.numberDaysForPerformanceCalculation ) , dateTime, this.numberEligibleTickersToBeChosen,"^SPX"); *************** *** 73,78 **** foreach ( DataRow dataRow in selectedTickers.Rows ) ! this.Add( dataRow[ "tiTicker" ].ToString() , ! dataRow[ "tiTicker" ].ToString() ); } /// <summary> --- 80,85 ---- foreach ( DataRow dataRow in selectedTickers.Rows ) ! this.Add( dataRow[ "TickerId" ].ToString() , ! dataRow[ "TickerId" ].ToString() ); } /// <summary> |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:05:07
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15310/b7_Scripts/WalkForwardTesting/WalkForwardOneRank Modified Files: ComparableAccount.cs Log Message: Sharpe Ratio is now used as fitness function Index: ComparableAccount.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank/ComparableAccount.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ComparableAccount.cs 19 Jun 2005 15:12:04 -0000 1.10 --- ComparableAccount.cs 15 Oct 2005 18:04:58 -0000 1.11 *************** *** 22,25 **** --- 22,26 ---- using System; + using QuantProject.ADT.Statistics; using QuantProject.Business.DataProviders; using QuantProject.Business.Financial.Accounting; *************** *** 37,43 **** public class ComparableAccount : Account { ! private double maxAcceptableDrawDown = 30; ! private double minAcceptableWinningPeriods = 52; private IHistoricalQuoteProvider historicalQuoteProvider = --- 38,44 ---- public class ComparableAccount : Account { ! // private double maxAcceptableDrawDown = 30; ! // private double minAcceptableWinningPeriods = 52; private IHistoricalQuoteProvider historicalQuoteProvider = *************** *** 63,82 **** private double goodness() { ! double returnValue; if ( this.accountReport == null ) ! this.accountReport = this.CreateReport( this.Key , 1 , ! this.EndOfDayTimer.GetCurrentTime() , this.Key , ! this.historicalQuoteProvider ); // old goodness computation ! if ( ( (double)this.accountReport.Summary.MaxEquityDrawDown.Value >= ! this.maxAcceptableDrawDown ) ! || ( this.accountReport.Summary.TotalPnl <= ! (double)this.accountReport.Summary.BenchmarkPercentageReturn.Value ) ) ! returnValue = Double.MinValue; ! else ! // max draw down is acceptable and the strategy is better than buy and hold ! returnValue = (double)this.accountReport.Summary.ReturnOnAccount.Value - ! (double)this.accountReport.Summary.BenchmarkPercentageReturn.Value; // new goodness computation --- 64,94 ---- private double goodness() { ! double returnValue = Double.MinValue; if ( this.accountReport == null ) ! { ! this.accountReport = new AccountReport( ! this , this.historicalQuoteProvider ); ! this.accountReport.SetEquityLine( 1 , ! this.EndOfDayTimer.GetCurrentTime() ); ! returnValue = AdvancedFunctions.GetSharpeRatio( ! this.accountReport.EquityLine.GetReturns().Values ); ! } // old goodness computation ! // if ( this.accountReport == null ) ! // this.accountReport = this.CreateReport( this.Key , 1 , ! // this.EndOfDayTimer.GetCurrentTime() , this.Key , ! // this.historicalQuoteProvider ); ! ! // very old goodness computation ! // if ( ( (double)this.accountReport.Summary.MaxEquityDrawDown.Value >= ! // this.maxAcceptableDrawDown ) ! // || ( this.accountReport.Summary.TotalPnl <= ! // (double)this.accountReport.Summary.BenchmarkPercentageReturn.Value ) ) ! // returnValue = Double.MinValue; ! // else ! // // max draw down is acceptable and the strategy is better than buy and hold ! // returnValue = (double)this.accountReport.Summary.ReturnOnAccount.Value - ! // (double)this.accountReport.Summary.BenchmarkPercentageReturn.Value; // new goodness computation *************** *** 85,93 **** // else // returnValue = Convert.ToDouble( this.accountReport.Summary.PercentageWinningPeriods ); ! if ( (double)this.accountReport.Summary.PercentageWinningPeriods.Value < ! this.minAcceptableWinningPeriods ) ! returnValue = Double.MinValue; ! else ! returnValue = Convert.ToDouble( - (double)this.accountReport.Summary.MaxEquityDrawDown.Value ); return returnValue; --- 97,105 ---- // else // returnValue = Convert.ToDouble( this.accountReport.Summary.PercentageWinningPeriods ); ! // if ( (double)this.accountReport.Summary.PercentageWinningPeriods.Value < ! // this.minAcceptableWinningPeriods ) ! // returnValue = Double.MinValue; ! // else ! // returnValue = Convert.ToDouble( - (double)this.accountReport.Summary.MaxEquityDrawDown.Value ); return returnValue; |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:03:39
|
Update of /cvsroot/quantproject/QuantProject/b91_QuantProject In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15125/b91_QuantProject Modified Files: b91_QuantProject.csproj Log Message: Minor change automatically applied by Visual Studio.net Index: b91_QuantProject.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b91_QuantProject/b91_QuantProject.csproj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** b91_QuantProject.csproj 12 Mar 2005 23:58:02 -0000 1.9 --- b91_QuantProject.csproj 15 Oct 2005 18:03:31 -0000 1.10 *************** *** 89,97 **** /> <Reference - Name = "b7_Scripts" - Project = "{451DB77D-D4C7-44D1-8047-2920D864A4CD}" - Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" - /> - <Reference Name = "b1_ADT" Project = "{B8A01161-3698-4591-B1EF-90F5FC7D8DBA}" --- 89,92 ---- *************** *** 103,106 **** --- 98,106 ---- Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" /> + <Reference + Name = "b7_Scripts" + Project = "{451DB77D-D4C7-44D1-8047-2920D864A4CD}" + Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" + /> </References> </Build> |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:02:34
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14907/b7_Scripts Modified Files: b7_Scripts.csproj Log Message: EndOfDayTimerHandler.cs has been renamed to MyEndOfDayTimerHandler.cs, to cope with an apparent bug in the Visual Studio Environment: breakpoints were placed in the EndOfDayTimerHandler.cs file in a different folder, for a different strategies. Index: b7_Scripts.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/b7_Scripts.csproj,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** b7_Scripts.csproj 27 Sep 2005 22:29:58 -0000 1.38 --- b7_Scripts.csproj 15 Oct 2005 18:02:27 -0000 1.39 *************** *** 369,378 **** /> <File ! RelPath = "WalkForwardTesting\WalkForwardOneRank\EndOfDayTimerHandler.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "WalkForwardTesting\WalkForwardOneRank\IWalkForwardProgressNotifier.cs" SubType = "Code" BuildAction = "Compile" --- 369,378 ---- /> <File ! RelPath = "WalkForwardTesting\WalkForwardOneRank\IWalkForwardProgressNotifier.cs" SubType = "Code" BuildAction = "Compile" /> <File ! RelPath = "WalkForwardTesting\WalkForwardOneRank\MyEndOfDayTimerHandler.cs" SubType = "Code" BuildAction = "Compile" |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:01:47
|
Update of /cvsroot/quantproject/QuantProject/b5_Presentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14525/b5_Presentation Modified Files: b5_Presentation.csproj Log Message: Usual change to reference NPlot.dll Index: b5_Presentation.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b5_Presentation/b5_Presentation.csproj,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** b5_Presentation.csproj 19 Jun 2005 15:26:01 -0000 1.24 --- b5_Presentation.csproj 15 Oct 2005 18:01:31 -0000 1.25 *************** *** 116,124 **** /> <Reference - Name = "b4_Business" - Project = "{6EE31501-376E-491B-869E-F06D5B7C9C30}" - Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" - /> - <Reference Name = "Microsoft.Office.Core" Guid = "{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}" --- 116,119 ---- *************** *** 141,145 **** Name = "NPlot" AssemblyName = "NPlot" ! HintPath = "bin\Debug\NPlot.dll" /> </References> --- 136,145 ---- Name = "NPlot" AssemblyName = "NPlot" ! HintPath = "..\b91_QuantProject\bin\Debug\NPlot.dll" ! /> ! <Reference ! Name = "b4_Business" ! Project = "{6EE31501-376E-491B-869E-F06D5B7C9C30}" ! Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" /> </References> |
|
From: Glauco S. <gla...@us...> - 2005-10-15 18:00:31
|
Update of /cvsroot/quantproject/QuantProject/b4_Business In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14210/b4_Business Modified Files: b4_Business.csproj Log Message: - a1_Financial\a2_Accounting\EquityLine.cs has been added - a1_Financial\a2_Accounting\PositionType.cs has been added Index: b4_Business.csproj =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/b4_Business.csproj,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** b4_Business.csproj 3 Sep 2005 23:54:24 -0000 1.27 --- b4_Business.csproj 15 Oct 2005 18:00:19 -0000 1.28 *************** *** 273,276 **** --- 273,281 ---- /> <File + RelPath = "a1_Financial\a2_Accounting\EquityLine.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "a1_Financial\a2_Accounting\Portfolio.cs" SubType = "Code" *************** *** 283,286 **** --- 288,296 ---- /> <File + RelPath = "a1_Financial\a2_Accounting\PositionType.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "a1_Financial\a2_Accounting\TimedTransaction.cs" SubType = "Code" |
|
From: Glauco S. <gla...@us...> - 2005-10-15 17:59:43
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13931/b7_Scripts/WalkForwardTesting/WalkForwardOneRank Modified Files: ChosenTickers.cs Log Message: Bug fixed: now tickers are added to the list Index: ChosenTickers.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank/ChosenTickers.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ChosenTickers.cs 26 May 2005 23:36:53 -0000 1.6 --- ChosenTickers.cs 15 Oct 2005 17:59:35 -0000 1.7 *************** *** 69,74 **** string ticker = (string)bestPerformingTickers[ index ]; if ( account.DataStreamer.IsExchanged( ticker ) ) ! setTickers_build_handleTicker( ticker , ! account ); index++; } --- 69,75 ---- string ticker = (string)bestPerformingTickers[ index ]; if ( account.DataStreamer.IsExchanged( ticker ) ) ! // setTickers_build_handleTicker( ticker , ! // account ); ! this.Add( ticker , ticker ); index++; } |
|
From: Glauco S. <gla...@us...> - 2005-10-15 17:58:11
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13539/b4_Business/a1_Financial/a2_Accounting/h5_Reporting Modified Files: AccountReport.cs Log Message: An EquityLine is used instead of an equity history Index: AccountReport.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/AccountReport.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** AccountReport.cs 3 Sep 2005 23:58:31 -0000 1.15 --- AccountReport.cs 15 Oct 2005 17:58:03 -0000 1.16 *************** *** 55,59 **** private ReportTable roundTrades; private ReportTable equity; ! private History equityHistory; private Tables.Summary summary; --- 55,59 ---- private ReportTable roundTrades; private ReportTable equity; ! private EquityLine equityLine; private Tables.Summary summary; *************** *** 98,114 **** get { return equity; } } ! public History EquityHistory { get { ! if ( this.equityHistory == null ) // this.equityHistory has not been imported yet { ! this.equityHistory = new History(); ! this.equityHistory.Import( this.Equity.DataTable , QuantProject.Business.Financial.Accounting.Reporting.Tables.Equity.Date , QuantProject.Business.Financial.Accounting.Reporting.Tables.Equity.AccountValue ); } ! return this.equityHistory; } } --- 98,114 ---- get { return equity; } } ! public EquityLine EquityLine { get { ! if ( this.equityLine == null ) // this.equityHistory has not been imported yet { ! this.equityLine = new EquityLine(); ! this.equityLine.Import( this.Equity.DataTable , QuantProject.Business.Financial.Accounting.Reporting.Tables.Equity.Date , QuantProject.Business.Financial.Accounting.Reporting.Tables.Equity.AccountValue ); } ! return this.equityLine; } } *************** *** 248,255 **** { History benchmarkQuotes = HistoricalDataProvider.GetAdjustedCloseHistory( ! this.benchmark , (DateTime)this.EquityHistory.GetKey( 0 ) , ! (DateTime)this.EquityHistory.GetKey( this.EquityHistory.Count - 1 ) ); ! this.benchmarkEquityLine = benchmarkQuotes.Select( this.EquityHistory ); ! this.benchmarkEquityLine.Interpolate( this.EquityHistory.Keys , new PreviousInterpolator() ); } private void setDetailedDataTable( long numDaysForInterval ) --- 248,255 ---- { History benchmarkQuotes = HistoricalDataProvider.GetAdjustedCloseHistory( ! this.benchmark , (DateTime)this.EquityLine.GetKey( 0 ) , ! (DateTime)this.EquityLine.GetKey( this.EquityLine.Count - 1 ) ); ! this.benchmarkEquityLine = benchmarkQuotes.Select( this.EquityLine ); ! this.benchmarkEquityLine.Interpolate( this.EquityLine.Keys , new PreviousInterpolator() ); } private void setDetailedDataTable( long numDaysForInterval ) |
|
From: Glauco S. <gla...@us...> - 2005-10-15 17:53:17
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12332/b4_Business/a1_Financial/a2_Accounting Added Files: PositionType.cs Log Message: Position types --- NEW FILE: PositionType.cs --- /* QuantProject - Quantitative Finance Library PositionType.cs Copyright (C) 2003 Glauco Siliprandi 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; namespace QuantProject.Business.Financial.Accounting { /// <summary> /// Position types /// </summary> public enum PositionType { Long, Short } } |
|
From: Glauco S. <gla...@us...> - 2005-10-15 17:48:47
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11332/b4_Business/a1_Financial/a2_Accounting Added Files: EquityLine.cs Log Message: Equity line class --- NEW FILE: EquityLine.cs --- /* QuantProject - Quantitative Finance Library EquityLine.cs Copyright (C) 2003 Glauco Siliprandi 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 QuantProject.ADT.Histories; using QuantProject.Business.Financial.Instruments; namespace QuantProject.Business.Financial.Accounting { /// <summary> /// Equity line /// </summary> /// [Serializable] public class EquityLine : History { public EquityLine() : base() { } /// <summary> /// Computes the return history, for the equity line /// </summary> /// <returns></returns> public History GetReturns() { History returns = new History(); for ( int i = 0 ; i < this.Count - 1 ; i++ ) { if ( Convert.ToDouble( this.GetByIndex( i ) ) <= 0 ) throw new Exception( "This equity line contains a " + "non positive value. An equity line must be strictly positive " ); returns.Add( this.GetKey( i + 1 ) , ( Convert.ToDouble( this.GetByIndex( i+1 ) ) - Convert.ToDouble( this.GetByIndex( i ) ) ) / Convert.ToDouble( this.GetByIndex( i ) ) ); } return returns; } } } |
|
From: Glauco S. <gla...@us...> - 2005-10-15 17:46:42
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10804 Added Files: MyEndOfDayTimerHandler.cs Removed Files: EndOfDayTimerHandler.cs Log Message: EndOfDayTimerHandler.cs has been removed to MyEndOfDayTimerHandler.cs to cope with an apparent bug in the Visual Studio Environment: breakpoints were placed in the EndOfDayTimerHandler.cs file in a different folder, for a different strategies. --- NEW FILE: MyEndOfDayTimerHandler.cs --- /* QuantProject - Quantitative Finance Library TimerHandler.cs Copyright (C) 2003 Glauco Siliprandi 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.Collections; using QuantProject.ADT; using QuantProject.Business.DataProviders; using QuantProject.Business.Financial.Accounting; using QuantProject.Business.Financial.Instruments; using QuantProject.Business.Financial.Ordering; using QuantProject.Business.Timing; using QuantProject.Data.DataProviders; using QuantProject.Scripts.SimpleTesting; namespace QuantProject.Scripts.WalkForwardTesting.WalkForwardOneRank { public delegate void InSampleNewProgressEventHandler( Object sender , NewProgressEventArgs eventArgs ); /// <summary> /// Implements OneHourAfterMarketCloseEventHandler and TwoMinutesBeforeMarketCloseEventHandler. /// This is the core strategy! /// </summary> public class EndOfDayTimerHandler { private EligibleTickers eligibleTickers; private BestPerformingTickers bestPerformingTickers; private ChosenTickers chosenTickers; private int numberEligibleTickers; private int numberBestPeformingTickers; private int numberOfTickersToBeChosen; private int inSampleWindowDays; private int outOfSampleWindowDays; private Account account; private HistoricalAdjustedQuoteProvider historicalAdjustedQuoteProvider; public event InSampleNewProgressEventHandler InSampleNewProgress; public int NumberEligibleTickers { get { return this.numberEligibleTickers; } } public int NumberBestPeformingTickers { get { return this.numberBestPeformingTickers; } } public Account Account { get { return this.account; } } /// <summary> /// /// </summary> /// <param name="numberEligibleTickers">number of tickers to be chosen with the first selection: /// the best performers will be chosen among these first selected instruments</param> /// <param name="numberBestPeformingTickers">number of instruments to be chosen, as the best /// performers, among the eligible tickers</param> /// <param name="numberOfTickersToBeChosen">number of instruments to be chosen, /// among the best performers</param> /// <param name="windowDays">number of days between two consecutive /// best performing ticker calculation</param> public EndOfDayTimerHandler( int numberEligibleTickers , int numberBestPeformingTickers , int numberOfTickersToBeChosen , int inSampleWindowDays , int outOfSampleWindowDays , Account account ) { this.numberEligibleTickers = numberEligibleTickers; this.numberBestPeformingTickers = numberBestPeformingTickers; this.numberOfTickersToBeChosen = numberOfTickersToBeChosen; this.inSampleWindowDays = inSampleWindowDays; this.outOfSampleWindowDays = outOfSampleWindowDays; this.account = account; this.eligibleTickers = new EligibleTickers( numberEligibleTickers , inSampleWindowDays ); this.bestPerformingTickers = new BestPerformingTickers( numberBestPeformingTickers , this.inSampleWindowDays ); this.bestPerformingTickers.NewProgress += new NewProgressEventHandler( this.bestPerformingNewProgress ); this.chosenTickers = new ChosenTickers( this.numberOfTickersToBeChosen ); this.historicalAdjustedQuoteProvider = new HistoricalAdjustedQuoteProvider(); } private void bestPerformingNewProgress( Object sender , NewProgressEventArgs eventArgs ) { this.InSampleNewProgress( sender , eventArgs ); } #region OneHourAfterMarketCloseEventHandler private void oneHourAfterMarketCloseEventHandler_orderChosenTickers_closePositions( IEndOfDayTimer endOfDayTimer ) { foreach ( Position position in this.account.Portfolio ) if ( this.chosenTickers.Contains( position.Instrument.Key ) ) { this.account.ClosePosition( position ); } } private void oneHourAfterMarketCloseEventHandler_orderChosenTickers_openPositions_forTicker( string ticker ) { double cashForSinglePosition = this.account.CashAmount / this.numberOfTickersToBeChosen; long quantity = Convert.ToInt64( Math.Floor( cashForSinglePosition / this.account.DataStreamer.GetCurrentBid( ticker ) ) ); Order order = new Order( OrderType.MarketBuy , new Instrument( ticker ) , quantity ); this.account.AddOrder( order ); } private void oneHourAfterMarketCloseEventHandler_orderChosenTickers_openPositions() { foreach ( string ticker in this.chosenTickers.Keys ) if ( !this.account.Contains( ticker ) ) { oneHourAfterMarketCloseEventHandler_orderChosenTickers_openPositions_forTicker( ticker ); } } private void oneHourAfterMarketCloseEventHandler_orderChosenTickers( IEndOfDayTimer endOfDayTimer ) { this.oneHourAfterMarketCloseEventHandler_orderChosenTickers_closePositions( endOfDayTimer ); this.oneHourAfterMarketCloseEventHandler_orderChosenTickers_openPositions(); } /// <summary> /// Handles a "One hour after market close" event. /// </summary> /// <param name="sender"></param> /// <param name="eventArgs"></param> public void OneHourAfterMarketCloseEventHandler( Object sender , EndOfDayTimingEventArgs endOfDayTimingEventArgs ) { if ( ( this.eligibleTickers.Count == 0 ) || ( endOfDayTimingEventArgs.EndOfDayDateTime.DateTime.CompareTo( this.bestPerformingTickers.LastUpdate.AddDays( this.outOfSampleWindowDays ) ) >= 0 ) ) // either eligible tickers have never been defined yet // or this.outOfSampleWindowDays days elapsed since last best performing tickers calculation { this.eligibleTickers.SetTickers( endOfDayTimingEventArgs.EndOfDayDateTime.DateTime ); this.bestPerformingTickers.SetTickers( this.eligibleTickers , endOfDayTimingEventArgs.EndOfDayDateTime.DateTime ); } // oneHourAfterMarketCloseEventHandler_orderChosenTickers( ( IEndOfDayTimer ) sender ); } #endregion #region FiveMinutesBeforeMarketCloseEventHandler private void fiveMinutesBeforeMarketCloseEventHandler_closePosition( string ticker ) { this.account.ClosePosition( ticker ); } private void fiveMinutesBeforeMarketCloseEventHandler_closePositions() { ArrayList tickers = new ArrayList(); foreach ( string ticker in this.account.Portfolio.Keys ) tickers.Add( ticker ); foreach ( string ticker in tickers ) fiveMinutesBeforeMarketCloseEventHandler_closePosition( ticker ); } private bool todayHigherThanYesterday( string ticker ) { double todayMarketValueAtClose = this.account.DataStreamer.GetCurrentBid( ticker ); EndOfDayDateTime yesterdayAtClose = new EndOfDayDateTime( this.account.EndOfDayTimer.GetCurrentTime().DateTime.AddDays( - 1 ) , EndOfDaySpecificTime.MarketClose ); double yesterdayMarketValueAtClose = this.historicalAdjustedQuoteProvider.GetMarketValue( ticker , yesterdayAtClose ); bool returnValue = ( todayMarketValueAtClose > yesterdayMarketValueAtClose ); return returnValue; } private void fiveMinutesBeforeMarketCloseEventHandler_openPosition( string ticker ) { double maxPositionValue = this.account.GetMarketValue() / this.numberOfTickersToBeChosen; long sharesToBeTraded = OneRank.MaxBuyableShares( ticker , maxPositionValue , this.account.DataStreamer ); if ( this.todayHigherThanYesterday( ticker ) ) // today close value for ticker is higher than yesterday // close for ticker this.account.AddOrder( new Order( OrderType.MarketBuy , new Instrument( ticker ) , sharesToBeTraded ) ); else // today close value for ticker is not higher than yesterday // close for ticker this.account.AddOrder( new Order( OrderType.MarketSellShort , new Instrument( ticker ) , sharesToBeTraded ) ); } private void fiveMinutesBeforeMarketCloseEventHandler_openPositions() { this.chosenTickers.SetTickers( this.bestPerformingTickers , this.account ); foreach ( string ticker in this.chosenTickers.Keys ) this.fiveMinutesBeforeMarketCloseEventHandler_openPosition( ticker ); } public void FiveMinutesBeforeMarketCloseEventHandler( Object sender , EndOfDayTimingEventArgs endOfDayTimingEventArgs ) { this.fiveMinutesBeforeMarketCloseEventHandler_closePositions(); fiveMinutesBeforeMarketCloseEventHandler_openPositions(); } #endregion } } --- EndOfDayTimerHandler.cs DELETED --- |
|
From: Marco M. <mi...@us...> - 2005-10-07 16:52:40
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4724/Downloader Modified Files: TickerDownloader.cs Log Message: Fixed bug. Now new adjusted quotes are properly committed to database. Index: TickerDownloader.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/TickerDownloader.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** TickerDownloader.cs 2 Jun 2005 17:52:09 -0000 1.16 --- TickerDownloader.cs 7 Oct 2005 16:52:28 -0000 1.17 *************** *** 325,332 **** { this.updateCurrentStatusAdjustedClose("Changed!"); ! if (this.p_myForm.IsCheckCloseToCloseSelected && ! Quotes.IsAdjustedCloseToCloseRatioChanged(this.p_quTicker, this.getTableOfDownloadedValues(Quotes.GetStartDate(this.p_quTicker), ! Quotes.GetEndDate(this.p_quTicker)))) { this.updateCurrentStatusAdjustedCloseToCloseRatio("Changed at " + --- 325,332 ---- { this.updateCurrentStatusAdjustedClose("Changed!"); ! if (Quotes.IsAdjustedCloseToCloseRatioChanged(this.p_quTicker, this.getTableOfDownloadedValues(Quotes.GetStartDate(this.p_quTicker), ! Quotes.GetEndDate(this.p_quTicker))) && ! this.p_myForm.IsCheckCloseToCloseSelected) { this.updateCurrentStatusAdjustedCloseToCloseRatio("Changed at " + |
|
From: Marco M. <mi...@us...> - 2005-09-27 22:32:51
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11623/b7_Scripts Modified Files: Scripts.prjx Log Message: Updated #develop projects files. Index: Scripts.prjx =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/Scripts.prjx,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Scripts.prjx 28 Aug 2005 10:06:27 -0000 1.12 --- Scripts.prjx 27 Sep 2005 22:32:40 -0000 1.13 *************** *** 56,59 **** --- 56,61 ---- <File name=".\EvaluatingOptimizationTechnique\OptimizationTechniqueEvaluator.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> <File name=".\EvaluatingOptimizationTechnique\EfficientPortfolio\RunTestingOptimizationOpenToClose.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> + <File name=".\TickerSelectionTesting\EndOfDayTimerHandlerCTOMultiAccount.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> + <File name=".\TickerSelectionTesting\RunEfficientCTOPortfolioMultiAccount.cs" subtype="Code" buildaction="Compile" dependson="" data="" /> </Contents> <References> |