For the purpose of measuring name, sector or geographic concentration, the Gini Index (also Gini coefficient) is an index defined in terms of the Lorentz curve of the exposures. More precisely, if we have n exposures summing up to a total exposure of
and the fractional exposures are defined as
Then the Gini index is defined as the area under the Lorenz curve which is geometrically reduced to
NB: Sometimes the formula appears also with the opposite sign!
Open Source implementations of the Gini index are available in