omega_ratio
Calculate the Omega ratio of a periodic return series across return thresholds.
The Omega ratio measures the probability-weighted gains above a threshold relative
to the losses below it. Each annualized threshold is converted to a per-period
threshold assuming 252 periods per year. The ratio is evaluated at bins
thresholds spanning the requested range, giving a profile of risk and reward
rather than a single number.
Examples
from openbb import obb
obb.quantitative.performance.omega_ratio(target='return', data=[{'date': '2023-01-02', 'return': 0.01}, {'date': '2023-01-03', 'return': 0.01}, {'date': '2023-01-04', 'return': 0.01}, {'date': '2023-01-05', 'return': 0.01}, {'date': '2023-01-06', 'return': 0.01}])
Parameters
- standard
data: Data | DataFrame | Series | dict | list | list[DataFrame] | list[Data] | list[Series] | ndarray
Input dataset.
target: str
Name of the periodic return column to analyze.
threshold_start: float
Default: 0.0
Lower bound of the annualized return-threshold range, as a decimal fraction.
threshold_end: float
Default: 1.5
Upper bound of the annualized return-threshold range, as a decimal fraction.
bins: int
Default: 50
Number of evenly spaced thresholds to evaluate.
Returns
results: list[OmegaRatioData]
Serializable results.
provider: str
Provider name.
warnings: Optional[list[Warning_]]
List of warnings.
chart: Optional[Chart]
Chart object.
extra: dict[str, Any]
Extra info.
Data
- standard
threshold: float
Annualized return threshold the ratio is evaluated at.
omega: float
Omega ratio at the threshold.