Sub topic 10
Measuring concentration with HHI and effective holdings
This chapter assumes you know what stocks, funds, and ETFs are, and that you can compute a portfolio weight as a percentage. You also need a working picture of systematic and idiosyncratic risk, and of why a large single position adds idiosyncratic risk. No statistics beyond sums and squares is required.
Counting holdings is a poor way to judge diversification. A portfolio of 20 stocks where one stock is 60% of the money is less diversified than a portfolio of 8 stocks of equal size. This chapter gives you two linked numbers that capture this: the Herfindahl-Hirschman index (HHI) and the effective number of holdings.
Why a simple count fails
The number of positions says nothing about how the money is split between them. Two portfolios can both hold ten stocks and have very different exposure to any one company.
Simple alternatives each have gaps:
- Number of holdings ignores weights entirely.
- Largest position captures only the biggest weight and ignores how the rest is distributed.
- Top-N share (for example, the top 10 holdings as a percentage of the fund) is useful and widely reported, but it depends on the N you pick and ignores the tail.
HHI uses every weight in a single number, and it penalizes large weights more than small ones.
The HHI formula
Write the weights as fractions that sum to 1: w₁, w₂, …, wₙ. The index is the sum of the squared weights:
HHI = w₁² + w₂² + … + wₙ²
Squaring is the important step. A 40% position contributes 0.16, while four 10% positions together contribute only 0.04, even though both groups hold 40% of the money. Large positions dominate the total.
The index has fixed bounds:
- Minimum: 1/N, reached when all N holdings have equal weight.
- Maximum: 1, reached when everything is in one holding.
Some fields, notably antitrust analysis, state weights in percent, so HHI runs up to 10,000 instead of 1. A fraction-based HHI of 0.30 is the same as 3,000 on that scale. Pick one convention and state it, because mixing the two gives nonsense.
Effective number of holdings
HHI is hard to read on its own. The inverse, 1/HHI, converts it into a count: the number of equally weighted holdings that would give the same HHI. This is the effective number of holdings, written N_eff.
For weights of 40%, 30%, 20%, and 10%:
- HHI = 0.16 + 0.09 + 0.04 + 0.01 = 0.30
- N_eff = 1 / 0.30 ≈ 3.33
The four positions behave like about 3.3 equal ones. The gap between 4 and 3.33 is the cost of uneven weighting.
def hhi(weights):
return sum(w ** 2 for w in weights)
def effective_holdings(weights):
return 1 / hhi(weights)
weights = [0.40, 0.30, 0.20, 0.10]
h = hhi(weights)
print(round(h, 2), round(effective_holdings(weights), 2))
# 0.3 3.33Reading the numbers
| Weights | HHI | N_eff | Reading |
|---|---|---|---|
| 25%, 25%, 25%, 25% | 0.25 | 4.00 | Even split, no loss |
| 40%, 30%, 20%, 10% | 0.30 | 3.33 | Mild tilt toward the largest |
| 97%, 1%, 1%, 1% | 0.9412 | 1.06 | Four names, one real position |
The last row shows why counts mislead: four holdings, effectively one.
Normalized HHI
N_eff depends on how many holdings exist, so comparing a 4-stock portfolio to a 500-stock index is awkward. A normalized HHI rescales to a 0-to-1 range regardless of N:
normalized = (HHI − 1/N) / (1 − 1/N)
A value of 0 means perfectly equal weights, and 1 means a single holding holds everything. For the 40/30/20/10 example, (0.30 − 0.25) / 0.75 ≈ 0.067. This answers a narrower question, "how uneven are the weights?", and says nothing about how many holdings there are. Use N_eff for diversification level and normalized HHI for unevenness.
Worked example: a concentrated single-stock portfolio
Suppose you hold 20 stocks. One is 30% of the portfolio, and the other 19 share the remaining 70% equally, about 3.68% each.
- Big position: 0.30² = 0.09
- Other 19: 19 × 0.0368² ≈ 0.0258
- HHI ≈ 0.1158, so N_eff ≈ 8.6
Twenty names behave like fewer than nine equal ones. Most of the loss comes from the single 30% stake. If you trim that stake to 10% and spread the rest evenly, N_eff rises to about 18.
Applying it to sectors and countries
The same formula works at any level of grouping. Instead of company weights, feed it sector weights or country weights. This is how you test for the hidden clusters discussed in earlier chapters. A portfolio can look spread out by company yet hold most of its value in one sector.
def hhi(weights):
return sum(w ** 2 for w in weights)
# Hypothetical weights across 11 sectors
sector_weights = [0.30, 0.15, 0.12, 0.10, 0.09, 0.07,
0.06, 0.04, 0.03, 0.02, 0.02]
assert abs(sum(sector_weights) - 1) < 1e-9
h = hhi(sector_weights)
print(round(h, 4), round(1 / h, 2))
# 0.1568 6.38Eleven sectors act like about 6.4 equal ones, because the largest sector holds 30%. Whether that matters depends on the benchmark: a market whose index is itself tilted toward one sector will show the same tilt, and that is a property of the market, not an error in your portfolio.
Index funds and concentration
A market-cap-weighted index gives each company a weight in proportion to its market value, so a few giant companies can dominate. The index's holdings count is large, but its N_eff can be far smaller.
Consider a hypothetical 500-stock index. Its five largest stocks weigh 7%, 6%, 5%, 4%, and 3%, which is 25% in total, and the other 495 share the remaining 75% equally.
def hhi(weights):
return sum(w ** 2 for w in weights)
top5 = [0.07, 0.06, 0.05, 0.04, 0.03]
rest = [0.75 / 495] * 495
weights = top5 + rest
h = hhi(weights)
print(len(weights), round(h, 4), round(1 / h, 1))
# 500 0.0146 68.3Five hundred holdings give an effective number of about 68. The index is still broadly diversified, since 68 equal-weight stocks is a lot, but it is far from the 500 that the label suggests. If the top holdings grow relative to the rest, N_eff falls without any change in the holdings count.
Look-through: measuring across funds
Owning several funds does not guarantee you own several things. Funds can hold the same companies, so you must combine their holdings before measuring. This is called look-through analysis.
from collections import defaultdict
def hhi(weights):
return sum(w ** 2 for w in weights)
fund_a = {"AAA": 0.50, "BBB": 0.30, "CCC": 0.20}
fund_b = {"AAA": 0.40, "DDD": 0.35, "EEE": 0.25}
allocation = {"A": 0.60, "B": 0.40}
funds = {"A": fund_a, "B": fund_b}
combined = defaultdict(float)
for name, share in allocation.items():
for stock, weight in funds[name].items():
combined[stock] += share * weight
h = hhi(combined.values())
print(dict(sorted(combined.items())))
print(round(h, 3), round(1 / h, 2))
# {'AAA': 0.46, 'BBB': 0.18, 'CCC': 0.12, 'DDD': 0.14, 'EEE': 0.1}
# 0.288 3.47The portfolio holds two funds and five distinct stocks, and acts like about 3.5 equal positions. Stock AAA appears in both funds and ends up as 46% of the total. Measuring only at the fund level would have hidden this.
What HHI and N_eff do not tell you
Both measures capture weight concentration only. They have blind spots:
- Correlation is ignored. Ten equal-weight stocks that all move together give Neff = 10 but little real risk reduction. Chapter-level ideas about correlation still apply, and Neff is an upper bound on diversification, not a measure of it.
- Volatility is ignored. A 10% position in a highly volatile stock adds more risk than a 10% position in a stable one. Risk-based versions apply the same formula to each holding's share of total portfolio risk instead of its share of money.
- Grouping choices matter. Sector and country results change with the classification used. Companies with operations in many countries may be assigned to just one.
- No universal threshold exists. There is no official line between acceptable and excessive concentration. Compare against a benchmark index you are measuring against, and track the direction over time.
Practical use
- List your holdings with weights, using look-through for any funds.
- Compute N_eff by company, then repeat by sector and by country.
- Compare each result with a broad benchmark computed the same way.
- Flag the largest individual contributors to HHI (the biggest weights) and decide whether each is a deliberate bet.
- Recompute after rebalancing or major price moves.
Exercise
A portfolio holds four stocks with weights 50%, 25%, 15%, and 10%. Compute the HHI and the effective number of holdings.
Show answer
HHI = 0.50² + 0.25² + 0.15² + 0.10² = 0.25 + 0.0625 + 0.0225 + 0.01 = 0.345. N_eff = 1 / 0.345 ≈ 2.90. The four stocks behave like about 2.9 equal-weight holdings.
Exercise
Twenty stocks are held in equal weights. What are the HHI and Neff? Then one stock is raised to 30% and the other 19 share the remaining 70% equally. Does Neff rise or fall, and roughly to what value?
Show answer
With equal weights, HHI = 20 × 0.05² = 0.05, so Neff = 20. After the change, HHI ≈ 0.09 + 19 × (0.7/19)² ≈ 0.1158, so Neff ≈ 8.6. It falls sharply, from 20 to about 8.6, even though the holdings count is unchanged.
Exercise
Why can a portfolio with a high N_eff still be poorly diversified?
Show answer
Neff uses only weights. If the holdings are highly correlated, for example many stocks in the same sector, they move together and give little risk reduction. Also, a high Neff can include volatile holdings that dominate the portfolio's risk.