Skip to content

Herfindahl–Hirschman Index

API

function
hhi_index(firm_sizes, weights=None)

Herfindahl–Hirschman Index

A common measure of market concentration, defined as

H = \sum_{i=1}^{N} s_i^2

where s_i is firm i's market share in the industry of N firms.

Parameters
  • firm_sizes (np.ndarray) (n_firms,) array of firm sizes suchs as sales, used to compute market shares
  • weights (np.ndarray) (n_firms,) array of the weights given to each firm's market share. Defaults to equal weights.

Note

If weights are provided, the HHI index is computed as:

H = \sum_{i=1}^{N} s_i^2 \times w_i

where w_i is the weight given to the market share of firm i.

Returns (float)

HHI-index for the industry

Examples
>>> import numpy as np
>>> from frds.measures import hhi_index

7 firms with equal sales

>>> firm_sales = np.array([1,1,1,1,1,1,1])
>>> hhi_index(firm_sales)
0.14285714285714285

6 firms, of which 1 has much larger sales

>>> firm_sales = np.array([100,1,1,1,1,1])
>>> hhi_index(firm_sales)
0.9074829931972791

References
Todo
  • Allow firm_sizes to be multidimensional.
  • Check validity of input data (no negative firm sizes, etc.).
  • Allow market shares to be weighted.

Source code | Bug report | Sponsor me


Last update: July 26, 2021
Back to top