[Quantproject-developers] QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/Statisti
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2008-02-06 20:40:28
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/StatisticsSummaryRows In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27773/a1_Financial/a2_Accounting/h5_Reporting/StatisticsSummaryRows Added Files: AverageReturnOnMonday.cs Log Message: Added new tab page to Report: StatisticsSummary and the skeleton file for a new row for this Tab Page (AverageReturnOnMonday, that has not been implemented yet) --- NEW FILE: AverageReturnOnMonday.cs --- /* QuantProject - Quantitative Finance Library AverageReturnOnMonday.cs Copyright (C) 2008 Marco Milletti This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License 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; using System.Collections; using QuantProject.ADT.Histories; using QuantProject.ADT.Statistics; using QuantProject.Data.DataTables; using QuantProject.Business.Financial.Accounting.Reporting.Tables; using QuantProject.Business.Financial.Accounting.Reporting.SummaryRows; namespace QuantProject.Business.Financial.Accounting.Reporting.StatisticsSummaryRows { /// <summary> /// Summary row containing the average return of the strategy on Monday /// </summary> [Serializable] public class AverageReturnOnMonday : DoubleSummaryRow { public AverageReturnOnMonday( StatisticsSummary statisticsSummary ) : base( 2 ) { this.rowDescription = "Average return on Monday"; // int totalNumberOfTransactions = statisticsSummary.AccountReport.TransactionTable.DataTable.Rows.Count; //it has to be implemented yet // History marketDays = Quotes.GetMarketDays( // statisticsSummary.AccountReport.Benchmark, // statisticsSummary.AccountReport.StartDateTime, // statisticsSummary.AccountReport.EndDateTime.DateTime); // DateTime date; // for(int i = 0; i<marketDays.Count; i++) // { // date = marketDays.GetDateTime(i); // } // this.rowValue = (double)totalNumberOfTransactions / (double)marketDays.Count; } } } |