The US stock market is unusually top heavy. Just two stocks, Apple Inc. and Microsoft Corp., account for nearly 15% of the S&P 500 Index. Add smaller but still formidable giants Amazon.com Inc., Alphabet Inc. and Nvidia Corp., and that number climbs to 24%. That’s the highest concentration in the index’s top five holdings since at least 1990.

One reason investors buy the broad market is to diversify the risk of owning too few stocks. But with five of them dominating the S&P 500, some investors may be wondering if buying a broad market index is too dicey. The short answer is that shifts in the index’s concentration don’t necessarily make it any more or less risky. In fact, it’s more likely the opposite — that those changes help stabilize the risk of investing over time.

The longer answer lies in the way the S&P 500 is constructed. The index assigns weights to its constituents based on their market value so that more valuable companies receive a higher allocation than less valuable ones. That approach to weighting keeps a lid on risk because companies with larger market values tend to be safer than smaller ones — and as companies’ market value changes over time, their weighting in the S&P 500 goes up or down, leaving the overall risk of the index roughly unchanged.

In 1990, for example, International Business Machines Corp. was the leading technology company in the world and Apple was an aspiring competitor, which is why IBM held the top spot in the S&P 500 and Apple ranked 107. Now the tables have turned, and so have the two companies’ ranks in the S&P 500, with Apple perched at the top and IBM demoted to 61, a risk adjustment that required no intervention from investors in the S&P 500.    

One way to see the relationship between risk and market value is to look at the interplay between market value and profits. The market famously prizes earnings above all else, not just because investing is a money-making endeavor but also because companies that make more money are generally sturdier businesses. Apple made $94 billion in net income during the past 12 months, while Fidelity National Information Services Inc., whose weight in the S&P 500 is a rounding error, lost more than $16 billion. It’s not hard to tell which company is the safer bet.  

The data show that market value and earnings power are closely, although not perfectly, related. The trailing 12-month net income of S&P 500 companies is strongly correlated with their market value (0.82) and weighting in the index (0.81). In other words, more often than not, the more money a company makes, the higher its market value and the larger its weighting in the S&P 500. (A correlation of 1 implies that two variables move perfectly in the same direction, whereas a correlation of negative 1 implies that two variables move perfectly in the opposite direction.)

Not surprisingly, then, the S&P 500’s concentration would be roughly the same whether the index weighted companies by market value or net income, although the order of companies might differ. For instance, the top five stocks weighted by net income would account for 21% of the index, compared with 24% by market value; the top 50 would account for 57% of the index, the same percentage as by market value; and the top 100 by net income would account for 74%, modestly more than 71% by market value.  

The reason the S&P 500 is so concentrated is simply that a few companies are making a lot more money than everyone else. In 1990, the first year for which numbers are available, the top five companies in the S&P 500 accounted for 12.3% of the index and contributed 12.6% of total profits. Today’s top five contribute more than that to total profits, which is also why they occupy more of the index.

The S&P 500 would almost certainly be riskier if it didn’t favor more valuable companies. The S&P 500 Equal Weight Index, which weights S&P 500 companies equally rather than by market value, has been 10% more volatile than the traditional S&P 500, as measured by annualized standard deviation since 1990. The equal weight index has also been more volatile than the traditional S&P 500 90% of the time over rolling three-year periods, with all the exceptions clustered around the peak and subsequent crash of the dot-com bubble.

With renewed frenzy around technology, most recently artificial intelligence, one might conclude that the equal weight index is indeed safer. But the problem with the dot-com era was that stock valuations were stretched beyond reason, not that the market was too concentrated. The top five stocks in the S&P 500 at the peak of dot-com mania in 1999 accounted for about 16% of the index, which is not much higher than the historical average.   

That’s not to say the S&P 500 is risk free. On the contrary, the index is regularly in the path of crises and manias that temporarily shave off a quarter to half of its value. And concentration aside, history shows that some or all of today’s big five are unlikely to remain there in a decade or two. Through it all, however, the S&P 500 has returned about 10% a year over the long term, making it one of the most lucrative investments around.

Think of the S&P 500 and other indexes weighted by market value as constantly rejiggering their lineup to balance risk — and be thankful for one less thing investors have to worry about.

Nir Kaissar is a Bloomberg Opinion columnist covering markets. He is the founder of Unison Advisors, an asset management firm.