Quant Memo
Core

The Lorenz Curve and Gini Coefficient

A picture and a single number for how unevenly a total is shared among contributors — originally built for income inequality, but equally useful for asking how concentrated a portfolio's returns or a strategy's P&L really are.

Prerequisites: Standard Deviation, Sample Quantile Estimators and Plotting Positions

A strategy has 100 winning trades over the year. Did all 100 contribute roughly equally to the total profit, or did 5 huge trades generate 90% of it while the other 95 barely broke even? Two strategies can have identical total P&L and an identical win rate while having wildly different answers to that question — and that difference matters enormously for how fragile the strategy is to losing access to its best few setups. The Lorenz curve and its summary statistic, the Gini coefficient, were built to answer exactly this kind of "how concentrated is the total among contributors" question, originally for income across a population, but the math doesn't care what's being shared.

An analogy: splitting a restaurant bill by who ordered what

Imagine ten friends split a $500 dinner bill, but not evenly — everyone pays in proportion to what they ordered. If everyone ordered roughly the same, each pays about $50, and a plot of "cumulative share of the bill" against "cumulative share of people, sorted from smallest order to largest" would be close to a straight diagonal line — the first 30% of people (by order size) pay close to 30% of the bill. But if one friend ordered the $300 lobster while the other nine split $200, the same plot would bow way down and to the right: the first 90% of people (the modest orderers) account for only 40% of the bill, and the last person alone accounts for 60%. That bowed curve is the Lorenz curve, and how far it bows away from the diagonal is the Gini coefficient.

The mechanics, one piece at a time

Sort nn contributors from smallest to largest, and plot the cumulative share of the total (y-axis) against the cumulative share of contributors (x-axis). A perfectly equal distribution — every contributor identical — traces the 45-degree diagonal line, since the bottom p%p\% of contributors always hold exactly p%p\% of the total. The Lorenz curve is this cumulative plot for your actual data; it always sags below the diagonal (or touches it) because sorting smallest-to-first guarantees the bottom share never exceeds its proportional share. The Gini coefficient condenses the whole curve into one number:

G=AA+B,G = \frac{A}{A + B},

where AA is the area between the diagonal and the Lorenz curve, and A+BA + B is the total area under the diagonal (a triangle). In plain English: Gini measures what fraction of the maximum-possible gap between perfect equality and your data is actually realized — G=0G = 0 means everyone contributes identically, and GG approaches 1 as the total becomes dominated by a shrinking handful of contributors.

Worked example 1: two trading strategies, same total, different concentration

Strategy A has 5 trades earning $20,000 each (total $100,000). Strategy B has 5 trades earning $5,000, $8,000, $12,000, $25,000, $50,000 (also totaling $100,000). Strategy A's Lorenz curve is exactly the diagonal — every trade contributes equally, so GA=0G_A = 0. For Strategy B, sorted cumulative shares are 5%, 13%, 25%, 50%, 100% of the total against 20%, 40%, 60%, 80%, 100% of the trade count — the curve sags well below the diagonal, giving roughly GB0.32G_B \approx 0.32. Same total profit, same trade count, but B's performance depends far more heavily on its single best trade ($50,000, half the year's profit) than A's does on any one trade.

Worked example 2: reading Gini as a risk flag

A portfolio manager tracks Gini on monthly P&L contributions across 20 positions and finds it rising from 0.35 to 0.62 over two quarters, even as total return stayed flat. That rise means the portfolio's return is increasingly being carried by a shrinking number of positions — say the top 2 positions of 20 now account for 70% of P&L rather than 35%. The total return number alone hides this; the Gini trend reveals that the portfolio has quietly become far more dependent on a few names continuing to work, a concentration risk invisible in aggregate return or volatility figures.

cumulative share of trades equality Lorenz curve (Strategy B)
The gap between the diagonal (perfect equality across trades) and the bowed Lorenz curve, expressed as a fraction of the whole triangle, is the Gini coefficient — a bigger gap means the total is carried by fewer contributors.
Strategy A (equal): G=0 Strategy B (concentrated): G≈0.32
Strategy A's Lorenz curve sits on the diagonal because every trade contributes equally; Strategy B's curve sags well below it because the year's profit leans heavily on its single best trade.

What this means in practice

Beyond income inequality, Gini and the Lorenz curve are used to measure portfolio concentration, factor-exposure concentration across names, and how evenly a strategy's edge is distributed across its trades — a strategy with high P&L concentration is one bad month for its top contributor away from a very different-looking track record, even if its aggregate Sharpe ratio looks fine. It's a complementary lens to volatility: two return streams with identical standard deviation can have very different Gini coefficients on their per-trade or per-position contributions.

The Gini coefficient distills the Lorenz curve — a plot of cumulative share of a total against cumulative share of contributors, sorted smallest to largest — into a single 0-to-1 number measuring how unevenly the total is concentrated; 0 means every contributor is equal, and values approaching 1 mean the total is dominated by a shrinking few.

Gini computed on a small sample (say, fewer than 20-30 trades or positions) is highly noisy and sensitive to exactly which observations happen to be extreme — a single unusually large trade can swing Gini substantially even though it says little about the strategy's underlying, repeatable concentration structure. Treat Gini estimated from short histories as a rough signal to investigate, not a precise risk metric, and prefer tracking its trend over time rather than a single point estimate.

Related concepts

Practice in interviews

Further reading

  • Gastwirth, The Estimation of the Lorenz Curve and Gini Index, Review of Economics and Statistics (1972)
ShareTwitterLinkedIn