Class SharpeRatioParameter
- Namespace
- StockSharp.Algo.Statistics
- Assembly
- StockSharp.Algo.dll
Sharpe ratio (annualized return - risk-free rate / annualized standard deviation).
[Display(ResourceType = typeof(LocalizedStrings), Name = "SharpeRatio", Description = "SharpeRatioDesc", GroupName = "PnL", Order = 11)]
public class SharpeRatioParameter : RiskAdjustedRatioParameter, INotifyPropertyChangedEx, INotifyPropertyChanging, IStatisticParameter<decimal>, IPnLStatisticParameter, IStatisticParameter, IPersistable, INotifyPropertyChanged, IRiskFreeRateStatisticParameter
- Inheritance
-
SharpeRatioParameter
- Implements
- Inherited Members
- Extension Methods
Constructors
SharpeRatioParameter()
Initialize a new instance of the SharpeRatioParameter class.
public SharpeRatioParameter()
Methods
AddRiskSample(decimal)
Adds a new sample to the risk accumulator.
protected override void AddRiskSample(decimal ret)
Parameters
ret
decimalThe return value.
GetRisk(int, decimal)
Gets the risk value (e.g., stddev or downside deviation).
protected override decimal GetRisk(int count, decimal sumReturn)
Parameters
Returns
- decimal
Risk value.
HasEnoughRiskSamples(int)
Checks if enough risk samples accumulated for calculation.
protected override bool HasEnoughRiskSamples(int count)
Parameters
count
intCount of samples.
Returns
- bool
Check result.
Load(SettingsStorage)
To load the state of statistic parameter.
public override void Load(SettingsStorage storage)
Parameters
storage
SettingsStorageStorage.
Reset()
To reset the parameter value.
public override void Reset()
Save(SettingsStorage)
To save the state of statistic parameter.
public override void Save(SettingsStorage storage)
Parameters
storage
SettingsStorageStorage.