Upside Capture Ratio
Calculate the Upside Capture Ratio of an investment portfolio or asset’s returns.
The Upside Capture Ratio measures how well an investment portfolio or asset performs relative to a benchmark during periods in which the benchmark’s return is positive. A ratio above 1 (or 100%) indicates the asset captured more of the benchmark’s gains than the benchmark itself.
The formula is as follows:
\[\text{Upside Capture Ratio} = \text{Average Return in Up Periods} / \text{Average Benchmark Return in Up Periods}\]No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Upside Capture Ratio for you. Just ask in plain English.
Calculate the Upside Capture Ratio in Python
The Upside Capture Ratio is available in the Performance module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_upside_capture_ratio as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(["AAPL", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")
toolkit.performance.get_upside_capture_ratio()
Which returns:
| Date | AAPL | TSLA |
|---|---|---|
| 2021 | 1.3754 | 2.1079 |
| 2022 | 1.3044 | 1.7261 |
| 2023 | 1.1783 | 2.3099 |
| 2024 | 1.1158 | 2.5976 |
| 2025 | 1.0162 | 2.2065 |
| 2026 | 0.766 | 1.593 |
Parameters
get_upside_capture_ratio accepts the following parameters:
- period (str, optional): The period to use for the calculation. Defaults to “quarterly” if the Toolkit is initialised with quarterly=True, otherwise “yearly”.
- rounding (int, optional): The number of decimals to round the results to. Defaults to 4.
- growth (bool, optional): Whether to calculate the growth of the ratios. Defaults to False.
- lag (int | str, optional): The lag to use for the growth calculation. Defaults to 1.
- standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.
Related Performance Metrics
The Performance module page introduces the module, and the sidebar lists all of its functions.