[Quantproject-developers] QuantProject/b4_Business/a2_Strategies/EquityEvaluation Variance.cs, NON
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2010-11-20 18:57:16
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies/EquityEvaluation In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv27491/EquityEvaluation Added Files: Variance.cs Log Message: Added Variance class. It evaluates equity just through variance --- NEW FILE: Variance.cs --- /* QuantProject - Quantitative Finance Library Variance.cs Copyright (C) 2010 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 QuantProject.ADT.Statistics; namespace QuantProject.Business.Strategies.EquityEvaluation { /// <summary> /// Equity line evaluator, simply measuring the variance /// </summary> [Serializable] public class Variance : IEquityEvaluator { public string Description { get { return "EqEvltr_Var"; } } public Variance() { // // TODO: Add constructor logic here // } public float GetReturnsEvaluation( float[] returns ) { return Convert.ToSingle( BasicFunctions.Variance( returns ) ); } } } |