Mean-Tail Gini Optimization

The Tail Gini is a loss measure of the worst alpha share of the portfolio returns that, unlike the Conditional Value at Risk, also counts how far the losses within that tail spread out (Furman, Wang and Zitikis, 2017). It is a weighted sum of the Conditional Value at Risk at tail probabilities up to alpha, an ordered weighted average of the sorted returns (Cajas, 2021).

The formula for the Tail Gini starts from the Conditional Value at Risk \(\text{CVaR} (\alpha_{j})\) of the portfolio returns \(X_{t}\), the sum of the weights \(w_{i}\) times the returns \(r_{i , t}\) of the N assets, at \(m = 100\) tail probabilities \(\alpha_{1} < \ldots < \alpha_{m} = \alpha\) spaced evenly from 0.0001, weighed with the coefficients \(c_{j}\), the middle one for every \(1 < j < m\):

\[X_{t} = \sum_{i=1}^{N} w_{i} \cdot r_{i,t}\] \[\text{TG} = \sum_{j=1}^{m} c_{j} \cdot \text{CVaR}(\alpha_{j})\] \[c_{1} = \frac{\alpha_{2} \cdot \alpha_{1}}{\alpha^{2}}\] \[c_{j} = \frac{(\alpha_{j+1} - \alpha_{j-1}) \cdot \alpha_{j}}{\alpha^{2}}\] \[c_{m} = \frac{\alpha_{m} - \alpha_{m-1}}{\alpha}\]

The worst returns within the tail weigh more than in the Conditional Value at Risk, so the portfolio that minimizes it avoids the assets behind the very worst periods.

It is the portfolio with the lowest risk, the lowest risk at a target return, or the highest ratio of the average excess return to the risk. Mean-variance analysis measures risk by the variance; the mean-risk portfolios keep its trade-off between expected return and risk and measure the risk of the historical portfolio returns in another way. Measures that only count losses leave upside swings unpenalized, the dispersion measures count deviations in proportion to their size rather than their square, and the drawdown measures penalize deep and long falls, which are what investors feel and what ends strategies.

There are two objectives. The minimum risk portfolio minimizes the risk measure, at a target expected return when one is given. The maximum ratio portfolio maximizes the expected excess return over the risk measure, with the transformation of Charnes and Cooper (1962) that turns the ratio into a problem of the same kind as the minimum risk one; with the volatility as the measure, it would be the maximum Sharpe ratio portfolio.

Also known as: Gini shortfall.

In the Finance Toolkit this is get_mean_risk_weights with risk_measure="tail_gini", the same function as Mean-Risk Weights.

Example · AAPL, MSFT, JNJ, XOM · 2021 to 2025

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

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["AAPL", "MSFT", "JNJ", "XOM"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.portfolio.get_mean_risk_weights(
    risk_measure="tail_gini", objective="maximum_ratio"
)[["Weight", "Expected Return", "Tail Gini", "Tail Gini Ratio"]]

Which returns:

References

  • Paper Charnes, A. and Cooper, W. W. (1962). “Programming with Linear Fractional Functionals.” Naval Research Logistics Quarterly, 9(3-4), 181-186.
  • Paper Furman, E., Wang, R. and Zitikis, R. (2017). “Gini-Type Measures of Risk and Variability: Gini Shortfall, Capital Allocations, and Heavy-Tailed Risks.” Journal of Banking & Finance, 83, 70-84.
  • Paper Cajas, D. (2021). “OWA Portfolio Optimization: A Disciplined Convex Programming Framework.” SSRN Working Paper 3988927.
  • Paper Kelley, J. E. (1960). “The Cutting-Plane Method for Solving Convex Programs.” Journal of the Society for Industrial and Applied Mathematics, 8(4), 703-712.
  • Paper Ben-Ameur, W. and Neto, J. (2007). “Acceleration of Cutting-Plane and Column Generation Algorithms: Applications to Network Design.” Networks, 49(1), 3-17.
  • Library Referenced against Riskfolio-Lib’s Portfolio.owa_optimization (Tail Gini)
Share