sigmaquant.performance.metrics.omega_ratio#

sigmaquant.performance.metrics.omega_ratio(returns, required_return, frequency)#

Compute the Omega ratio.

The Omega ratio measures the probability-weighted gains relative to probability-weighted losses with respect to a required return.

The required return is expressed at annual frequency and is internally converted to the same frequency as the input returns.

Parameters:
  • returns – Sequence of periodic returns.

  • required_return – Annual required (minimum acceptable) return.

  • frequency

    Frequency of the input returns:
    • ”D”: daily

    • ”W”: weekly

    • ”M”: monthly

    • ”Y”: yearly

Returns:

Omega ratio.

Return type:

float

Notes

The Omega ratio is defined as:

\[\Omega(\tau) = \frac{ \sum_{t=1}^T \max(r_t - \tau, 0) }{ \sum_{t=1}^T \max(\tau - r_t, 0) }\]

where \(r_t\) are the periodic returns and \(\tau\) is the required return expressed at the same frequency as the input series.

The annual required return \(R_{\text{req}}\) is converted to periodic frequency as:

\[\begin{split}\tau = \begin{cases} R_{\text{req}}, & N = 1 \\ (1 + R_{\text{req}})^{1 / N} - 1, & N > 1 \end{cases}\end{split}\]

where \(N\) is the number of periods per year implied by frequency.

NaN values are ignored. If the denominator is zero (no downside deviations), the Omega ratio is undefined.