[Quantproject-developers] QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting AccountRe
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2005-01-09 19:40:57
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20414/b4_Business/a1_Financial/a2_Accounting/h5_Reporting Modified Files: AccountReport.cs Log Message: - the IHistoricalQuoteProvider "concept" has been introduced Index: AccountReport.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/AccountReport.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AccountReport.cs 29 Nov 2004 15:47:59 -0000 1.8 --- AccountReport.cs 9 Jan 2005 19:40:48 -0000 1.9 *************** *** 29,32 **** --- 29,33 ---- using QuantProject.ADT; using QuantProject.ADT.Histories; + using QuantProject.Business.DataProviders; using QuantProject.Business.Financial.Accounting.Transactions; using QuantProject.Business.Financial.Instruments; *************** *** 41,44 **** --- 42,46 ---- { private Account account; + private IHistoricalQuoteProvider historicalQuoteProvider; private Account accountCopy = new Account( "AccountCopy" ); private string reportName; *************** *** 60,68 **** get { return endDateTime; } } ! public string BuyAndHoldTicker ! { ! get { return buyAndHoldTicker; } ! } ! // public long NumDaysForInterval // { // get { return numDaysForInterval; } --- 62,74 ---- get { return endDateTime; } } ! public string BuyAndHoldTicker ! { ! get { return buyAndHoldTicker; } ! } ! public Account Account ! { ! get { return this.account; } ! } ! // public long NumDaysForInterval // { // get { return numDaysForInterval; } *************** *** 100,106 **** /// </summary> /// <param name="account"></param> ! public AccountReport( Account account ) { this.account = account; } --- 106,114 ---- /// </summary> /// <param name="account"></param> ! public AccountReport( Account account , ! IHistoricalQuoteProvider historicalQuoteProvider ) { this.account = account; + this.historicalQuoteProvider = historicalQuoteProvider; } *************** *** 127,133 **** 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; --- 135,142 ---- dataRow[ "AccountCash" ] = this.accountCopy.CashAmount; dataRow[ "PortfolioValue" ] = this.accountCopy.Portfolio.GetMarketValue( ! endOfDayDateTime , this.historicalQuoteProvider ); ! dataRow[ "AccountValue" ] = (double)dataRow[ "AccountCash" ] + ! (double)dataRow[ "PortfolioValue" ]; ! dataRow[ "PnL" ] = (double)dataRow[ "AccountValue" ] + this.accountCopy.Transactions.TotalWithdrawn - this.accountCopy.Transactions.TotalAddedCash; *************** *** 222,226 **** //this.equity = getEquity( reportName , detailedDataTable ); //this.summary = getSummary( reportName ); ! this.summary = new Tables.Summary( this ); return this; } --- 231,235 ---- //this.equity = getEquity( reportName , detailedDataTable ); //this.summary = getSummary( reportName ); ! this.summary = new Tables.Summary( this , historicalQuoteProvider ); return this; } |