Capture your tail risk with the Omega ratio

October 29, 2022
Facebook logo.
Twitter logo.
LinkedIn logo.
Get this code in Google Colab

Capture your tail risk with the Omega ratio

Capture your tail risk with the Omega ratio

In today’s issue, I’m going to show you how to use a popular risk-return metric to measure performance: the Omega ratio.

The Omega ratio is a weighted ratio of gains and losses above a threshold return. It captures more information about returns than similar metrics like the Sharpe ratio.

It does this by adding up the area under the distribution around the threshold return. The area above the threshold measures the weight of the gains. The area below the threshold measures the weight of the losses. The Omega ratio is the positive area divided by the negative area.

If this sounds abstract, don’t worry. It’s straightforward in Python.

Without considering the Omega ratio, you miss important information about risk.

Sophisticated investors like hedge funds use the Omega ratio. They use it because alternative investments have long-tail risks not measured by other metrics like the Sharpe ratio. Even if you’re not investing in exotic derivatives, the Omega ratio is useful.

A simple test shows us AAPL’s returns are not normally distributed.

Capture your tail risk with the Omega ratio

The skew (which measures symmetry) is -0.01. A normal distribution has skew of 0. The kurtosis (which measures outliers) is 5.3. A normal distribution has kurtosis of 3.

Using performance metrics that don’t take the entire distribution into consideration misses important information about risk. Use the Omega ratio to capture it.

By the end of this newsletter, you’ll know how to:

  1. Get stock price data
  2. Compute the Omega ratio
  3. Assess AAPL with the Omega ratio

All using Python.

Step 1: Get the data

Start by importing the libraries and getting the data. I like to use yfinance for getting stock data.

1import yfinance as yf
2import numpy as np

Grab the data and compute returns.

1data = yf.download("AAPL", start="2020-01-01", end="2021-12-31")
2
3returns = data["Adj Close"].pct_change()

Step 2: Compute the Omega ratio

Creating a function for the Omega ratio in Python is straightforward.

1def omega_ratio(returns, required_return=0.0):
2    """Determines the Omega ratio of a strategy.
3    
4    Parameters
5    ----------
6    returns : pd.Series or np.ndarray
7        Daily returns of the strategy, noncumulative.
8    required_return : float, optional
9        Minimum acceptance return of the investor. Threshold over which to
10        consider positive vs negative returns. It will be converted to a
11        value appropriate for the period of the returns. E.g. An annual minimum
12        acceptable return of 100 will translate to a minimum acceptable
13        return of 0.018.
14
15    Returns
16    -------
17    omega_ratio : float
18
19    Note
20    -----
21    See <https://en.wikipedia.org/wiki/Omega_ratio> for more details.
22    """
23    
24    return_threshold = (1 + required_return) ** (1 / 252) - 1
25    
26    returns_less_thresh = returns - return_threshold
27    
28    numer = sum(returns_less_thresh[returns_less_thresh > 0.0])
29    denom = -1.0 * sum(returns_less_thresh[returns_less_thresh < 0.0])
30    
31    if denom > 0.0:
32        return numer / denom
33    else:
34        return np.nan

First, annualize the return threshold. (The ** syntax in Python is the power operator i.e. 2**2 is 2 squared.) Then, subtract the threshold from the returns. Finally, add up the positive returns less the threshold and negative returns less the threshold.

The Omega ratio is the sum of positive returns less the threshold divided by the sum of negative returns less the threshold.

Step 3: Use the Omega ratio

When analyzing a stock, investment returns, or strategy performance, start with the return distribution. If the returns have skew and kurtosis, consider using the Omega ratio.

Going back to the AAPL example, create a distribution of returns in one line of code.

1returns.hist(bins=50)
Capture your tail risk with the Omega ratio

You can check the skew and kurtosis.

1returns.skew()
2returns.kurtosis()

And finally, compute the Omega ratio.

1omega_ratio(returns, 0.07)

Here, I use a threshold of 7% which is the historical average annual return of the stock market. The Omega ratio is 1.2. Taking into consideration skew and kurtosis, AAPL’s gains outperformed the losses by a factor of 1.2.

Since asset returns are not normally distributed, use the Omega ratio to capture risks other metrics don’t.

Well, that's it for today. I hope you enjoyed it.

See you again next week.

Man with glasses and a wristwatch, wearing a white shirt, looking thoughtfully at a laptop with a data screen in the background.