Beta Fragility

Calculate the beta fragility heuristic of an investment portfolio or asset, the stress-testing measure of Taleb, Canetti, Kinda, Loukoianova and Schmieder (2012): whether its response to the benchmark bends at the extremes, so that a linear Beta understates its losses in a large market fall.

The formula is as follows:

\[H = (w_{low} \cdot \text{Return\_low} + w_{\text{high}} \cdot \text{Return\_high}) - \text{Return\_middle}\] \[w_{low} = \frac{\text{Benchmark\_high} - \text{Benchmark\_middle}}{\text{Benchmark\_high} - \text{Benchmark\_low}}\] \[w_{\text{high}} = \frac{\text{Benchmark\_middle} - \text{Benchmark\_low}}{\text{Benchmark\_high} - \text{Benchmark\_low}}\]

Where the daily returns within each period are sorted by the benchmark return, and low, middle and high are the days with the lowest, the median (position n // 2) and the highest benchmark return. H compares the asset’s return on the median day with the straight line through its returns on the two extreme days. A negative H means the returns are concave in the market’s (fragile: the losses accelerate in a large fall), a positive H that they are convex (antifragile).

Also known as: fragility heuristic, beta fragility heuristic.

Example · JPM, KO, NVDA · 2021 to 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_beta_fragility:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["JPM", "KO", "NVDA"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.performance.get_beta_fragility()

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

How fragile was the beta of JPMorgan Chase, Coca-Cola and Nvidia, the change in beta when the market moves, in each year from 2021 to 2025?

Which returns:

Parameters

get_beta_fragility accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe 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”."weekly"
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
show_columnsstr | list[str] | NoneThe 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

References

  • Paper Taleb, N.N., Canetti, E., Kinda, T., Loukoianova, E., & Schmieder, C. (2012). “A New Heuristic Measure of Fragility and Tail Risks: Application to Stress Testing.” IMF Working Paper WP/12/216.
  • Library Referenced against empyrical’s beta_fragility_heuristic
Share