FinAnalysis User Guide

## Coefficient Of Variation |

The coefficient of variation (CoefficientOfVariation) (CoV), also known as relative standard deviation (RSD), is a standardized measure of dispersion of a probability distribution or frequency distribution. It is defined as the ratio of the standard deviation to the mean. When used in the stock market, it helps to determine the amount of volatility in comparison to the expected return rate of investment.

Calculation

Chart Example

Implementation and Usage

To initialize Coefficient Of Variation indicator, use one of the following constructors:

CoefficientOfVariation – set default values: period = 14

CoefficientOfVariation(Int32) – set value for period

CoefficientOfVariation(TimeSpan) – sets time period

Use

CoV - property to get current value

Example

C#

1// Create new instance 2var indicator = new CoefficientOfVariation(28); 3 4// Number of stored values 5indicator.HistoryCapacity = 2; 6 7// Add new data point 8indicator.Add(CurrentPrice); 9 10// Get indicator value 11double IndicatorValue = indicator.CoV; 12// Get previous value 13if (indicator.HistoryCount == 2) 14{ 15 double IndicatorPrevValue = indicator[1]; 16}