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
Name | Type | Description | Default | Optional |
---|---|---|---|---|
data | List[Data] | Time series data. | False | |
target | str | Target column name. | False | |
threshold_start | float, optional | Start threshold, by default 0.0 | False | |
threshold_end | float, optional | End threshold, by default 1.5 | False |
Returns
OBBject
results : List[OmegaModel]
Omega ratios.