Warren Buffett's Berkshire Hathaway had $111 billion of cash on its balance sheet at the end of last quarter, the most in the company's history.

This is an ominous sign for the health of the market and suggests that Berkshire Hathaway views it as overvalued and overly expensive.

As merger and acquisition (M&A) activity has roared, Warren Buffett and his investing colleagues at Berkshire Hathaway have stayed on the sidelines.

That means they missed out on an M&A bonanza that saw a record-breaking $2 trillion in deals through mid-May. But it also means Berkshire Hathaway has set a record of its own: It now has the biggest cash balance in the firm's storied history.

While that can be construed as good news for Buffett & Co. — since they have a veritable war chest of capital ready for deployment — it carries far starker implications for the overall market.

That's because Berkshire Hathaway's reluctance to buy anything can be viewed as a signal that just about everything is too expensive. And considering Buffett is one of the most successful investors in history, his market behavior should watched closely.

Berkshire Hathaway's cash balance has hit record levels as stock prices have done the same. AJ Bell

That said, it's not exactly breaking news that Buffett thinks few bargains exist. He said as much in his annual letter back in February, saying the lack of attractive pricing "proved a barrier to virtually all deals we reviewed in 2017."

More notable is that Buffett has stood pat since then as stocks have continued their grind higher. Valuations have only gotten more stretched over that period, suggesting that an already tenuous situation has worsened.

Russ Mould, an investment director at AJ Bell, has taken notice. He's wary of the speculative deal fervor he sees accompanying record stock prices.

"M&A tends to peak when animal spirits are running high and often when executives feel their own shares are expensive enough to make them a valuable acquisition currency," Mould wrote in a client note. "Warren Buffett is still having difficulty in finding value in US — and perhaps global — stocks."

Mould points out — and indicates in the chart above — that Berkshire Hathaway's cash balance has been an effective proxy for market levels over history. As you can see, Buffett held comparatively high levels of cash in the periods preceding the two most recent market crashes, in 1999 and 2007.

So the question for investors now becomes whether to follow Buffett to the sideline or to stay invested in a market that is, by many measures, overextended. After all, the longer they wait, the higher the likelihood they'll be left holding the bag when things go south.

Now read: