Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18353/b4_Business/a1_Financial/a2_Accounting/h5_Reporting
Modified Files:
AccountReport.cs
Log Message:
AccountReport now contains the Benchmark equity line, so it has become database independent.
Index: AccountReport.cs
===================================================================
RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/AccountReport.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** AccountReport.cs 13 Feb 2005 21:11:19 -0000 1.11
--- AccountReport.cs 30 Mar 2005 23:50:13 -0000 1.12
***************
*** 33,36 ****
--- 33,37 ----
using QuantProject.Business.Financial.Instruments;
using QuantProject.Business.Timing;
+ using QuantProject.Data.DataProviders;
namespace QuantProject.Business.Financial.Accounting.Reporting
***************
*** 47,51 ****
private string reportName;
private EndOfDayDateTime endDateTime;
! private string buyAndHoldTicker;
//private long numDaysForInterval;
private DataTable detailedDataTable;
--- 48,53 ----
private string reportName;
private EndOfDayDateTime endDateTime;
! private string benchmark;
! private History benchmarkEquityLine;
//private long numDaysForInterval;
private DataTable detailedDataTable;
***************
*** 63,69 ****
get { return endDateTime; }
}
! public string BuyAndHoldTicker
{
! get { return buyAndHoldTicker; }
}
public Account Account
--- 65,75 ----
get { return endDateTime; }
}
! public string Benchmark
{
! get { return this.benchmark; }
! }
! public History BenchmarkEquityLine
! {
! get { return this.benchmarkEquityLine; }
}
public Account Account
***************
*** 222,231 ****
#endregion
public AccountReport Create( string reportName , long numDaysForInterval ,
! EndOfDayDateTime endDateTime , string buyAndHoldTicker )
{
this.reportName = reportName;
this.endDateTime = endDateTime;
! this.buyAndHoldTicker = buyAndHoldTicker;
detailedDataTable = getDetailedDataTable( numDaysForInterval );
this.transactionTable = new Tables.Transactions( reportName , detailedDataTable );
--- 228,245 ----
#endregion
+ #region Create
+ private History create_getBenchmarkEquityLine()
+ {
+ return HistoricalDataProvider.GetAdjustedCloseHistory(
+ this.benchmark );
+ }
public AccountReport Create( string reportName , long numDaysForInterval ,
! EndOfDayDateTime endDateTime , string benchmark )
{
this.reportName = reportName;
this.endDateTime = endDateTime;
! this.benchmark = benchmark;
! if ( benchmark != "" )
! this.benchmarkEquityLine = this.create_getBenchmarkEquityLine();
detailedDataTable = getDetailedDataTable( numDaysForInterval );
this.transactionTable = new Tables.Transactions( reportName , detailedDataTable );
***************
*** 238,241 ****
--- 252,256 ----
return this;
}
+ #endregion
public AccountReport Create( string reportName , long numDaysForInterval ,
|