SortinoRatioParameter

StockSharp.Algo.Statistics

排序比率(年收益 -- -- 无风险率/年收益率下降)。

继承自: RiskAdjustedRatioParameter

构造函数

SortinoRatioParameter
public SortinoRatioParameter()
sortinoRatioParameter = SortinoRatioParameter()

初始化 SortinoRatioParameter 类的新实例 。

方法

AddRiskSample
protected override void AddRiskSample(decimal ret, long count)
sortinoRatioParameter.AddRiskSample(ret, count)

Adds consecutive periods of the same return to the risk accumulator.

ret
The return value.
count
How many periods earned it.
GetRisk
protected override decimal GetRisk(long 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.

返回值: Risk value.

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

Checks if enough risk samples accumulated for calculation.

count
Count of samples.

返回值: Check result.

LoadAsync
public override Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = sortinoRatioParameter.LoadAsync(storage, cancellationToken)

To load the state of statistic parameter.

storage
Storage.
cancellationToken
CancellationToken

返回值: Task

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

复置set州.

SaveAsync
public override Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = sortinoRatioParameter.SaveAsync(storage, cancellationToken)

To save the state of statistic parameter.

storage
Storage.
cancellationToken
CancellationToken

返回值: Task