Click or drag to resize
AbsoluteReturnMeasuresGainMean Method
Average Gain or Gain Mean This is a simple average (arithmetic mean) of the periods with a gain. It is calculated by summing the returns for gain periods (return 0) and then dividing the total by the number of gain periods.

Namespace:  MathNet.Numerics.Financial
Assembly:  MathNet.Numerics (in MathNet.Numerics.dll) Version: 3.7
Syntax
C#
public static double GainMean(
	this IEnumerable<double> data
)

Parameters

data
Type: System.Collections.GenericIEnumerableDouble

[Missing <param name="data"/> documentation for "M:MathNet.Numerics.Financial.AbsoluteReturnMeasures.GainMean(System.Collections.Generic.IEnumerable{System.Double})"]

Return Value

Type: Double

[Missing <returns> documentation for "M:MathNet.Numerics.Financial.AbsoluteReturnMeasures.GainMean(System.Collections.Generic.IEnumerable{System.Double})"]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableDouble. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
http://www.offshore-library.com/kb/statistics.php
See Also