Sub topic 6
Across sectors: avoiding hidden clusters
This chapter assumes you know how to read a stock's volatility, that correlation measures how two holdings move together, and that holding many stocks removes company-specific risk. Those ideas come from earlier chapters. Here the question is narrower. If you already own 20 or 30 companies, are they really independent bets, or are they a few bets repeated?
Why company count is not enough
Idiosyncratic risk is the risk tied to one company, such as a failed product or an accounting scandal. Adding stocks shrinks it quickly. Many of the risks that remain are shared by a group of companies. Oil prices move all oil producers. Interest rates move banks, utilities, and real estate companies. A change in chip demand moves chip designers, equipment makers, and the cloud companies that buy chips.
These shared risks sit between company-specific risk and market-wide risk. A portfolio of 25 banks has almost no single-company risk. It still has one large exposure to credit losses and interest rates. Sector diversification means spreading money so that no single group of linked businesses dominates the result.
What a sector is
A sector is a broad group of companies that sell related things or respond to the same economic forces. The most common scheme is the Global Industry Classification Standard (GICS), which has 11 sectors.
| Sector | Typical members | Usual behavior |
|---|---|---|
| Information Technology | Software, chips, hardware | Cyclical, growth-oriented |
| Communication Services | Telecom, media, internet platforms | Mixed |
| Consumer Discretionary | Retail, cars, travel | Cyclical |
| Consumer Staples | Food, household goods | Defensive |
| Health Care | Drugs, devices, insurers | Defensive |
| Utilities | Power, water, gas | Defensive, rate-sensitive |
| Financials | Banks, insurers, asset managers | Cyclical, rate-sensitive |
| Industrials | Aerospace, machinery, transport | Cyclical |
| Energy | Oil, gas, coal | Cyclical, commodity-driven |
| Materials | Chemicals, metals, mining | Cyclical, commodity-driven |
| Real Estate | Property owners and developers | Rate-sensitive |
"Cyclical" means earnings rise and fall strongly with the economy. "Defensive" means demand holds up better in downturns. These labels are tendencies. They are not guarantees.
How clusters hide
A portfolio can look varied by company name and still be concentrated. Four patterns cause most of this.
- Label gaps. Classification schemes put similar businesses under different labels. Large internet platforms sit in Communication Services, the largest online retailer sits in Consumer Discretionary, and chip makers sit in Information Technology. An investor who thinks "I own a lot of tech" may be spread over three sectors that share one growth-and-rates driver.
- Supply chains. A steel maker, a drilling-equipment supplier, and a pipeline builder may carry different labels. All of them depend on oil company spending.
- Common macro drivers. Utilities, real estate companies, and banks sit in different sectors. All three react strongly to interest rate changes, though not always in the same direction.
- Style tilts. A "dividend" fund tends to hold Financials, Energy, Utilities, and Staples. A "growth" fund tends to hold technology. Buying both a growth fund and a technology fund doubles one bet.
Your employer adds another cluster. If you work in banking and hold bank stocks, a downturn can cut your pay and your portfolio together.
Measuring sector exposure
The first step is to map each holding to a sector and add up the weights. The code below uses made-up positions.
from collections import defaultdict
holdings = [
("Bank A", 0.15, "Financials"),
("Insurer B", 0.10, "Financials"),
("Software C", 0.20, "Technology"),
("Chips D", 0.15, "Technology"),
("Cloud E", 0.10, "Technology"),
("Utility F", 0.10, "Utilities"),
("Grocer G", 0.10, "Consumer Staples"),
("Pharma H", 0.10, "Health Care"),
]
sector_weights = defaultdict(float)
for name, weight, sector in holdings:
sector_weights[sector] += weight
for sector, weight in sorted(sector_weights.items(), key=lambda kv: -kv[1]):
print(f"{sector}: {weight:.2f}")
stock_hhi = sum(w ** 2 for _, w, _ in holdings)
sector_hhi = sum(w ** 2 for w in sector_weights.values())
print("stocks:", round(stock_hhi, 3), round(1 / stock_hhi, 2))
print("sectors:", round(sector_hhi, 3), round(1 / sector_hhi, 2))
# Technology: 0.45
# Financials: 0.25
# Utilities: 0.10
# Consumer Staples: 0.10
# Health Care: 0.10
# stocks: 0.135 0.0.. see belowThe last printed lines are stocks: 0.135 7.41 and sectors: 0.295 3.39. The Herfindahl-Hirschman index (HHI) is the sum of squared weights, and its inverse is the effective number of equal-sized holdings. The portfolio behaves like about 7.4 equal stocks but only 3.4 equal sectors. Eight names look varied, yet technology alone holds 45% of the money.
Next, compare your sector weights with a benchmark such as a broad market index. A large gap means you are making a sector bet, whether you intended to or not. A common working rule is to investigate any sector that is far above its benchmark weight, for example more than five percentage points over. Treat that as a prompt to look closer. It is not a law.
What sector spreading does to volatility
The earlier chapter on company counts used one average correlation for every pair. Sectors let us split that into two numbers. Stocks in the same sector have correlation rho_in, and stocks in different sectors have a lower rho_out. For n equal-weight stocks spread evenly over k sectors, with m = n / k stocks per sector, the variance is:
sigma^2 * (1/n + (m-1)/n * rho_in + (n-m)/n * rho_out)
import math
def sector_portfolio_vol(n, k, sigma, rho_in, rho_out):
if n % k != 0:
raise ValueError("n must divide evenly into k sectors")
m = n // k
variance = sigma ** 2 * (
1 / n + (m - 1) / n * rho_in + (n - m) / n * rho_out
)
return math.sqrt(variance)
for k in (1, 5, 10, 20):
print(k, round(sector_portfolio_vol(20, k, 0.30, 0.60, 0.30), 4))
# 1 0.2362
# 5 0.1849
# 10 0.1775
# 20 0.1736All four portfolios hold 20 stocks with 30% volatility each. Moving from one sector to five cuts portfolio volatility from about 23.6% to 18.5%. Going from five sectors to twenty saves less than a further two percentage points. The first few sectors do most of the work, which matches the pattern you saw with company count.
The numbers 0.60 and 0.30 are assumptions chosen for the demonstration. Real correlations vary by sector pair and by period, so measure them from return data before relying on them.
Edge cases and judgment calls
- Equal sector weights are not neutral. Real Estate and Materials are small parts of the market. Putting 1/11 of your money in each is a large active tilt away from the market. Benchmark weights are a more defensible default.
- Fund overlap. Two funds with different names can hold the same top stocks. Add up the look-through weights across all funds, not the fund-level weights.
- Sector funds are concentrated by design. A technology ETF may hold only 60 or 70 stocks, with the top five making up a large share. Use it as a deliberate tilt, not as a core holding.
- Sector membership changes. Classification schemes get revised and companies move between sectors. A past check may be out of date.
- Cluster correlations rise in crises. Sectors that look independent in calm periods often fall together in a broad sell-off. Defensive sectors usually fall less, but they still fall.
- Underweighting can be a bet too. Holding no Energy while the benchmark holds 4% means you lose relative to the market if energy rallies. Zero is a position.
A practical routine
- List all holdings, including those inside funds, with look-through weights.
- Sum the weights by sector and compare with a broad market benchmark.
- Compute the sector HHI and the effective number of sectors next to the stock-level figures. A large gap between the two, as in the example above, points to clustering.
- For each large sector, ask what single event would hurt most of it. Check whether other holdings share that driver.
- Include any exposure outside the portfolio, such as your job, home, or business.
- Decide on purpose. Holding 30% in one sector can be reasonable if you accept the risk and understand it. The error is holding it without noticing.
Exercise
A portfolio holds five stocks with weights 0.30, 0.25, 0.20, 0.15, and 0.10. The first two are in Energy, the next two in Financials, and the last is in Health Care. Compute the stock-level HHI and effective number of stocks, then the sector-level HHI and effective number of sectors. What does the comparison show?
Show answer
Stock HHI = 0.09 + 0.0625 + 0.04 + 0.0225 + 0.01 = 0.225, so effective stocks = 1 / 0.225 ≈ 4.44. Sector weights are Energy 0.55, Financials 0.35, Health Care 0.10. Sector HHI = 0.3025 + 0.1225 + 0.01 = 0.435, so effective sectors = 1 / 0.435 ≈ 2.30. The portfolio behaves like about 4.4 equal stocks but only 2.3 equal sectors. The sector concentration is much heavier than the stock count suggests, and Energy alone is 55%.
Exercise
Using the formula in this chapter with n = 20, sigma = 0.30, rhoin = 0.60, and rhoout = 0.30, find the portfolio volatility when the 20 stocks are spread over 4 sectors of 5 stocks each. Is it above or below the 5-sector result of 0.1849?
Show answer
Here m = 5. Variance = 0.09 (1/20 + 4/20 0.60 + 15/20 0.30) = 0.09 (0.05 + 0.12 + 0.225) = 0.09 * 0.395 = 0.03555. The volatility is sqrt(0.03555) ≈ 0.1885. It is above the 5-sector result, because fewer sectors leave more same-sector pairs with the higher correlation.