Upside Potential Ratio
Calculate the Upside Potential Ratio of an investment portfolio or asset’s returns.
The Upside Potential Ratio of Sortino, van der Meer & Plantinga (1999) divides the expected return above a minimum acceptable return (MAR) by the downside deviation below it. Where the Sortino Ratio rewards the mean excess return, which the losses lower, this ratio rewards only the potential above the MAR and penalizes only the risk below it, each counted once.
The formula is as follows:
\[\text{Upside Potential Ratio} = \frac{\text{Upside Potential}}{\text{Downside Deviation}}\] \[\text{Upside Potential} = \frac{1}{N} \cdot \sum(\max(\text{Excess Return},\; 0))\] \[\text{Downside Deviation} = \sqrt{\frac{1}{N} \cdot \sum(\min(\text{Excess Return},\; 0)^{2})}\]Where N is the total number of observations in both, as the paper weighs every outcome by its probability, and the Excess Return is the return minus the risk-free rate, the MAR of get_sortino_ratio (whose Downside Deviation this is). By default one ratio is reported per period, computed from the daily excess returns falling inside that period. For a rolling period, period instead sets the frequency of the returns themselves and the ratio is computed over a rolling window of rolling such returns.
A period needs at least two observations, and a period without a return below the MAR has no downside to divide by; both are left out.
As with the Sortino Ratio, the result is a ratio of the observations within the period and is not annualized.
For more information, see the following paper:
- Sortino, F.A., van der Meer, R., & Plantinga, A. (1999). “The Dutch Triangle.” Journal of Portfolio Management, 26(1), 50-57.
Also known as: UPR.
Upside Potential Ratio in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_upside_potential_ratio as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
["NKE", "LULU", "ADDYY"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2021-01-01",
end_date="2025-12-31",
)
toolkit.performance.get_upside_potential_ratio()
Or, after setting up the Finance Toolkit MCP, ask:
What was the upside potential ratio of Nike, Lululemon and Adidas in each year from 2021 to 2025?
Which returns:
| Date | NKE | LULU | ADDYY |
|---|---|---|---|
| 2021 | 0.6044 | 0.5902 | 0.493 |
| 2022 | 0.4878 | 0.513 | 0.4846 |
| 2023 | 0.4598 | 0.6448 | 0.6168 |
| 2024 | 0.3159 | 0.4143 | 0.5526 |
| 2025 | 0.464 | 0.3496 | 0.4248 |
Parameters
get_upside_potential_ratio accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
period | str | The period to use for the calculation. Defaults to “quarterly” if the Toolkit is initialised with quarterly=True, otherwise “yearly”. | "weekly" |
rolling | int | None | The rolling window size to use for the calculation. If set, the ratio is calculated over a rolling window of this many periods across the full return history instead of per period. Defaults to None. | 4 |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
growth | bool | Whether to calculate the growth of the ratios. Defaults to False. | True |
lag | int | list[int] | The lag to use for the growth calculation. Defaults to 1. | 4 |
standardize | bool | Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. | True |
show_columns | str | list[str] | None | The columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column. | None, which keeps every column |