Calculate the Omega Ratio of an investment portfolio or asset’s returns.

The Omega Ratio is a risk-return measure that divides the sum of gains above a minimum acceptable return (MAR) by the sum of losses below it, capturing the full shape of the return distribution rather than only its first two moments (unlike the Sharpe Ratio).

The formula is as follows:

\[\text{Omega Ratio} = \operatorname{SUM}(\text{Gains above MAR}) / \operatorname{SUM}(\text{Losses below MAR})\]

See definition: https://en.wikipedia.org/wiki/Omega_ratio

Omega Ratio in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_omega_ratio as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["BLK", "SCHW", "BX"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.performance.get_omega_ratio()

Or, after setting up the Finance Toolkit MCP, ask:

What was the Omega ratio of BlackRock, Charles Schwab and Blackstone in each year from 2021 to 2025?

Which returns:

  BLK SCHW BX
2021 1.2446 1.3257 1.5958
2022 0.9272 1.0318 0.8945
2023 1.1525 0.9625 1.3792
2024 1.2732 1.094 1.2109
2025 1.0728 1.2867 0.9944

Parameters

get_omega_ratio accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe period to use for the calculation. Defaults to “quarterly” if the Toolkit is initialised with quarterly=True, otherwise “yearly”."quarterly"
within_periodboolWhether to calculate the Omega Ratio within the specified period or for the entire period. Thus whether to look at the Omega Ratio within a specific year (if period = ‘yearly’) or look at the entirety of all years. Defaults to True.False
rollingintThe rolling window size to use for the calculation. If set, the Omega Ratio is calculated over a rolling window of this many periods across the full return history instead of per period. Defaults to None.4
minimum_acceptable_returnfloatThe minimum acceptable return (MAR) used as the threshold between gains and losses. Defaults to 0.0.0.001
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise).2
growthboolWhether to calculate the growth of the ratios. Defaults to False.True
lagint | list[int]The lag to use for the growth calculation. Defaults to 1.4
standardizeboolWhether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.True
Share