How to use capture ratios to improve investment performance

August 12, 2023
Facebook logo.
Twitter logo.
LinkedIn logo.
Get this code in Google Colab

How to use capture ratios to improve investment performance

In today's newsletter, we'll cover the up-market capture ratio, a framework for evaluating investment performance in rising markets.

Even though the ratio is used by professional money managers, you can use it to better gauge your own investment performance.

Let's dive in!

How to use capture ratios to improve investment performance

The up-market capture ratio is a way to evaluate how well an investment performs when the market is rising. It compares the performance against a benchmark during bull markets.

The ratio is calculated by dividing the investment’s returns by the returns of the benchmark during a bull market.

The higher the up-market capture ratio, the better the performance during positive market conditions.

If you’re a systematic trader, you can use the ratio to determine if your strategy performs well during bull markets or whether it may be better suited to other market regimes.

Here's how you can use it like the professionals with Python.

Imports and set up

Start with the imports and prepare the data. All we need today is the OpenBB SDK for market data.

1from openbb_terminal.sdk import openbb
2
3prices = openbb.economy.index(
4    ["AAPL", "WMT", "SPY"], 
5    start_date="2020-01-01"
6)
7
8returns = prices.pct_change().dropna()
9
10data = returns.assign(
11    port=returns[["AAPL", "WMT"]].sum(axis=1)
12)[["SPY", "port"]]

After we import the OpenBB SDK and download data, we compute the daily returns and build the simple equally weighted portfolio. Using the pandas assign method, you can easily add a new column to your DataFrame. In this case, we add a column with the sum of AAPL and WMT returns and name it port.

Compute the upside capture ratio

There are two steps to computing the ratio. In the first step, we build a function to compute the annual return.

1def annual_return(returns):
2    num_years = len(returns) / 252
3    return (returns + 1).prod() ** (1 / num_years) - 1

The code divides the number of returns by 252 to get the number of years. The function then computes the cumulative product of the daily returns to get the cumulative return, raises it to the power of the inverse of the number of years, and subtracts 1 to provide the annualized return.

In the second we build a function to compute the upside capture.

1def upside_capture(port_returns, bench_returns):
2    mask = bench_returns > 0
3    port_returns = port_returns[mask]
4    bench_returns = bench_returns[mask]
5
6    return (
7        annual_return(port_returns) 
8        / annual_return(bench_returns)
9    )

The ratio is calculated by dividing the investment’s returns by the returns of the benchmark during a rising market. The first step is to find where the benchmark is rising which is done by masking the returns when they are not positive.

Then to compute the up-market capture ratio, divide the annual returns of the positive portfolio returns by the annual return of the positive benchmark returns.

A positive up-market capture ratio indicates this portfolio outperforms the benchmark during bull markets.

Next Steps

There are two steps you can take.

First, adjust the simple two-stock portfolio to reflect your own. You can increase complexity by including a periodic rebalance.

Second, compute the cousin of the up-market capture ratio: The down-market capture ratio. You can do this by changing one part of the code.

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