A common measure of market concentration, defined as
where s_i is firm i's market share in the industry of N firms.
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.
weights are provided, the HHI index is computed as:
where w_i is the weight given to the market share of firm i.
HHI-index for the industry
>>> 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
firm_sizesto be multidimensional.
- Check validity of input data (no negative firm sizes, etc.).
- Allow market shares to be weighted.