[Quantproject-developers] QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting AccountRe
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2005-04-17 02:14:05
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12901/b4_Business/a1_Financial/a2_Accounting/h5_Reporting Modified Files: AccountReport.cs Log Message: - a new EquityHistory public property has been added - the BenchmarkEquityLine is now computed so that it contains data for exactly the same dates as the EquityHistory. PreviousInterpolator is used as interpolator method - the serialized AccountReport object should be much smaller now Index: AccountReport.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/AccountReport.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** AccountReport.cs 30 Mar 2005 23:50:13 -0000 1.12 --- AccountReport.cs 17 Apr 2005 02:13:52 -0000 1.13 *************** *** 55,58 **** --- 55,59 ---- private ReportTable roundTrades; private ReportTable equity; + private History equityHistory; private Tables.Summary summary; *************** *** 93,101 **** get { return roundTrades; } } ! public ReportTable Equity ! { ! get { return equity; } ! } ! public Tables.Summary Summary { get { return summary; } --- 94,117 ---- get { return roundTrades; } } ! public ReportTable Equity ! { ! 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; ! } ! } ! public Tables.Summary Summary { get { return summary; } *************** *** 229,236 **** #region Create ! private History create_getBenchmarkEquityLine() { ! return HistoricalDataProvider.GetAdjustedCloseHistory( this.benchmark ); } public AccountReport Create( string reportName , long numDaysForInterval , --- 245,254 ---- #region Create ! private void setBenchmarkEquityLine() { ! History benchmarkQuotes = HistoricalDataProvider.GetAdjustedCloseHistory( this.benchmark ); + this.benchmarkEquityLine = benchmarkQuotes.Select( this.EquityHistory ); + this.benchmarkEquityLine.Interpolate( this.EquityHistory.Keys , new PreviousInterpolator() ); } public AccountReport Create( string reportName , long numDaysForInterval , *************** *** 240,245 **** this.endDateTime = endDateTime; this.benchmark = benchmark; - if ( benchmark != "" ) - this.benchmarkEquityLine = this.create_getBenchmarkEquityLine(); detailedDataTable = getDetailedDataTable( numDaysForInterval ); this.transactionTable = new Tables.Transactions( reportName , detailedDataTable ); --- 258,261 ---- *************** *** 247,250 **** --- 263,268 ---- this.roundTrades = new Tables.RoundTrades( reportName , this.transactionTable ); this.equity = new Tables.Equity( reportName , detailedDataTable ); + if ( benchmark != "" ) + this.setBenchmarkEquityLine(); //this.equity = getEquity( reportName , detailedDataTable ); //this.summary = getSummary( reportName ); |