SortinoRatioParameter

StockSharp.Algo.Statistics

Sortino ratio (annualized return - risk-free rate / annualized downside deviation).

Inherits: RiskAdjustedRatioParameter

Constructors

SortinoRatioParameter
public SortinoRatioParameter()
sortinoRatioParameter = SortinoRatioParameter()

Initialize a new instance of the SortinoRatioParameter class.

Methods

AddRiskSample
protected override void AddRiskSample(decimal ret)
sortinoRatioParameter.AddRiskSample(ret)

Adds a new sample to the risk accumulator.

ret
The return value.
GetRisk
protected override decimal GetRisk(int count, decimal sumReturn)
result = sortinoRatioParameter.GetRisk(count, sumReturn)

Gets the risk value (e.g., stddev or downside deviation).

count
Count of samples.
sumReturn
Sum of all returns.

Returns: Risk value.

HasEnoughRiskSamples
protected override bool HasEnoughRiskSamples(int count)
result = sortinoRatioParameter.HasEnoughRiskSamples(count)

Checks if enough risk samples accumulated for calculation.

count
Count of samples.

Returns: Check result.

Load
public override void Load(SettingsStorage storage)
sortinoRatioParameter.Load(storage)

To load the state of statistic parameter.

storage
Storage.
Reset
public override void Reset()
sortinoRatioParameter.Reset()

To reset the parameter value.

Save
public override void Save(SettingsStorage storage)
sortinoRatioParameter.Save(storage)

To save the state of statistic parameter.

storage
Storage.