Calculate the STARR (Stable Tail Adjusted Return Ratio) of an investment portfolio or asset’s returns.

The Sharpe ratio penalizes upside and downside volatility equally via the standard deviation. The STARR ratio instead scales the mean excess return by the Conditional Value at Risk (CVaR / Expected Shortfall), a coherent tail-risk measure that only looks at the average magnitude of losses beyond the alpha quantile. This makes STARR more appropriate than the Sharpe ratio for return distributions with fat left tails.

The formula is as follows:

\[\text{STARR Ratio} = \text{Excess Return} / | \operatorname{CVaR}(\alpha) |\]

See definition: https://en.wikipedia.org/wiki/Expected_shortfall

Also known as: Stable Tail Adjusted Return Ratio, Conditional Sharpe Ratio.

STARR Ratio in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_starr_ratio as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["CAT", "DE", "HON"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2020-01-01",
    end_date="2025-12-31",
)

toolkit.performance.get_starr_ratio()

Or, after setting up the Finance Toolkit MCP, ask:

What was the STARR ratio, the excess return per unit of tail risk, of Caterpillar, Deere and Honeywell in each year from 2021 to 2025?

Which returns:

Date CAT DE HON
2021 0.287 0.4693 -0.0376
2022 0.2125 0.2897 0.0386
2023 0.3701 -0.1499 -0.0915
2024 0.3598 0.063 0.1513
2025 0.8327 0.1243 -0.1867

Parameters

get_starr_ratio accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe period to use for the calculation. Defaults to “quarterly” if the Toolkit is initialised with quarterly=True, otherwise “yearly”."quarterly"
within_periodboolWhether to calculate the CVaR within the specified period or for the entire period. Thus whether to look at the CVaR within a specific year (if period = ‘yearly’) or look at the entirety of all years. Defaults to True.False
alphafloatThe confidence level used for the CVaR calculation (e.g. 0.05 for the worst 5% of outcomes). Defaults to 0.05.0.01
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise).2
growthboolWhether to calculate the growth of the ratios. Defaults to False.True
lagint | list[int]The lag to use for the growth calculation. Defaults to 1.4
standardizeboolWhether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.True
Share