Probabilistic Sortino Ratio
The Probabilistic Sortino Ratio is the probability that the true Sortino Ratio of an asset is above zero, with the standard error of the Probabilistic Sharpe Ratio of Bailey and López de Prado (2012) applied to it, as quantstats does. It weighs the observed ratio against the length of the sample and the skewness and kurtosis of the returns.
The formula for the Probabilistic Sortino Ratio is as follows:
\[\text{PSoR} = \Phi\left(\frac{\text{SoR} \cdot \sqrt{n - 1}}{\sqrt{1 - \gamma_{3} \cdot \text{SoR} + \frac{\gamma_{4} - 1}{4} \cdot \text{SoR}^{2}}}\right)\]Where SoR is the Sortino Ratio of one return, n the number of excess returns, \(\gamma_{3}\) their skewness, \(\gamma_{4}\) their kurtosis (3 for a normal distribution) and Phi the standard normal distribution function. Close to 1 the Sortino Ratio is very likely positive, near 0.5 the evidence is inconclusive. That standard error was derived for the Sharpe ratio; for the Sortino ratio it has no formal justification, so read the probability as indicative.
Investors do not mind returns that are higher than expected, yet the standard deviation in the Sharpe ratio counts them as risk just as much as losses. Sortino and van der Meer (1991) argued that risk is the chance of falling short of a target, the minimum acceptable return, and measured it with the downside deviation, which only counts the returns below that target. Dividing the excess return by the downside deviation gives a risk-adjusted return that rewards an asset whose volatility lies mostly on the upside. Here the target is the risk free rate, so the returns below it are the negative excess returns. The variants correct the ratio for serially correlated returns, scale it to compare with the Sharpe ratio, or turn it into the probability that it is above zero.
See definition: Sortino ratio (Wikipedia)
Also known as: PSoR, Sortino ratio significance probability.
In the Finance Toolkit this is get_sortino_ratio with method="probabilistic", the same function as Sortino Ratio.
Example · V, MA, AXP · 2021 to 2025
Install the Finance Toolkit with pip install financetoolkit -U, then call get_sortino_ratio:
from financetoolkit import Toolkit
toolkit = Toolkit(
["V", "MA", "AXP"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2021-01-01",
end_date="2025-12-31",
)
toolkit.performance.get_sortino_ratio(method="probabilistic")
| Parameter | Type | Description | Example |
|---|---|---|---|
period | str | The period to use for the calculation. Options are: “daily”, “weekly”, “monthly”, “quarterly”, “yearly”. Defaults to “quarterly” if the Toolkit is initialised with quarterly=True, otherwise “yearly”. | "quarterly" |
rolling | int | The rolling window size to use for the calculation. If set, the Sortino ratio is calculated over a rolling window of this many periods across the full return history instead of per period. At least 2. Defaults to None. | 4 |
method | str | Which Sortino ratio to calculate, as described above. Options are: “standard” (Sortino Ratio), “smart” (Smart Sortino Ratio, with an autocorrelation penalty), “adjusted” (Adjusted Sortino Ratio, divided by SQRT(2)), “probabilistic” (Probabilistic Sortino Ratio, a probability), “probabilistic_adjusted” (Probabilistic Adjusted Sortino Ratio, a probability). Defaults to “standard”. | "standard" |
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 |
annualize | bool | Whether to annualize the Sortino ratio, multiplying it by the square root of the number of observations in a year, as get_sharpe_ratio does (252 for the daily returns within each period, 365 for a ticker that trades on weekends, or the periods in a year for a rolling ratio). The probabilistic methods return probabilities, which annualizing does not change. Defaults to False. | True |
transform | str | list[str] | None | Time series steps applied in order, such as “sma:12” (moving average), “ema:12”, “std:12”, “zscore:60”, “percentile:120”, “yoy”, “pct_change:3,annualize:3”, “log”, “diff”, “cumsum” or “hp_trend” and “hp_cycle” (Hodrick-Prescott), before growth. A window needs that many periods of history, so the first periods can be empty. Defaults to None. | None |
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 |
Which returns:
| Date | V | MA | AXP |
|---|---|---|---|
| 2021 | 0.5361 | 0.6020 | 0.9707 |
| 2022 | 0.4682 | 0.4928 | 0.4134 |
| 2023 | 0.9789 | 0.9393 | 0.9326 |
| 2024 | 0.9186 | 0.9500 | 0.9988 |
| 2025 | 0.7218 | 0.6658 | 0.8778 |
5 rows
References
- Paper Bailey, D.H., & López de Prado, M. (2012). “The Sharpe Ratio Efficient Frontier.” Journal of Risk, 15(2), 3-44.
- Library Referenced against quantstats’ probabilistic_sortino_ratio (Probabilistic Sortino Ratio)
- Library Shares similar logic as quantstats’ probabilistic_ratio (Probabilistic Sortino Ratio)
- Library Shares similar logic as quantstats’ probabilistic_sharpe_ratio (Probabilistic Sortino Ratio)
- Library Shares similar logic as PerformanceAnalytics (R)’s ProbSharpeRatio (Probabilistic Sortino Ratio)
- Library Shares similar logic as RiskLabAI’s probabilistic_sharpe_ratio (Probabilistic Sortino Ratio)