quantproject-developers Mailing List for QuantProject (Page 126)
Brought to you by:
glauco_1
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(7) |
Nov
(103) |
Dec
(67) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(52) |
Feb
(9) |
Mar
(69) |
Apr
(53) |
May
(80) |
Jun
(23) |
Jul
(24) |
Aug
(112) |
Sep
(9) |
Oct
|
Nov
(58) |
Dec
(93) |
| 2005 |
Jan
(90) |
Feb
(93) |
Mar
(61) |
Apr
(56) |
May
(37) |
Jun
(61) |
Jul
(55) |
Aug
(68) |
Sep
(25) |
Oct
(46) |
Nov
(41) |
Dec
(37) |
| 2006 |
Jan
(33) |
Feb
(7) |
Mar
(19) |
Apr
(27) |
May
(73) |
Jun
(49) |
Jul
(83) |
Aug
(66) |
Sep
(45) |
Oct
(16) |
Nov
(15) |
Dec
(7) |
| 2007 |
Jan
(14) |
Feb
(33) |
Mar
|
Apr
(21) |
May
|
Jun
(34) |
Jul
(18) |
Aug
(100) |
Sep
(39) |
Oct
(55) |
Nov
(12) |
Dec
(2) |
| 2008 |
Jan
(120) |
Feb
(133) |
Mar
(129) |
Apr
(104) |
May
(42) |
Jun
(2) |
Jul
(52) |
Aug
(99) |
Sep
(134) |
Oct
|
Nov
(137) |
Dec
(48) |
| 2009 |
Jan
(48) |
Feb
(55) |
Mar
(61) |
Apr
(3) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(51) |
Sep
|
Oct
(7) |
Nov
|
Dec
|
| 2010 |
Jan
(7) |
Feb
(1) |
Mar
(145) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(8) |
Dec
|
| 2011 |
Jan
(78) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(88) |
Sep
(6) |
Oct
(1) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
(6) |
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Glauco S. <gla...@us...> - 2004-11-29 16:23:35
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/MSFTSimpleTest_2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22791/b7_Scripts/SimpleTesting/MSFTSimpleTest_2 Modified Files: RunMSFTsimpleTest_2.cs Log Message: ExtededDateTime has been replaced by EndOfDayDateTime Index: RunMSFTsimpleTest_2.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/MSFTSimpleTest_2/RunMSFTsimpleTest_2.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RunMSFTsimpleTest_2.cs 15 Aug 2004 00:07:48 -0000 1.4 --- RunMSFTsimpleTest_2.cs 29 Nov 2004 16:23:19 -0000 1.5 *************** *** 28,34 **** using QuantProject.Business.Financial.Accounting.Reporting; using QuantProject.Business.Financial.Instruments; - using QuantProject.Business.Testing; using QuantProject.Business.Strategies; using QuantProject.Business.Scripting; using QuantProject.Presentation.Reporting.MicrosoftExcel; --- 28,35 ---- using QuantProject.Business.Financial.Accounting.Reporting; using QuantProject.Business.Financial.Instruments; using QuantProject.Business.Strategies; using QuantProject.Business.Scripting; + using QuantProject.Business.Testing; + using QuantProject.Business.Timing; using QuantProject.Presentation.Reporting.MicrosoftExcel; *************** *** 80,84 **** tester.Test(); ((History)tester.Account.GetProfitNetLossHistory( ! new ExtendedDateTime( endDateTime , BarComponent.Close ) ) ).ReportToConsole(); // tester.Account.AccountReport.ReportToExcel( "MSFT" , --- 81,85 ---- tester.Test(); ((History)tester.Account.GetProfitNetLossHistory( ! new EndOfDayDateTime( endDateTime , EndOfDaySpecificTime.MarketClose ) ) ).ReportToConsole(); // tester.Account.AccountReport.ReportToExcel( "MSFT" , *************** *** 86,90 **** AccountReport accountReport = tester.Account.CreateReport( "MSFT" , 7 , ! new ExtendedDateTime( endDateTime , BarComponent.Close ) , "MSFT" ); ExcelManager.Add( accountReport ); ExcelManager.ShowReport(); --- 87,91 ---- AccountReport accountReport = tester.Account.CreateReport( "MSFT" , 7 , ! new EndOfDayDateTime( endDateTime , EndOfDaySpecificTime.OneHourAfterMarketClose ) , "MSFT" ); ExcelManager.Add( accountReport ); ExcelManager.ShowReport(); |
|
From: Glauco S. <gla...@us...> - 2004-11-29 16:20:59
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/MSFTsimpleTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22186/b7_Scripts/SimpleTesting/MSFTsimpleTest Modified Files: RunMSFTsimpleTest.cs Log Message: ExtededDateTime has been replaced by EndOfDayDateTime Index: RunMSFTsimpleTest.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/MSFTsimpleTest/RunMSFTsimpleTest.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RunMSFTsimpleTest.cs 15 Aug 2004 00:07:48 -0000 1.2 --- RunMSFTsimpleTest.cs 29 Nov 2004 16:20:41 -0000 1.3 *************** *** 28,34 **** using QuantProject.Business.Financial.Accounting.Reporting; using QuantProject.Business.Financial.Instruments; - using QuantProject.Business.Testing; using QuantProject.Business.Strategies; using QuantProject.Business.Scripting; using QuantProject.Presentation.Reporting.Console; using QuantProject.Presentation.Reporting.MicrosoftExcel; --- 28,35 ---- using QuantProject.Business.Financial.Accounting.Reporting; using QuantProject.Business.Financial.Instruments; using QuantProject.Business.Strategies; using QuantProject.Business.Scripting; + using QuantProject.Business.Testing; + using QuantProject.Business.Timing; using QuantProject.Presentation.Reporting.Console; using QuantProject.Presentation.Reporting.MicrosoftExcel; *************** *** 78,82 **** ((History)tester.Account.GetProfitNetLossHistory( ! new ExtendedDateTime( endDateTime , BarComponent.Close ) ) ).ReportToConsole(); // tester.Account.AccountReport.ReportToExcel( "MSFT" , --- 79,83 ---- ((History)tester.Account.GetProfitNetLossHistory( ! new EndOfDayDateTime( endDateTime , EndOfDaySpecificTime.MarketClose ) ) ).ReportToConsole(); // tester.Account.AccountReport.ReportToExcel( "MSFT" , *************** *** 84,88 **** AccountReport accountReport = tester.Account.CreateReport( "MSFT" , 7 , ! new ExtendedDateTime( endDateTime , BarComponent.Close ) , "MSFT" ); ExcelManager.Add( accountReport ); ExcelManager.ShowReport(); --- 85,89 ---- AccountReport accountReport = tester.Account.CreateReport( "MSFT" , 7 , ! new EndOfDayDateTime( endDateTime , EndOfDaySpecificTime.OneHourAfterMarketClose ) , "MSFT" ); ExcelManager.Add( accountReport ); ExcelManager.ShowReport(); |
|
From: Glauco S. <gla...@us...> - 2004-11-29 16:20:10
|
Update of /cvsroot/quantproject/QuantProject/b5_Presentation/Reporting/WindowsForm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21964/b5_Presentation/Reporting/WindowsForm Modified Files: Report.cs Log Message: ExtededDateTime has been replaced by EndOfDayDateTime Index: Report.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b5_Presentation/Reporting/WindowsForm/Report.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Report.cs 6 Aug 2004 13:46:21 -0000 1.2 --- Report.cs 29 Nov 2004 16:20:00 -0000 1.3 *************** *** 25,28 **** --- 25,29 ---- using QuantProject.Business.Financial.Accounting; using QuantProject.Business.Financial.Accounting.Reporting; + using QuantProject.Business.Timing; namespace QuantProject.Presentation.Reporting.WindowsForm *************** *** 46,50 **** /// </summary> private void show_set_accountReport( string reportName , ! int numDaysForInterval , ExtendedDateTime endDateTime , string buyAndHoldTicker ) { if ( this.accountReport == null ) --- 47,51 ---- /// </summary> private void show_set_accountReport( string reportName , ! int numDaysForInterval , EndOfDayDateTime endDateTime , string buyAndHoldTicker ) { if ( this.accountReport == null ) *************** *** 61,65 **** } public void Show( string reportName , ! int numDaysForInterval , ExtendedDateTime endDateTime , string buyAndHoldTicker ) { this.show_set_accountReport( reportName , --- 62,66 ---- } public void Show( string reportName , ! int numDaysForInterval , EndOfDayDateTime endDateTime , string buyAndHoldTicker ) { this.show_set_accountReport( reportName , |
|
From: Glauco S. <gla...@us...> - 2004-11-29 16:19:27
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/DataProviders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21755/b3_Data/DataProviders Modified Files: Quote.cs Log Message: Fixed a public property name Index: Quote.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/DataProviders/Quote.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Quote.cs 28 Aug 2004 16:57:31 -0000 1.1 --- Quote.cs 29 Nov 2004 16:19:16 -0000 1.2 *************** *** 47,51 **** } ! public ExtendedDateTime ExtendedDataTable { get { return this.extendedDateTime; } --- 47,51 ---- } ! public ExtendedDateTime ExtendedDateTime { get { return this.extendedDateTime; } |
|
From: Glauco S. <gla...@us...> - 2004-11-29 16:18:27
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21531/b4_Business/a1_Financial/a2_Accounting Modified Files: Portfolio.cs Log Message: - added Contains( string ticker ) - ExtededDateTime has been replaced by EndOfDayDateTime Index: Portfolio.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Portfolio.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Portfolio.cs 13 Oct 2003 21:58:40 -0000 1.1.1.1 --- Portfolio.cs 29 Nov 2004 16:18:17 -0000 1.2 *************** *** 26,29 **** --- 26,30 ---- using QuantProject.ADT; using QuantProject.Business.Financial.Instruments; + using QuantProject.Business.Timing; namespace QuantProject.Business.Financial.Accounting *************** *** 44,52 **** } ! public bool Contains( Instrument instrument ) ! { ! return base.ContainsKey( instrument ) || ! base.ContainsKey( instrument.Key ); ! } public bool IsLong( Instrument instrument ) --- 45,63 ---- } ! public bool Contains( Instrument instrument ) ! { ! return base.ContainsKey( instrument ) || ! base.ContainsKey( instrument.Key ); ! } ! /// <summary> ! /// True iff the instrument corresponding to ticker is already ! /// into the portfolio ! /// </summary> ! /// <param name="ticker"></param> ! /// <returns></returns> ! public bool Contains( string ticker ) ! { ! return this.ContainsKey( ticker ); ! } public bool IsLong( Instrument instrument ) *************** *** 90,94 **** ! public bool Update( TimedTransaction transaction ) { bool errorArised = false; --- 101,105 ---- ! public bool Update( Transaction transaction ) { bool errorArised = false; *************** *** 113,125 **** #endregion ! public double GetMarketValue( ExtendedDateTime extendedDateTime ) ! { ! double totalValue = 0; ! foreach (Position position in this.Values) ! totalValue = position.Instrument.GetMarketValue( extendedDateTime ) * position.Quantity; ! return totalValue; ! } ! public override string ToString() { string toString = ""; --- 124,136 ---- #endregion ! public double GetMarketValue( EndOfDayDateTime endOfDayDateTime ) ! { ! double totalValue = 0; ! foreach (Position position in this.Values) ! totalValue = position.Instrument.GetMarketValue( endOfDayDateTime ) * position.Quantity; ! return totalValue; ! } ! public override string ToString() { string toString = ""; |
|
From: Glauco S. <gla...@us...> - 2004-11-29 16:15:48
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a3_Ordering In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20824/b4_Business/a1_Financial/a3_Ordering Modified Files: Order.cs OrderManager.cs Log Message: ExtededDateTime has been replaced by EndOfDayDateTime Index: Order.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a3_Ordering/Order.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Order.cs 13 Oct 2003 21:59:04 -0000 1.1.1.1 --- Order.cs 29 Nov 2004 16:15:37 -0000 1.2 *************** *** 22,27 **** using System; ! using QuantProject.Business.Financial.Instruments; using QuantProject.ADT; namespace QuantProject.Business.Financial.Ordering --- 22,30 ---- using System; ! using QuantProject.ADT; + using QuantProject.Business.Financial.Instruments; + using QuantProject.Business.Timing; + namespace QuantProject.Business.Financial.Ordering *************** *** 35,39 **** private Instrument instrument; private long quantity; ! private ExtendedDateTime extendedDateTime; public OrderType Type --- 38,42 ---- private Instrument instrument; private long quantity; ! private EndOfDayDateTime endOfDayDateTime; public OrderType Type *************** *** 55,62 **** } ! public ExtendedDateTime ExtendedDateTime { ! get { return extendedDateTime; } ! set { extendedDateTime=value; } } --- 58,65 ---- } ! public EndOfDayDateTime EndOfDayDateTime { ! get { return endOfDayDateTime; } ! set { endOfDayDateTime=value; } } *************** *** 68,79 **** // } ! public Order( OrderType orderType , Instrument instrument , ! long quantity , ExtendedDateTime extendedDateTime ) ! { ! Type = orderType; ! this.Instrument = instrument; ! Quantity = quantity; ! this.extendedDateTime = extendedDateTime; ! } ! } } --- 71,90 ---- // } ! private void order( OrderType orderType , Instrument instrument , long quantity ) ! { ! Type = orderType; ! this.Instrument = instrument; ! Quantity = quantity; ! } ! public Order( OrderType orderType , Instrument instrument , long quantity ) ! { ! this.order( orderType , instrument , quantity ); ! } ! public Order( OrderType orderType , Instrument instrument , ! long quantity , EndOfDayDateTime endOfDayDateTime ) ! { ! this.order( orderType , instrument , quantity ); ! this.endOfDayDateTime = endOfDayDateTime; ! } ! } } Index: OrderManager.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a3_Ordering/OrderManager.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OrderManager.cs 23 Aug 2004 22:36:48 -0000 1.2 --- OrderManager.cs 29 Nov 2004 16:15:37 -0000 1.3 *************** *** 26,29 **** --- 26,30 ---- using QuantProject.Data.DataProviders; using QuantProject.Business.Financial.Accounting; + using QuantProject.Business.Financial.Accounting.Transactions; namespace QuantProject.Business.Financial.Ordering *************** *** 43,47 **** public virtual double GetInstrumentPrice( Order order ) { ! return HistoricalDataProvider.GetMarketValue( order.Instrument.Key , order.ExtendedDateTime ); } #region "GetTransaction" --- 44,49 ---- public virtual double GetInstrumentPrice( Order order ) { ! return HistoricalDataProvider.GetMarketValue( order.Instrument.Key , ! order.EndOfDayDateTime.GetNearestExtendedDateTime() ); } #region "GetTransaction" *************** *** 78,93 **** TimedTransaction transaction = new TimedTransaction( getTransactionType( order ) , order.Instrument , ! order.Quantity , order.Instrument.GetMarketValue( order.ExtendedDateTime ) , ! order.ExtendedDateTime ); return transaction; } #endregion ! public Transactions GetTransactions( ArrayList orders ) { ! Transactions transactions = new Transactions(); foreach (Order order in orders) ! transactions.Add( this.GetTransaction( order ) ); ! return transactions; } } --- 80,95 ---- TimedTransaction transaction = new TimedTransaction( getTransactionType( order ) , order.Instrument , ! order.Quantity , order.Instrument.GetMarketValue( order.EndOfDayDateTime ) , ! order.EndOfDayDateTime.GetNearestExtendedDateTime() ); return transaction; } #endregion ! public TransactionHistory GetTransactions( ArrayList orders ) { ! TransactionHistory transactionHistory = new TransactionHistory(); foreach (Order order in orders) ! transactionHistory.Add( this.GetTransaction( order ) ); ! return transactionHistory; } } |
|
From: Glauco S. <gla...@us...> - 2004-11-29 16:14:06
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20488/b7_Scripts Modified Files: MyTradingSystem.cs Log Message: ExtededDateTime has been replaced by EndOfDayDateTime Index: MyTradingSystem.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/MyTradingSystem.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** MyTradingSystem.cs 13 Oct 2003 21:59:59 -0000 1.1.1.1 --- MyTradingSystem.cs 29 Nov 2004 16:13:55 -0000 1.2 *************** *** 29,32 **** --- 29,33 ---- using QuantProject.Business.Financial.Ordering; using QuantProject.Business.Strategies; + using QuantProject.Business.Timing; namespace QuantProject.Scripts *************** *** 63,68 **** { signal.Add( new Order( OrderType.MarketBuy , new Instrument( "MSFT" ) , 1 , ! new ExtendedDateTime( new Instrument( "MSFT" ).GetNextMarketDay( extendedDateTime.DateTime ) , ! BarComponent.Open ) ) ); signals.Add( signal ); } --- 64,69 ---- { signal.Add( new Order( OrderType.MarketBuy , new Instrument( "MSFT" ) , 1 , ! new EndOfDayDateTime( new Instrument( "MSFT" ).GetNextMarketDay( extendedDateTime.DateTime ) , ! EndOfDaySpecificTime.MarketOpen ) ) ); signals.Add( signal ); } *************** *** 76,81 **** { signal.Add( new Order( OrderType.MarketSell , new Instrument( "MSFT" ) , 1 , ! new ExtendedDateTime( new Instrument( "MSFT" ).GetNextMarketDay( extendedDateTime.DateTime ) , ! BarComponent.Open ) ) ); signals.Add( signal ); } --- 77,82 ---- { signal.Add( new Order( OrderType.MarketSell , new Instrument( "MSFT" ) , 1 , ! new EndOfDayDateTime( new Instrument( "MSFT" ).GetNextMarketDay( extendedDateTime.DateTime ) , ! EndOfDaySpecificTime.MarketOpen ) ) ); signals.Add( signal ); } |
|
From: Glauco S. <gla...@us...> - 2004-11-29 16:12:47
|
Update of /cvsroot/quantproject/QuantProject/b91_QuantProject In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20290/b91_QuantProject Modified Files: Main.cs Log Message: RunWalkForwardOneRank is the new default script, now Index: Main.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b91_QuantProject/Main.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Main.cs 1 Aug 2004 00:35:58 -0000 1.5 --- Main.cs 29 Nov 2004 16:12:37 -0000 1.6 *************** *** 27,30 **** --- 27,31 ---- using System.Windows.Forms; using QuantProject.Scripts; + using QuantProject.Scripts.WalkForwardTesting.WalkForwardOneRank; namespace QuantProject.Principale *************** *** 227,234 **** // new RunMSFTsimpleTest_2().Run(); //new RunOneRankWithExcelReport().Run(); ! new RunOneRankWithWindowsReport().Run(); //new RunMSFTwalkForward().Run(); //new RunMultiTestOneRank().Run(); ! } //catch ( Exception ex ) --- 228,235 ---- // new RunMSFTsimpleTest_2().Run(); //new RunOneRankWithExcelReport().Run(); ! // new RunOneRankWithWindowsReport().Run(); //new RunMSFTwalkForward().Run(); //new RunMultiTestOneRank().Run(); ! new RunWalkForwardOneRank().Run(); } //catch ( Exception ex ) |
|
From: Glauco S. <gla...@us...> - 2004-11-29 16:11:45
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20062/b1_ADT Modified Files: Keyed.cs Log Message: Indentation changes Index: Keyed.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b1_ADT/Keyed.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Keyed.cs 13 Oct 2003 21:57:25 -0000 1.1.1.1 --- Keyed.cs 29 Nov 2004 16:11:34 -0000 1.2 *************** *** 28,59 **** /// Summary description for Keyed. /// </summary> ! [Serializable] ! public class Keyed ! { ! private string key; ! public string Key ! { ! get ! { ! return key; ! } ! set ! { ! key = value; ! } ! } ! public Keyed() ! { ! // ! // TODO: Add constructor logic here ! // ! } ! public Keyed( string key ) ! { ! Key = key; ! } ! } } --- 28,59 ---- /// Summary description for Keyed. /// </summary> ! [Serializable] ! public class Keyed ! { ! private string key; ! public string Key ! { ! get ! { ! return key; ! } ! set ! { ! key = value; ! } ! } ! public Keyed() ! { ! // ! // TODO: Add constructor logic here ! // ! } ! public Keyed( string key ) ! { ! Key = key; ! } ! } } |
|
From: Glauco S. <gla...@us...> - 2004-11-29 16:10:35
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a1_Instruments In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19808/b4_Business/a1_Financial/a1_Instruments Modified Files: Instrument.cs Log Message: ExtededDateTime has been replaced by EndOfDayDateTime Index: Instrument.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a1_Instruments/Instrument.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Instrument.cs 23 Aug 2004 22:36:47 -0000 1.3 --- Instrument.cs 29 Nov 2004 16:10:24 -0000 1.4 *************** *** 25,28 **** --- 25,29 ---- using QuantProject.ADT.Histories; using QuantProject.Data.DataProviders; + using QuantProject.Business.Timing; namespace QuantProject.Business.Financial.Instruments *************** *** 42,54 **** } ! public double GetMarketValue( ExtendedDateTime extendedDateTime ) { ! return HistoricalDataProvider.GetMarketValue( this.Key , extendedDateTime ); } public long GetMaxBuyableQuantity( double availableAmount , ! ExtendedDateTime extendedDateTime ) { ! return (long) Math.Floor( availableAmount / this.GetMarketValue( extendedDateTime ) ); } --- 43,56 ---- } ! public double GetMarketValue( EndOfDayDateTime endOfDayDateTime ) { ! return HistoricalDataProvider.GetMarketValue( this.Key , endOfDayDateTime.DateTime , ! endOfDayDateTime.GetNearestBarComponent() ); } public long GetMaxBuyableQuantity( double availableAmount , ! EndOfDayDateTime endOfDayDateTime ) { ! return (long) Math.Floor( availableAmount / this.GetMarketValue( endOfDayDateTime ) ); } |
|
From: Glauco S. <gla...@us...> - 2004-11-29 16:09:27
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/DataProviders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19560/b3_Data/DataProviders Modified Files: IDataStreamer.cs Log Message: - added GetCurrentBid - added GetCurrentAsk Index: IDataStreamer.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/DataProviders/IDataStreamer.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IDataStreamer.cs 28 Aug 2004 16:53:30 -0000 1.1 --- IDataStreamer.cs 29 Nov 2004 16:09:09 -0000 1.2 *************** *** 38,41 **** { event NewQuoteEventHandler NewQuote; ! } } --- 38,43 ---- { event NewQuoteEventHandler NewQuote; ! double GetCurrentBid( string ticker ); ! double GetCurrentAsk( string ticker ); ! } } |
|
From: Glauco S. <gla...@us...> - 2004-11-29 16:08:32
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/DataProviders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19405/b3_Data/DataProviders Modified Files: HistoricalDataStreamer.cs Log Message: - added GetCurrentBid - added GetCurrentAsk Index: HistoricalDataStreamer.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/DataProviders/HistoricalDataStreamer.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HistoricalDataStreamer.cs 28 Aug 2004 16:55:13 -0000 1.1 --- HistoricalDataStreamer.cs 29 Nov 2004 16:08:21 -0000 1.2 *************** *** 25,28 **** --- 25,29 ---- using QuantProject.ADT; + namespace QuantProject.Data.DataProviders { *************** *** 69,72 **** --- 70,93 ---- /// <summary> + /// Returns the current bid for the given ticker + /// </summary> + /// <param name="ticker"></param> + /// <returns></returns> + public double GetCurrentBid( string ticker ) + { + return HistoricalDataProvider.GetMarketValue( ticker , + this.timer.CurrentDateTime ); + } + /// <summary> + /// Returns the current ask for the given ticker + /// </summary> + /// <param name="ticker"></param> + /// <returns></returns> + public double GetCurrentAsk( string ticker ) + { + return HistoricalDataProvider.GetMarketValue( ticker , + this.timer.CurrentDateTime ); + } + /// <summary> /// Starts the time walking simulation /// </summary> |
|
From: Glauco S. <gla...@us...> - 2004-11-29 16:05:27
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/DataProviders In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18780/b3_Data/DataProviders Modified Files: HistoricalDataProvider.cs Log Message: An automatic quote caching tecnique has been implemented. Index: HistoricalDataProvider.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/DataProviders/HistoricalDataProvider.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HistoricalDataProvider.cs 28 Aug 2004 17:24:57 -0000 1.2 --- HistoricalDataProvider.cs 29 Nov 2004 16:05:04 -0000 1.3 *************** *** 126,138 **** } public static double GetMarketValue( string instrumentKey , ExtendedDateTime extendedDateTime ) ! { ! //DateTime dateTime = ! return Convert.ToDouble( ! ( (History) ((Hashtable) ! cachedHistories[ instrumentKey ])[ extendedDateTime.BarComponent ] ).GetByIndex( ! ( (History) ((Hashtable) cachedHistories[ instrumentKey ])[ extendedDateTime.BarComponent ] ! ).IndexOfKeyOrPrevious( extendedDateTime.DateTime ) ) ); ! } /// <summary> --- 126,161 ---- } + private static void cache( string instrumentKey , BarComponent barComponent ) + { + if ( !cachedHistories.ContainsKey( instrumentKey ) ) + // no component at all for the instrument instrumentKey has been cached yet + cachedHistories.Add( instrumentKey , new Hashtable() ); + ((Hashtable)cachedHistories[ instrumentKey ]).Add( barComponent , + DataBase.GetHistory( instrumentKey , barComponent ) ); + } public static double GetMarketValue( string instrumentKey , ExtendedDateTime extendedDateTime ) ! { ! if ( !cachedHistories.ContainsKey( instrumentKey ) || ! !(((Hashtable)cachedHistories[ instrumentKey ]).ContainsKey( ! extendedDateTime.BarComponent)) ) ! // the instrument instrumentKey has not been cached yet, for the given bar component ! cache( instrumentKey , extendedDateTime.BarComponent ); ! return Convert.ToDouble( ! ( (History) ((Hashtable) ! cachedHistories[ instrumentKey ])[ extendedDateTime.BarComponent ] ).GetByIndex( ! ( (History) ((Hashtable) cachedHistories[ instrumentKey ])[ extendedDateTime.BarComponent ] ! ).IndexOfKeyOrPrevious( extendedDateTime.DateTime ) ) ); ! } ! ! public static double GetMarketValue( string instrumentKey , DateTime dateTime , ! BarComponent barComponent ) ! { ! //DateTime dateTime = ! return Convert.ToDouble( ! ( (History) ((Hashtable) ! cachedHistories[ instrumentKey ])[ barComponent ] ).GetByIndex( ! ( (History) ((Hashtable) cachedHistories[ instrumentKey ])[ barComponent ] ! ).IndexOfKeyOrPrevious( dateTime ) ) ); ! } /// <summary> |
|
From: Glauco S. <gla...@us...> - 2004-11-29 16:03:45
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18199/b7_Scripts/WalkForwardTesting/WalkForwardOneRank Modified Files: DataStreamerHandler.cs Log Message: Minor changes. This class will probably be removed. Index: DataStreamerHandler.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardOneRank/DataStreamerHandler.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DataStreamerHandler.cs 28 Aug 2004 17:07:10 -0000 1.1 --- DataStreamerHandler.cs 29 Nov 2004 16:03:28 -0000 1.2 *************** *** 21,24 **** --- 21,25 ---- */ using System; + using System.Collections; using QuantProject.Business.Financial.Accounting; *************** *** 32,49 **** public class DataStreamerHandler { private Account account; public Account Account { get { return this.account; } } ! public DataStreamerHandler() { this.account = new Account( "Main" ); } public void NewQuoteEventHandler( Object sender , NewQuoteEventArgs eventArgs ) { } } } --- 33,120 ---- public class DataStreamerHandler { + private EligibleTickers eligibleTickers; + private BestPerformingTickers bestPerformingTickers; + private ChosenTickers chosenTickers; + + private int numberEligibleTickers = 100; + private int numberBestPeformingTickers = 20; + private int numberOfTickersToBeChosen = 5; + private int windowDays; + private Account account; + 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 DataStreamerHandler( int numberEligibleTickers , int numberBestPeformingTickers , ! int numberOfTickersToBeChosen , int windowDays ) { + this.numberEligibleTickers = numberEligibleTickers; + this.numberBestPeformingTickers = numberBestPeformingTickers; + this.numberOfTickersToBeChosen = numberOfTickersToBeChosen; + this.windowDays = windowDays; + this.account = new Account( "Main" ); + + this.eligibleTickers = new EligibleTickers( numberEligibleTickers ); + this.bestPerformingTickers = new BestPerformingTickers( numberBestPeformingTickers ); + this.chosenTickers = new ChosenTickers( this.numberOfTickersToBeChosen ); + } + #region NewQuoteEventHandler + private void newQuoteEventHandler_orderChosenTickers_closePositions() + { + foreach ( Position position in this.account.Portfolio ) + if ( this.chosenTickers.Contains( position.Instrument.Key ) ) + { + this.account.ClosePosition( position , this.orderManager ); + } + } + private void newQuoteEventHandler_orderChosenTickers() + { + this.newQuoteEventHandler_orderChosenTickers_closePositions(); + this.newQuoteEventHandler_orderChosenTickers_openPositions(); } + /// <summary> + /// Handles a NewQuote event. + /// </summary> + /// <param name="sender"></param> + /// <param name="eventArgs"></param> public void NewQuoteEventHandler( Object sender , NewQuoteEventArgs eventArgs ) { + if ( ( this.eligibleTickers.Count == 0 ) || + ( eventArgs.Quote.ExtendedDateTime.DateTime.CompareTo( + this.bestPerformingTickers.LastUpdate.AddDays( this.windowDays ) ) >= 0 ) ) + // either eligible tickers have never been defined yet + // or this.windowDays days elapsed since last best performing tickers calculation + { + this.eligibleTickers.SetTickers( eventArgs.Quote.ExtendedDateTime.DateTime ); + this.bestPerformingTickers.SetTickers( this.eligibleTickers , + eventArgs.Quote.ExtendedDateTime.DateTime ); + } + this.chosenTickers.SetTickers( this.bestPerformingTickers ); + newQuoteEventHandler_orderChosenTickers(); } + #endregion } } |
|
From: Glauco S. <gla...@us...> - 2004-11-29 15:53:07
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13508/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows Modified Files: BuyAndHoldPercentageReturn.cs Log Message: ExtededDateTime has been replaced by EndOfDayDateTime Index: BuyAndHoldPercentageReturn.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows/BuyAndHoldPercentageReturn.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BuyAndHoldPercentageReturn.cs 13 Nov 2003 23:19:47 -0000 1.1 --- BuyAndHoldPercentageReturn.cs 29 Nov 2004 15:52:56 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- using QuantProject.Business.Financial.Accounting.Reporting.Tables; using QuantProject.Business.Financial.Instruments; + using QuantProject.Business.Timing; namespace QuantProject.Business.Financial.Accounting.Reporting.SummaryRows *************** *** 19,27 **** Instrument buyAndHoldInstrument = new Instrument( summary.AccountReport.BuyAndHoldTicker ); summary.BuyAndHoldPercentageReturn = ! ( buyAndHoldInstrument.GetMarketValue( summary.AccountReport.EndDateTime ) - buyAndHoldInstrument.GetMarketValue( ! new ExtendedDateTime( summary.AccountReport.StartDateTime , BarComponent.Open ) ) ) / buyAndHoldInstrument.GetMarketValue( ! new ExtendedDateTime( summary.AccountReport.StartDateTime , BarComponent.Open ) ) * 100; this.rowDescription = "Buy & hold % return"; this.rowValue = summary.BuyAndHoldPercentageReturn; --- 20,29 ---- Instrument buyAndHoldInstrument = new Instrument( summary.AccountReport.BuyAndHoldTicker ); summary.BuyAndHoldPercentageReturn = ! ( buyAndHoldInstrument.GetMarketValue( ! summary.AccountReport.EndDateTime ) - buyAndHoldInstrument.GetMarketValue( ! new EndOfDayDateTime( summary.AccountReport.StartDateTime , EndOfDaySpecificTime.MarketOpen ) ) ) / buyAndHoldInstrument.GetMarketValue( ! new EndOfDayDateTime( summary.AccountReport.StartDateTime , EndOfDaySpecificTime.MarketOpen ) ) * 100; this.rowDescription = "Buy & hold % return"; this.rowValue = summary.BuyAndHoldPercentageReturn; |
|
From: Glauco S. <gla...@us...> - 2004-11-29 15:51:03
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/OneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12864/b7_Scripts/SimpleTesting/OneRank Modified Files: AsOneRank.cs Log Message: ExtededDateTime has been replaced by EndOfDayDateTime Index: AsOneRank.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/OneRank/AsOneRank.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AsOneRank.cs 24 Nov 2003 19:36:24 -0000 1.1 --- AsOneRank.cs 29 Nov 2004 15:50:51 -0000 1.2 *************** *** 52,57 **** virtualOrder.Instrument.GetMaxBuyableQuantity( this.account.CashAmount + ! this.account.Portfolio.GetMarketValue( virtualOrder.ExtendedDateTime ) , ! virtualOrder.ExtendedDateTime ) , virtualOrder.ExtendedDateTime ) ); break; case OrderType.MarketSell: --- 52,57 ---- virtualOrder.Instrument.GetMaxBuyableQuantity( this.account.CashAmount + ! this.account.Portfolio.GetMarketValue( virtualOrder.EndOfDayDateTime ) , ! virtualOrder.EndOfDayDateTime ) , virtualOrder.EndOfDayDateTime ) ); break; case OrderType.MarketSell: *************** *** 60,64 **** virtualOrder.Instrument , (long) this.account.Portfolio.GetPosition( virtualOrder.Instrument ).Quantity , ! virtualOrder.ExtendedDateTime ) ); break; default: --- 60,64 ---- virtualOrder.Instrument , (long) this.account.Portfolio.GetPosition( virtualOrder.Instrument ).Quantity , ! virtualOrder.EndOfDayDateTime ) ); break; default: |
|
From: Glauco S. <gla...@us...> - 2004-11-29 15:50:18
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/MSFTSimpleTest_2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12682/b7_Scripts/SimpleTesting/MSFTSimpleTest_2 Modified Files: AsMSFTsimpleTest_2.cs Log Message: ExtededDateTime has been replaced by EndOfDayDateTime Index: AsMSFTsimpleTest_2.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/MSFTSimpleTest_2/AsMSFTsimpleTest_2.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AsMSFTsimpleTest_2.cs 11 Jan 2004 19:15:21 -0000 1.2 --- AsMSFTsimpleTest_2.cs 29 Nov 2004 15:50:06 -0000 1.3 *************** *** 53,57 **** virtualOrder.Instrument , (long) - ((Position)this.account.Portfolio[ virtualOrder.Instrument.Key ]).Quantity , ! virtualOrder.ExtendedDateTime ) ); if ( !this.account.Portfolio.IsLong( virtualOrder.Instrument ) ) --- 53,57 ---- virtualOrder.Instrument , (long) - ((Position)this.account.Portfolio[ virtualOrder.Instrument.Key ]).Quantity , ! virtualOrder.EndOfDayDateTime ) ); if ( !this.account.Portfolio.IsLong( virtualOrder.Instrument ) ) *************** *** 60,65 **** virtualOrder.Instrument.GetMaxBuyableQuantity( this.account.CashAmount + ! this.account.Portfolio.GetMarketValue( virtualOrder.ExtendedDateTime ) , ! virtualOrder.ExtendedDateTime ) , virtualOrder.ExtendedDateTime ) ); } else --- 60,65 ---- virtualOrder.Instrument.GetMaxBuyableQuantity( this.account.CashAmount + ! this.account.Portfolio.GetMarketValue( virtualOrder.EndOfDayDateTime ) , ! virtualOrder.EndOfDayDateTime ) , virtualOrder.EndOfDayDateTime ) ); } else *************** *** 70,74 **** virtualOrder.Instrument , -(long) this.account.Portfolio.GetPosition( virtualOrder.Instrument ).Quantity , ! virtualOrder.ExtendedDateTime ) ); if ( this.account.Portfolio.IsLong( virtualOrder.Instrument ) ) --- 70,74 ---- virtualOrder.Instrument , -(long) this.account.Portfolio.GetPosition( virtualOrder.Instrument ).Quantity , ! virtualOrder.EndOfDayDateTime ) ); if ( this.account.Portfolio.IsLong( virtualOrder.Instrument ) ) *************** *** 76,80 **** virtualOrder.Instrument , (long) this.account.Portfolio.GetPosition( virtualOrder.Instrument ).Quantity , ! virtualOrder.ExtendedDateTime ) ); } break; --- 76,80 ---- virtualOrder.Instrument , (long) this.account.Portfolio.GetPosition( virtualOrder.Instrument ).Quantity , ! virtualOrder.EndOfDayDateTime ) ); } break; *************** *** 85,89 **** virtualOrder.Instrument , (long) this.account.Portfolio.GetPosition( virtualOrder.Instrument ).Quantity , ! virtualOrder.ExtendedDateTime ) ); if ( !this.account.Portfolio.IsShort( virtualOrder.Instrument ) ) orders.Add( new Order( OrderType.MarketSellShort , --- 85,89 ---- virtualOrder.Instrument , (long) this.account.Portfolio.GetPosition( virtualOrder.Instrument ).Quantity , ! virtualOrder.EndOfDayDateTime ) ); if ( !this.account.Portfolio.IsShort( virtualOrder.Instrument ) ) orders.Add( new Order( OrderType.MarketSellShort , *************** *** 91,97 **** virtualOrder.Instrument.GetMaxBuyableQuantity( this.account.CashAmount + ! this.account.Portfolio.GetMarketValue( virtualOrder.ExtendedDateTime ) , ! virtualOrder.ExtendedDateTime ) , ! virtualOrder.ExtendedDateTime ) ); break; default: --- 91,97 ---- virtualOrder.Instrument.GetMaxBuyableQuantity( this.account.CashAmount + ! this.account.Portfolio.GetMarketValue( virtualOrder.EndOfDayDateTime ) , ! virtualOrder.EndOfDayDateTime ) , ! virtualOrder.EndOfDayDateTime ) ); break; default: |
|
From: Glauco S. <gla...@us...> - 2004-11-29 15:49:33
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11819/b4_Business/a2_Strategies Modified Files: AccountStrategy.cs Log Message: ExtededDateTime has been replaced by EndOfDayDateTime Index: AccountStrategy.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies/AccountStrategy.cs,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** AccountStrategy.cs 13 Oct 2003 21:59:11 -0000 1.1.1.1 --- AccountStrategy.cs 29 Nov 2004 15:49:23 -0000 1.2 *************** *** 59,63 **** virtualOrder.Instrument , (long) - ((Position)this.account.Portfolio[ virtualOrder.Instrument.Key ]).Quantity , ! virtualOrder.ExtendedDateTime ) ); if ( !this.account.Portfolio.IsLong( virtualOrder.Instrument ) ) orders.Add( new Order( OrderType.MarketBuy , --- 59,63 ---- virtualOrder.Instrument , (long) - ((Position)this.account.Portfolio[ virtualOrder.Instrument.Key ]).Quantity , ! virtualOrder.EndOfDayDateTime ) ); if ( !this.account.Portfolio.IsLong( virtualOrder.Instrument ) ) orders.Add( new Order( OrderType.MarketBuy , *************** *** 65,70 **** virtualOrder.Instrument.GetMaxBuyableQuantity( this.account.CashAmount + ! this.account.Portfolio.GetMarketValue( virtualOrder.ExtendedDateTime ) , ! virtualOrder.ExtendedDateTime ) , virtualOrder.ExtendedDateTime ) ); break; case OrderType.MarketSell: --- 65,70 ---- virtualOrder.Instrument.GetMaxBuyableQuantity( this.account.CashAmount + ! this.account.Portfolio.GetMarketValue( virtualOrder.EndOfDayDateTime ) , ! virtualOrder.EndOfDayDateTime ) , virtualOrder.EndOfDayDateTime ) ); break; case OrderType.MarketSell: *************** *** 73,77 **** virtualOrder.Instrument , (long) this.account.Portfolio.GetPosition( virtualOrder.Instrument ).Quantity , ! virtualOrder.ExtendedDateTime ) ); if ( !this.account.Portfolio.IsShort( virtualOrder.Instrument ) ) orders.Add( new Order( OrderType.MarketSellShort , --- 73,77 ---- virtualOrder.Instrument , (long) this.account.Portfolio.GetPosition( virtualOrder.Instrument ).Quantity , ! virtualOrder.EndOfDayDateTime ) ); if ( !this.account.Portfolio.IsShort( virtualOrder.Instrument ) ) orders.Add( new Order( OrderType.MarketSellShort , *************** *** 79,85 **** virtualOrder.Instrument.GetMaxBuyableQuantity( this.account.CashAmount + ! this.account.Portfolio.GetMarketValue( virtualOrder.ExtendedDateTime ) , ! virtualOrder.ExtendedDateTime ) , ! virtualOrder.ExtendedDateTime ) ); break; default: --- 79,85 ---- virtualOrder.Instrument.GetMaxBuyableQuantity( this.account.CashAmount + ! this.account.Portfolio.GetMarketValue( virtualOrder.EndOfDayDateTime ) , ! virtualOrder.EndOfDayDateTime ) , ! virtualOrder.EndOfDayDateTime ) ); break; default: |
|
From: Glauco S. <gla...@us...> - 2004-11-29 15:48:08
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11342/b4_Business/a1_Financial/a2_Accounting/h5_Reporting Modified Files: AccountReport.cs Log Message: ExtededDateTime has been replaced by EndOfDayDateTime Index: AccountReport.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/AccountReport.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** AccountReport.cs 28 Nov 2003 15:37:13 -0000 1.7 --- AccountReport.cs 29 Nov 2004 15:47:59 -0000 1.8 *************** *** 29,33 **** --- 29,36 ---- using QuantProject.ADT; using QuantProject.ADT.Histories; + using QuantProject.Business.Financial.Accounting.Transactions; using QuantProject.Business.Financial.Instruments; + using QuantProject.Business.Timing; + namespace QuantProject.Business.Financial.Accounting.Reporting { *************** *** 40,44 **** private Account accountCopy = new Account( "AccountCopy" ); private string reportName; ! private ExtendedDateTime endDateTime; private string buyAndHoldTicker; //private long numDaysForInterval; --- 43,47 ---- private Account accountCopy = new Account( "AccountCopy" ); private string reportName; ! private EndOfDayDateTime endDateTime; private string buyAndHoldTicker; //private long numDaysForInterval; *************** *** 53,57 **** get { return reportName; } } ! public ExtendedDateTime EndDateTime { get { return endDateTime; } --- 56,60 ---- get { return reportName; } } ! public EndOfDayDateTime EndDateTime { get { return endDateTime; } *************** *** 120,139 **** } #region "setRows" ! private void addBalanceItems ( ExtendedDateTime extendedDateTime , DataRow dataRow ) { dataRow[ "AccountCash" ] = this.accountCopy.CashAmount; dataRow[ "PortfolioValue" ] = this.accountCopy.Portfolio.GetMarketValue( ! extendedDateTime ); ! dataRow[ "AccountValue" ] = this.accountCopy.GetMarketValue( extendedDateTime ); ! dataRow[ "PnL" ] = this.accountCopy.GetMarketValue( extendedDateTime ) + this.accountCopy.Transactions.TotalWithdrawn - this.accountCopy.Transactions.TotalAddedCash; } ! private void addTransactionRow( TimedTransaction transaction , System.Data.DataTable detailedDataTable ) { DataRow dataRow = detailedDataTable.NewRow(); ! dataRow[ "DateTime" ] = transaction.ExtendedDateTime.DateTime; ! dataRow[ "BarComponent" ] = transaction.ExtendedDateTime.BarComponent.ToString(); dataRow[ "TransactionType" ] = transaction.Type.ToString(); if ( transaction.Instrument != null ) --- 123,142 ---- } #region "setRows" ! private void addBalanceItems ( EndOfDayDateTime endOfDayDateTime , DataRow dataRow ) { dataRow[ "AccountCash" ] = this.accountCopy.CashAmount; dataRow[ "PortfolioValue" ] = this.accountCopy.Portfolio.GetMarketValue( ! endOfDayDateTime ); ! dataRow[ "AccountValue" ] = this.accountCopy.GetMarketValue( endOfDayDateTime ); ! dataRow[ "PnL" ] = this.accountCopy.GetMarketValue( endOfDayDateTime ) + this.accountCopy.Transactions.TotalWithdrawn - this.accountCopy.Transactions.TotalAddedCash; } ! private void addTransactionRow( EndOfDayTransaction transaction , System.Data.DataTable detailedDataTable ) { DataRow dataRow = detailedDataTable.NewRow(); ! dataRow[ "DateTime" ] = transaction.EndOfDayDateTime.DateTime; ! dataRow[ "BarComponent" ] = transaction.EndOfDayDateTime.EndOfDaySpecificTime.ToString(); dataRow[ "TransactionType" ] = transaction.Type.ToString(); if ( transaction.Instrument != null ) *************** *** 144,148 **** dataRow[ "Price" ] = transaction.InstrumentPrice; dataRow[ "TransactionAmount" ] = transaction.InstrumentPrice * transaction.Quantity; ! addBalanceItems( transaction.ExtendedDateTime , dataRow ); detailedDataTable.Rows.Add( dataRow ); } --- 147,151 ---- dataRow[ "Price" ] = transaction.InstrumentPrice; dataRow[ "TransactionAmount" ] = transaction.InstrumentPrice * transaction.Quantity; ! addBalanceItems( transaction.EndOfDayDateTime , dataRow ); detailedDataTable.Rows.Add( dataRow ); } *************** *** 151,155 **** { if ( this.account.Transactions.ContainsKey( currentDateTime ) ) ! foreach ( TimedTransaction transaction in (ArrayList)this.account.Transactions[ currentDateTime ] ) { --- 154,158 ---- { if ( this.account.Transactions.ContainsKey( currentDateTime ) ) ! foreach ( EndOfDayTransaction transaction in (ArrayList)this.account.Transactions[ currentDateTime ] ) { *************** *** 163,167 **** DataRow dataRow = detailedDataTable.NewRow(); dataRow[ "DateTime" ] = currentDate; ! addBalanceItems( new ExtendedDateTime( currentDate , BarComponent.Close ) , dataRow ); detailedDataTable.Rows.Add( dataRow ); } --- 166,170 ---- DataRow dataRow = detailedDataTable.NewRow(); dataRow[ "DateTime" ] = currentDate; ! addBalanceItems( new EndOfDayDateTime( currentDate , EndOfDaySpecificTime.MarketClose ) , dataRow ); detailedDataTable.Rows.Add( dataRow ); } *************** *** 207,211 **** public AccountReport Create( string reportName , long numDaysForInterval , ! ExtendedDateTime endDateTime , string buyAndHoldTicker ) { this.reportName = reportName; --- 210,214 ---- public AccountReport Create( string reportName , long numDaysForInterval , ! EndOfDayDateTime endDateTime , string buyAndHoldTicker ) { this.reportName = reportName; *************** *** 224,228 **** public AccountReport Create( string reportName , long numDaysForInterval , ! ExtendedDateTime endDateTime ) { return Create( reportName , numDaysForInterval , endDateTime , "" ); --- 227,231 ---- public AccountReport Create( string reportName , long numDaysForInterval , ! EndOfDayDateTime endDateTime ) { return Create( reportName , numDaysForInterval , endDateTime , "" ); |
|
From: Glauco S. <gla...@us...> - 2004-11-29 15:22:41
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4183/b4_Business/a1_Financial/a2_Accounting Modified Files: Account.cs Log Message: - implemented the interface IComparable - added the GetFitnessValue method - added an IEndOfDayTimer - added an IDataStreamer - added an IOrderExecutor - added an ArrayList of active orders - added an AccountReport - added the AddOrder method - added Contains( Instrument instrument ) - added Contains( string ticker ) - added Add( EndOfDayTransaction transaction ) - added GetMarketValue( EndOfDayDateTime endOfDayDateTime ) instead of ExtendedDateTime parameter - added GetMarketValue( string ticker ) - added GetProfitNetLoss( EndOfDayDateTime endOfDayDateTime ) instead of ExtendedDateTime parameter - CreateReport now uses an EndOfDayDateTime parameter instead of an ExtendedDateTime parameter Index: Account.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/Account.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Account.cs 15 Aug 2004 00:08:41 -0000 1.6 --- Account.cs 29 Nov 2004 15:22:31 -0000 1.7 *************** *** 31,38 **** using QuantProject.ADT; using QuantProject.ADT.Histories; ! //using QuantProject.Data.MicrosoftExcel; using QuantProject.Business.Financial.Accounting.Reporting; using QuantProject.Business.Financial.Instruments; using QuantProject.Business.Strategies; namespace QuantProject.Business.Financial.Accounting --- 31,42 ---- using QuantProject.ADT; using QuantProject.ADT.Histories; ! using QuantProject.Data.DataProviders; using QuantProject.Business.Financial.Accounting.Reporting; + using QuantProject.Business.Financial.Accounting.Transactions; using QuantProject.Business.Financial.Instruments; + using QuantProject.Business.Financial.Ordering; using QuantProject.Business.Strategies; + using QuantProject.Business.Timing; + namespace QuantProject.Business.Financial.Accounting *************** *** 44,64 **** [Serializable] ! public class Account : Keyed { private double cashAmount; private AccountStrategy accountStrategy; public Portfolio Portfolio = new Portfolio(); //public AccountReport accountReport; ! public double CashAmount ! { ! get ! { ! return cashAmount; ! } ! } ! public AccountStrategy AccountStrategy { get { return accountStrategy; } --- 48,88 ---- [Serializable] ! public class Account : Keyed , IComparable { private double cashAmount; private AccountStrategy accountStrategy; + private IEndOfDayTimer endOfDayTimer; + private IDataStreamer dataStreamer; + private IOrderExecutor orderExecutor; + private ArrayList activeOrders; + private AccountReport accountReport; public Portfolio Portfolio = new Portfolio(); //public AccountReport accountReport; ! public double CashAmount ! { ! get { return cashAmount; } ! } ! public IEndOfDayTimer EndOfDayTimer ! { ! get { return this.endOfDayTimer; } ! set { this.endOfDayTimer = value; } ! } ! ! public IDataStreamer DataStreamer ! { ! get { return this.dataStreamer; } ! set { this.dataStreamer = value; } ! } ! ! public IOrderExecutor OrderExecutor ! { ! get { return this.orderExecutor; } ! set { this.orderExecutor = value; } ! } ! ! public AccountStrategy AccountStrategy { get { return accountStrategy; } *************** *** 66,70 **** } ! public Transactions Transactions = new Transactions(); public Account( string accountName ) : base ( accountName ) --- 90,94 ---- } ! public TransactionHistory Transactions = new TransactionHistory(); public Account( string accountName ) : base ( accountName ) *************** *** 76,79 **** --- 100,104 ---- { cashAmount = 0; + this.activeOrders = new ArrayList(); accountStrategy = new AccountStrategy( this ); } *************** *** 83,87 **** --- 108,145 ---- this.initialize(); } + public Account( string accountName , IEndOfDayTimer endOfDayTimer , + IDataStreamer dataStreamer , IOrderExecutor orderExecutor ) : base( accountName ) + { + this.endOfDayTimer = endOfDayTimer; + this.dataStreamer = dataStreamer; + this.orderExecutor = orderExecutor; + this.orderExecutor.OrderFilled += new OrderFilledEventHandler( + this.orderFilledEventHandler ); + this.initialize(); + } + + private void orderFilledEventHandler( Object sender , OrderFilledEventArgs + eventArgs ) + { + this.Add( eventArgs.EndOfDayTransaction ); + } + public virtual double GetFitnessValue() + { + if ( this.accountReport == null ) + // the account report has not been computed yet + this.accountReport = this.CreateReport( this.Key , + 1 , this.endOfDayTimer.GetCurrentTime() ); + return this.accountReport.Summary.ReturnOnAccount; + } + public int CompareTo( Object account ) + { + int returnValue = 0; + if ( this.GetFitnessValue() < (( Account )account).GetFitnessValue() ) + returnValue = -1; + if ( this.GetFitnessValue() > (( Account )account).GetFitnessValue() ) + returnValue = 1; + return returnValue; + } public void Clear() { *************** *** 107,116 **** } ! public bool Contains( Instrument instrument ) ! { ! return Portfolio.Contains( instrument ); ! } - #region "Add( TimedTransaction transaction )" private void updateCash( Transaction transaction ) --- 165,187 ---- } ! public void AddCash( double moneyAmount ) ! { ! this.AddCash( this.endOfDayTimer.GetCurrentTime().GetNearestExtendedDateTime() , ! moneyAmount ); ! } ! ! public void AddOrder( Order order ) ! { ! this.orderExecutor.Execute( order ); ! } ! public bool Contains( Instrument instrument ) ! { ! return Portfolio.Contains( instrument ); ! } ! public bool Contains( string ticker ) ! { ! return Portfolio.Contains( ticker ); ! } private void updateCash( Transaction transaction ) *************** *** 126,152 **** //this.accountReport.AddRecord( this ); } ! #endregion ! public double GetMarketValue( ExtendedDateTime extendedDateTime ) ! { ! return this.CashAmount + this.Portfolio.GetMarketValue( extendedDateTime ); ! } ! public double GetProfitNetLoss( ExtendedDateTime extendedDateTime ) { ! return GetMarketValue( extendedDateTime ) + this.Transactions.TotalWithdrawn - this.Transactions.TotalAddedCash; } ! public History GetProfitNetLossHistory( ExtendedDateTime finalDateTime ) { History history = new History(); Account account = new Account( "ToGetProfitNetLossHistory" ); foreach ( ArrayList arrayList in this.Transactions.Values ) ! foreach ( TimedTransaction transaction in arrayList ) { account.Add( transaction ); ! history.MultiAdd( transaction.ExtendedDateTime.DateTime , ! account.GetProfitNetLoss( transaction.ExtendedDateTime ) ); } history.MultiAdd( finalDateTime.DateTime , --- 197,235 ---- //this.accountReport.AddRecord( this ); } ! public void Add( EndOfDayTransaction transaction ) ! { ! this.Transactions.Add( transaction ); ! this.updateCash( transaction ); ! this.Portfolio.Update( transaction ); ! //this.accountReport.AddRecord( this ); ! } ! ! public double GetMarketValue( EndOfDayDateTime endOfDayDateTime ) ! { ! return this.CashAmount + this.Portfolio.GetMarketValue( endOfDayDateTime ); ! } ! public double GetMarketValue( string ticker ) ! { ! return HistoricalDataProvider.GetMarketValue( ticker , ! this.endOfDayTimer.GetCurrentTime().GetNearestExtendedDateTime() ); ! } ! public double GetProfitNetLoss( EndOfDayDateTime endOfDayDateTime ) { ! return GetMarketValue( endOfDayDateTime ) + this.Transactions.TotalWithdrawn - this.Transactions.TotalAddedCash; } ! public History GetProfitNetLossHistory( EndOfDayDateTime finalDateTime ) { History history = new History(); Account account = new Account( "ToGetProfitNetLossHistory" ); foreach ( ArrayList arrayList in this.Transactions.Values ) ! foreach ( EndOfDayTransaction transaction in arrayList ) { account.Add( transaction ); ! history.MultiAdd( transaction.EndOfDayDateTime.DateTime , ! account.GetProfitNetLoss( transaction.EndOfDayDateTime ) ); } history.MultiAdd( finalDateTime.DateTime , *************** *** 161,192 **** "\nPortfolioContent : " + this.Portfolio.ToString() + "\nPortfolioMarketValue : " + this.Portfolio.GetMarketValue( ! new ExtendedDateTime( dateTime , BarComponent.Close ) ) + "\nAccountProfitNetLoss : " + this.GetProfitNetLoss( ! new ExtendedDateTime( dateTime , BarComponent.Close ) ); } ! public AccountReport CreateReport( string reportName , ! int numDaysForInterval , ExtendedDateTime endDateTime ) ! { ! AccountReport accountReport = new AccountReport( this ); ! return accountReport.Create( reportName , numDaysForInterval , endDateTime ); ! } ! public AccountReport CreateReport( string reportName , ! int numDaysForInterval , ExtendedDateTime endDateTime , string buyAndHoldTicker ) ! { ! AccountReport accountReport = new AccountReport( this ); ! return accountReport.Create( reportName , numDaysForInterval , ! endDateTime , buyAndHoldTicker ); ! } ! public void Serialize( string filePathAndName ) ! { ! // //Dim FS As New IO.FileStream("c:\Rect.xml", IO.FileMode.Create, IO.FileAccess.Write) ! // Dim XMLFormatter As New SoapFormatter() ! // Dim R As New Rectangle(8, 8, 299, 499) ! // XMLFormatter.Serialize(FS, R) ! FileStream fileStream = new FileStream( filePathAndName , FileMode.Create , FileAccess.Write ); ! SoapFormatter soapFormatter = new SoapFormatter(); ! soapFormatter.Serialize( fileStream , this ); ! } ! } } --- 244,298 ---- "\nPortfolioContent : " + this.Portfolio.ToString() + "\nPortfolioMarketValue : " + this.Portfolio.GetMarketValue( ! new EndOfDayDateTime( dateTime , EndOfDaySpecificTime.MarketClose ) ) + "\nAccountProfitNetLoss : " + this.GetProfitNetLoss( ! new EndOfDayDateTime( dateTime , EndOfDaySpecificTime.MarketClose ) ); } ! public AccountReport CreateReport( string reportName , ! int numDaysForInterval , EndOfDayDateTime endDateTime ) ! { ! AccountReport accountReport = new AccountReport( this ); ! return accountReport.Create( reportName , numDaysForInterval , endDateTime ); ! } ! public AccountReport CreateReport( string reportName , ! int numDaysForInterval , EndOfDayDateTime endDateTime , string buyAndHoldTicker ) ! { ! AccountReport accountReport = new AccountReport( this ); ! return accountReport.Create( reportName , numDaysForInterval , ! endDateTime , buyAndHoldTicker ); ! } ! public void Serialize( string filePathAndName ) ! { ! // //Dim FS As New IO.FileStream("c:\Rect.xml", IO.FileMode.Create, IO.FileAccess.Write) ! // Dim XMLFormatter As New SoapFormatter() ! // Dim R As New Rectangle(8, 8, 299, 499) ! // XMLFormatter.Serialize(FS, R) ! FileStream fileStream = new FileStream( filePathAndName , FileMode.Create , FileAccess.Write ); ! SoapFormatter soapFormatter = new SoapFormatter(); ! soapFormatter.Serialize( fileStream , this ); ! } ! #region ClosePosition_position ! private OrderType closePosition_getOrderType( Position position ) ! { ! OrderType returnValue; ! if ( position.Quantity >= 0 ) ! // long position ! returnValue = OrderType.MarketSell; ! else ! // short position ! returnValue = OrderType.MarketCover; ! return returnValue; ! } ! public void ClosePosition( Position position ) ! { ! OrderType orderType = closePosition_getOrderType( position ); ! Order order = new Order( orderType , position.Instrument , position.Quantity ); ! this.orderExecutor.Execute( order ); ! } ! #endregion ClosePosition_position ! public void ClosePosition( string ticker ) ! { ! this.ClosePosition( (Position)this.Portfolio[ ticker ] ); ! } ! } } |
|
From: Glauco S. <gla...@us...> - 2004-11-29 15:11:19
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1964 Added Files: ITickerReceiver.cs Log Message: Interface to be implemented by objects that can receive tickers --- NEW FILE: ITickerReceiver.cs --- /* QuantProject - Quantitative Finance Library ITickerReceiver.cs Copyright (C) 2003 Marco Milletti This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using System; //using QuantProject.Data.DataTables; using System.Data; namespace QuantProject.Data.Selectors { /// <summary> /// Interface to be implemented by objects that can receive tickers /// </summary> public interface ITickerReceiver { void ReceiveTickers(DataTable tickersToReceive); } } |
|
From: Glauco S. <gla...@us...> - 2004-11-29 15:10:08
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1665 Added Files: NewProgressEventArgs.cs Log Message: EventArgs for the NewProgress event --- NEW FILE: NewProgressEventArgs.cs --- /* QuantProject - Quantitative Finance Library NewProgressEventArgs.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.ADT { /// <summary> /// EventArgs for the NewProgress event /// </summary> public class NewProgressEventArgs : EventArgs { private int currentProgress; public int CurrentProgress { get { return this.currentProgress; } set { this.currentProgress = value; } } private int goal; public int Goal { get { return this.goal; } set { this.goal = value; } } public NewProgressEventArgs( int currentProgress , int goal ) { this.currentProgress = currentProgress; this.goal = goal; } } } |
|
From: Glauco S. <gla...@us...> - 2004-11-29 15:09:03
|
Update of /cvsroot/quantproject/QuantProject/b1_ADT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1471 Added Files: IProgressNotifier.cs Log Message: Interface to be implemented by time consuming objects --- NEW FILE: IProgressNotifier.cs --- /* QuantProject - Quantitative Finance Library IProgressNotifier.cs Copyright (C) 2004 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.ADT { public delegate void NewProgressEventHandler( Object sender , NewProgressEventArgs eventArgs ); /// <summary> /// Interface to be implemented by time consuming objects /// </summary> public interface IProgressNotifier { event NewProgressEventHandler NewProgress; } } |
|
From: Glauco S. <gla...@us...> - 2004-11-29 15:07:48
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a3_Ordering In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1266 Added Files: OrderStatus.cs Log Message: Possible order status --- NEW FILE: OrderStatus.cs --- /* QuantProject - Quantitative Finance Library OrderStatus.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.Ordering { /// <summary> /// Possible order status /// </summary> public enum OrderStatus { Open , // submitted to an order manager Filled , // succesfully executed Rejected // unsuccesfully executed } } |
|
From: Glauco S. <gla...@us...> - 2004-11-29 15:06:38
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a3_Ordering In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1091 Added Files: OrderFilledEventArgs.cs Log Message: EventArgs for the OrderExecuted event --- NEW FILE: OrderFilledEventArgs.cs --- /* QuantProject - Quantitative Finance Library NewTransactionEventArgs.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.Data; using QuantProject.ADT; using QuantProject.Business.Financial.Ordering; using QuantProject.Business.Financial.Accounting; using QuantProject.Business.Financial.Accounting.Transactions; namespace QuantProject.Business.Financial.Ordering { /// <summary> /// EventArgs for the OrderExecuted event /// </summary> public class OrderFilledEventArgs : EventArgs { private Order order; private EndOfDayTransaction endOfDayTransaction; public Order Order { get { return this.order; } set { this.order = value; } } public EndOfDayTransaction EndOfDayTransaction { get { return this.endOfDayTransaction; } set { this.endOfDayTransaction = value; } } public OrderFilledEventArgs( Order order , EndOfDayTransaction endOfDayTransaction ) { this.order = order; this.endOfDayTransaction = endOfDayTransaction; } } } |