omega_ratio
Calculate the Omega Ratio.
The Omega Ratio is a sophisticated metric that goes beyond traditional performance measures by considering the probability of achieving returns above a given threshold. It offers a more nuanced view of risk and reward, focusing on the likelihood of success rather than just average outcomes.
Examples
from openbb import obb
# Get Omega Ratio.
stock_data = obb.equity.price.historical(symbol="TSLA", start_date="2023-01-01", provider="fmp").to_df()
returns = stock_data["close"].pct_change().dropna()
obb.quantitative.performance.omega_ratio(data=returns, target="close")
obb.quantitative.performance.omega_ratio(target='close', data='[{'date': '2023-01-02', 'close': 0.05}, {'date': '2023-01-03', 'close': 0.08}, {'date': '2023-01-04', 'close': 0.07}, {'date': '2023-01-05', 'close': 0.06}, {'date': '2023-01-06', 'close': 0.06}]')
Parameters
- standard
data: list[openbb_core.provider.abstract.data.Data]
Time series data.
target: str
Target column name.
threshold_start: float
Start threshold, by default 0.0
threshold_end: float
Default: 1.5
End threshold, by default 1.5
Returns
results: list[OmegaModel]
Serializable results.
provider: None
Provider name.
warnings: Optional[list[Warning_]]
list of warnings.
chart: Optional[Chart]
Chart object.
extra: dict[str, Any]
Extra info.
Data
- OmegaModel
threshold: float
omega: float