IRiskRatioCalculator<T>

Interfaces · AiDotNet.Finance.Interfaces

Computes risk-adjusted performance ratios (Sharpe, Sortino, Calmar) from a periodic return series.

Known implementations: RiskRatios<T>

For Beginners

These ratios all divide “how much you earned” by “how much risk you took”; higher is better. The default implementation uses the standard textbook formulas.

How It Works

This is a customization point, not a trainable model. Risk models, backtests, and trading agents depend on this interface to score a strategy’s risk-adjusted return and default to the RiskRatios implementation, but callers can substitute their own conventions (e.g. a different annualization, a downside threshold other than zero).

Methods

Method Summary
T Calmar(IReadOnlyList<T> returns, int periodsPerYear) Calmar ratio (annualized return / maximum drawdown).
T Sharpe(IReadOnlyList<T> returns, double riskFreePerPeriod, int periodsPerYear) Annualized Sharpe ratio (mean excess return / total volatility).
T Sortino(IReadOnlyList<T> returns, double riskFreePerPeriod, int periodsPerYear) Annualized Sortino ratio (mean excess return / downside deviation).