[Quantproject-developers] QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRo
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2005-06-19 14:55:34
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14145/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows Modified Files: BenchmarkPercentageReturn.cs AverageTradePercentageReturn.cs AverageShortTradePercentageReturn.cs AverageLongTradePercentageReturn.cs AnnualSystemPercentageReturn.cs Log Message: Reordered the process to populate the summary. Now, to add a summary item, you just need to add a new SummaryRow object to the QuantProject.Business.Financial.Accounting.Reporting.Tables.Summary object. Index: AverageLongTradePercentageReturn.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows/AverageLongTradePercentageReturn.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AverageLongTradePercentageReturn.cs 19 Feb 2005 16:02:15 -0000 1.3 --- AverageLongTradePercentageReturn.cs 19 Jun 2005 14:55:09 -0000 1.4 *************** *** 11,15 **** /// </summary> [Serializable] ! public class AverageLongTradePercentageReturn : SummaryRow { public AverageLongTradePercentageReturn( Summary summary ) --- 11,15 ---- /// </summary> [Serializable] ! public class AverageLongTradePercentageReturn : PercentageSummaryRow { public AverageLongTradePercentageReturn( Summary summary ) Index: BenchmarkPercentageReturn.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows/BenchmarkPercentageReturn.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BenchmarkPercentageReturn.cs 30 Mar 2005 23:48:07 -0000 1.1 --- BenchmarkPercentageReturn.cs 19 Jun 2005 14:55:09 -0000 1.2 *************** *** 13,17 **** /// </summary> [Serializable] ! public class BenchmarkPercentageReturn : SummaryRow { public BenchmarkPercentageReturn( Summary summary , --- 13,17 ---- /// </summary> [Serializable] ! public class BenchmarkPercentageReturn : PercentageSummaryRow { public BenchmarkPercentageReturn( Summary summary , *************** *** 27,34 **** summary.AccountReport.Benchmark , summary.AccountReport.EndDateTime ); ! summary.BenchmarkPercentageReturn = ( finalMarketValue - beginningMarketValue ) / ! beginningMarketValue * 100; this.rowDescription = "Buy & hold % return"; ! this.rowValue = summary.BenchmarkPercentageReturn; } } --- 27,35 ---- summary.AccountReport.Benchmark , summary.AccountReport.EndDateTime ); ! // summary.BenchmarkPercentageReturn = ( finalMarketValue - beginningMarketValue ) / ! // beginningMarketValue * 100; this.rowDescription = "Buy & hold % return"; ! this.rowValue = ( finalMarketValue - beginningMarketValue ) / ! beginningMarketValue * 100; } } Index: AverageShortTradePercentageReturn.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows/AverageShortTradePercentageReturn.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AverageShortTradePercentageReturn.cs 19 Feb 2005 16:02:15 -0000 1.3 --- AverageShortTradePercentageReturn.cs 19 Jun 2005 14:55:09 -0000 1.4 *************** *** 11,15 **** /// </summary> [Serializable] ! public class AverageShortTradePercentageReturn : SummaryRow { public AverageShortTradePercentageReturn( Summary summary ) --- 11,15 ---- /// </summary> [Serializable] ! public class AverageShortTradePercentageReturn : PercentageSummaryRow { public AverageShortTradePercentageReturn( Summary summary ) Index: AverageTradePercentageReturn.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows/AverageTradePercentageReturn.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AverageTradePercentageReturn.cs 19 Feb 2005 16:02:15 -0000 1.3 --- AverageTradePercentageReturn.cs 19 Jun 2005 14:55:09 -0000 1.4 *************** *** 11,15 **** /// </summary> [Serializable] ! public class AverageTradePercentageReturn : SummaryRow { public AverageTradePercentageReturn( Summary summary ) --- 11,15 ---- /// </summary> [Serializable] ! public class AverageTradePercentageReturn : PercentageSummaryRow { public AverageTradePercentageReturn( Summary summary ) Index: AnnualSystemPercentageReturn.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/SummaryRows/AnnualSystemPercentageReturn.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AnnualSystemPercentageReturn.cs 15 Feb 2005 19:09:02 -0000 1.3 --- AnnualSystemPercentageReturn.cs 19 Jun 2005 14:55:09 -0000 1.4 *************** *** 11,23 **** /// </summary> [Serializable] ! public class AnnualSystemPercentageReturn : SummaryRow { public AnnualSystemPercentageReturn( Summary summary ) { double totalROA = summary.TotalPnl / ( summary.FinalAccountValue - summary.TotalPnl ); ! summary.AnnualSystemPercentageReturn = ( ( Math.Pow( 1 + totalROA , ! 1.0 / ( (double)summary.IntervalDays/365.0 ) ) ) - 1 ) * 100; this.rowDescription = "Annual system % return"; ! this.rowValue = summary.AnnualSystemPercentageReturn; } } --- 11,24 ---- /// </summary> [Serializable] ! public class AnnualSystemPercentageReturn : PercentageSummaryRow { public AnnualSystemPercentageReturn( Summary summary ) { double totalROA = summary.TotalPnl / ( summary.FinalAccountValue - summary.TotalPnl ); ! // summary.AnnualSystemPercentageReturn = ( ( Math.Pow( 1 + totalROA , ! // 1.0 / ( (double)summary.IntervalDays/365.0 ) ) ) - 1 ) * 100; this.rowDescription = "Annual system % return"; ! this.rowValue = ( ( Math.Pow( 1 + totalROA , ! 1.0 / ( (double)summary.IntervalDays/365.0 ) ) ) - 1 ) * 100; } } |