[Quantproject-developers] QuantProject/b4_Business/a1_Financial/a2_Accounting/AccountProviding IAc
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2008-09-29 21:13:34
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/AccountProviding In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13218/a2_Accounting/AccountProviding Modified Files: IAccountProvider.cs InteractiveBrokerAccountProvider.cs Log Message: The new revision moves toward an intraday enabled framework. EndOfDayDate time has been removed, DateTime is used now. The code has been changed accordingly. Index: InteractiveBrokerAccountProvider.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/AccountProviding/InteractiveBrokerAccountProvider.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InteractiveBrokerAccountProvider.cs 8 Apr 2008 21:49:14 -0000 1.2 --- InteractiveBrokerAccountProvider.cs 29 Sep 2008 21:13:10 -0000 1.3 *************** *** 3,7 **** InteractiveBrokerAccountProvider.cs ! Copyright (C) 2008 Marco Milletti --- 3,7 ---- InteractiveBrokerAccountProvider.cs ! Copyright (C) 2008 Marco Milletti *************** *** 19,23 **** 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; --- 19,23 ---- 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; *************** *** 37,42 **** /// with Interactive Broker for individual traders, /// where commissions are managed and slippage can be simulated ! /// through a fixed percentage amount (on stock-price) ! /// lost at each stock-transaction /// </summary> public class InteractiveBrokerAccountProvider : IAccountProvider --- 37,42 ---- /// with Interactive Broker for individual traders, /// where commissions are managed and slippage can be simulated ! /// through a fixed percentage amount (on stock-price) ! /// lost at each stock-transaction /// </summary> public class InteractiveBrokerAccountProvider : IAccountProvider *************** *** 52,56 **** { if( slippageFixedPercentage < 0.0 || ! slippageFixedPercentage > 100.0 ) throw new OutOfRangeException("slippageFixedPercentage", 0.0, 100.0); --- 52,56 ---- { if( slippageFixedPercentage < 0.0 || ! slippageFixedPercentage > 100.0 ) throw new OutOfRangeException("slippageFixedPercentage", 0.0, 100.0); *************** *** 58,63 **** } ! private ISlippageManager getAccount_getSlippageManager(IEndOfDayTimer timer , ! IHistoricalQuoteProvider historicalQuoteProvider) { ISlippageManager slippageManager; --- 58,63 ---- } ! private ISlippageManager getAccount_getSlippageManager( ! Timer timer , HistoricalMarketValueProvider historicalMarketValueProvider) { ISlippageManager slippageManager; *************** *** 65,86 **** slippageManager = new ZeroSlippageManager(); else//this.slippageFixedPercentage > 0.0 ! slippageManager = new FixedPercentageSlippageManager( ! historicalQuoteProvider , timer , ! this.slippageFixedPercentage ); return slippageManager; } ! public Account GetAccount( IEndOfDayTimer timer , ! IHistoricalQuoteProvider historicalQuoteProvider ) { ! Account account = ! new Account( "IBAccount" , timer , ! new HistoricalEndOfDayDataStreamer( timer , ! historicalQuoteProvider ) , ! new HistoricalEndOfDayOrderExecutor( timer , ! historicalQuoteProvider , ! this.getAccount_getSlippageManager( ! timer , historicalQuoteProvider ) ), ! new IBCommissionManager() ); return account; } --- 65,87 ---- slippageManager = new ZeroSlippageManager(); else//this.slippageFixedPercentage > 0.0 ! slippageManager = new FixedPercentageSlippageManager( ! historicalMarketValueProvider , timer , ! this.slippageFixedPercentage ); return slippageManager; } ! public Account GetAccount( ! Timer timer , HistoricalMarketValueProvider historicalMarketValueProvider ) { ! Account account = ! new Account( ! "IBAccount" , timer , ! new HistoricalEndOfDayDataStreamer( ! timer , historicalMarketValueProvider ) , ! new HistoricalEndOfDayOrderExecutor( ! timer , historicalMarketValueProvider , ! this.getAccount_getSlippageManager( ! timer , historicalMarketValueProvider ) ), ! new IBCommissionManager() ); return account; } Index: IAccountProvider.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/AccountProviding/IAccountProvider.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IAccountProvider.cs 12 Mar 2008 21:54:41 -0000 1.1 --- IAccountProvider.cs 29 Sep 2008 21:13:10 -0000 1.2 *************** *** 3,7 **** IAccountProvider.cs ! Copyright (C) 2008 Marco Milletti --- 3,7 ---- IAccountProvider.cs ! Copyright (C) 2008 Marco Milletti *************** *** 19,23 **** 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; --- 19,23 ---- 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; *************** *** 46,51 **** /// <param name="endOfDayDateTime">end of day date time for the market evaluation</param> /// <returns></returns> ! Account GetAccount( IEndOfDayTimer timer , ! IHistoricalQuoteProvider historicalQuoteProvider ); } } --- 46,52 ---- /// <param name="endOfDayDateTime">end of day date time for the market evaluation</param> /// <returns></returns> ! Account GetAccount( ! Timer timer , ! HistoricalMarketValueProvider historicalMarketValueProvider ); } } |