On paper, Warren Buffett looks like he's getting nervous about the stock market. The Oracle of Omaha has long warned against timing the market. But facts are facts. This quarter, Buffett's holding company, Berkshire Hathaway (BRK.A +0.97%)(BRK.B +1.02%), revealed it's holding more cash than it ever has in its entire history -- a sum of more than $380 billion. That's roughly a third of Berkshire's entire market cap.
Clearly, Buffett is finding it difficult to uncover attractive deals. In fact, he has been liquidating one of his top positions (that would be Apple). It certainly looks like Buffett is growing bearish, at least relative to the past. There are two likely reasons for this. The first deals with simple math. The second is something the stock market has done during three events since 2020: the dot-com crash, the financial crisis of 2008, and the pandemic flash crash of 2020.

NYSE: BRK.B
Key Data Points
Warren Buffett is on the wrong side of this math equation
Part of why Berkshire has built up such a huge cash hoard is something beyond its direct control: its behemoth size. In the past, Buffett has bragged that he could make 50% annual returns with a smaller portfolio. "Anyone who says that size does not hurt investment performance is selling," Buffett once said. "The highest rates of return I've ever achieved were in the 1950s. I killed the Dow. You ought to see the numbers."
The math here is simple: it's easier to double a portfolio's size when its beginning value is just a few million versus hundreds of billions. With a smaller portfolio, investors can target opportunities that larger pools of money simply can't chase. Just look at Berkshire's current portfolio -- it's dominated by some of the largest businesses in the world. Buffett, of course, likes these companies as investments. But they're also the only companies that would even move the needle for Berkshire's giant portfolio. In a way, Buffett's investing universe is minuscule, limited only to enormous businesses with a huge float, or shares available for public trading.
This explains some of the reasons Berkshire has a rising cash position. But it doesn't explain it all. Buffett could still deploy a ton of cash into existing positions, especially large companies like Amazon. In order for Berkshire to have amassed so much cash, there must be another reason. The statistic discussed below is likely to blame.
Image source: The Motley Fool.
This stock market metric is sounding the alarms
The S&P 500 has only had a price-to-earnings ratio above 30 four times since the start of this century. Unfortunately, three of the previous occurrences happened during major market routs, such as when the dot-com bubble burst and when stock markets around the world collapsed briefly in 2020. This summer, the S&P 500 crossed this threshold for the fourth time since 2020. And while no one knows if another bear market is on the way, it's clearly getting hard to find market values.
Right now, the S&P 500 trades at nearly 32 times earnings. In 2011, for comparison, this popular stock market index traded at just 14 times earnings. Since 1870, both the mean and median valuations have been between 15 and 16. Rising corporate profit margins complicate some of that long-term comparison. But even just using data generated since 1990, the average valuation of the S&P 500 has hovered between 20 and 25 times earnings.
Is a stock market crash on the way? Buffett has long warned against using broad market indicators for market timing. But pricey markets mean pricey stocks, making it harder to find bargains, a reality that explains Buffett's rising cash pile. So while no one knows where markets are headed next, one thing is for sure: even the best investors in the world are having trouble finding deals.