Re: [Quantproject-developers] QuantProject/b4_Business/a1_Financial/a2_Accounting/h5_Reporting/Summ
Brought to you by:
glauco_1
|
From: Glauco S. <gl...@my...> - 2006-06-10 18:27:01
|
Mannaggia... fatto ora. At 10:56 PM 6/9/2006 +0200, you wrote: >Sbaglio o il file di progetto business non =E8 stato committato? >Il mio vs.net non me li ha inclusi nel progetto: da' un'occhiata appena= puoi >per favore ... > >----- Original Message ----- >From: "Glauco Siliprandi" <gla...@us...> >To: <Qua...@li...> >Sent: Thursday, June 08, 2006 11:11 PM >Subject: >[Quantproject-developers]QuantProject/b4_Business/a1_Financial/a2_Accountin= g/h5_Reporting/SummaryRowsExpectancyScore.cs, >NONE, 1.1 > > > > Update of > >=20 >= /cvsroot/quantproject/QuantProject/b4_Business/a1_Financial/a2_Accounting/h= 5_Reporting/SummaryRows > > In directory > >=20 >= sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv27667/b4_Business/a1_Financial/a2_= Accounting/h5_Reporting/SummaryRows > > > > Added Files: > > ExpectancyScore.cs > > Log Message: > > Summary row containing the Expectancy Score calculation for > > the account report equity line > > > > --- NEW FILE: ExpectancyScore.cs --- > > /* > > QuantProject - Quantitative Finance Library > > > > ExpectancyScore.cs > > Copyright (C) 2003 > > Glauco Siliprandi > > > > 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.Business.Financial.Accounting.Reporting.Tables; > > > > namespace= QuantProject.Business.Financial.Accounting.Reporting.SummaryRows > > { > > /// <summary> > > /// Summary row containing the Expectancy Score calculation for > > /// the account report equity line > > /// </summary> > > [Serializable] > > public class ExpectancyScore : DoubleSummaryRow > > { > > private ArrayList getReturns( EquityLine equityLine ) > > { > > ArrayList returnValue =3D new ArrayList(); > > for ( int i=3D0 ; i < equityLine.Count - 1 ; i++ ) > > { > > if ( Convert.ToDouble( equityLine.GetByIndex( i ) ) <=3D 0 ) > > throw new Exception( "Equity line is expected to always being " + > > "strictly positive. equityLine[ i ] is negative or equal to zero!" ); > > double periodReturn =3D > > ( Convert.ToDouble( equityLine.GetByIndex( i + 1 ) ) - > > Convert.ToDouble( equityLine.GetByIndex( i ) ) ) / > > Convert.ToDouble( equityLine.GetByIndex( i ) ); > > returnValue.Add( periodReturn ); > > } > > return returnValue; > > } > > public ExpectancyScore( EquityLine equityLine ) : base( 6 ) > > { > > this.rowDescription =3D "Expectancy Score"; > > ICollection returns =3D equityLine.GetReturns().Values; > > this.rowValue =3D AdvancedFunctions.GetExpectancyScore( > > returns ); > > } > > } > > } > > > > > > > > _______________________________________________ > > Quantproject-developers mailing list > > Qua...@li... > > https://lists.sourceforge.net/lists/listinfo/quantproject-developers > > > >_______________________________________________ >Quantproject-developers mailing list >Qua...@li... >https://lists.sourceforge.net/lists/listinfo/quantproject-developers |