If you spend any amount of time listening to Warren Buffett, you know that he doesn't like to chase overvalued stocks. If you've been following Buffett recently, you also know that he's been selling a lot more stocks than he's been buying.

In the first quarter, Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%), the holding company he's managed since 1965, closed out four positions and reduced nine others. During the same period, Berkshire Hathaway added three new positions and added shares to six.

Warren Buffett at a conference.

Image source: The Motley Fool.

Buffett was a net seller of stocks during the first three months of 2023, and investors who know the Oracle of Omaha best have a good idea about why.

Buffett's favorite stock market indicator  

During an interview with Fortune magazine in 2001, Buffett highlighted a metric that takes the combined market caps of all U.S. stocks and then divides that figure by the country's gross domestic product, or GDP. A reading above 100% suggests stocks are overvalued relative to the size of the economy.

At the time, Buffett suggested that buying stocks when his favorite indicator was below 100% gave him a better chance to come out ahead. Conversely, buying stocks when the Buffett indicator pops way above 100%, as it did before the dot-com crash of 2000, is downright dangerous.

Chart showing the U.S. total market capitalization as percent of GDP lower than the S&P 500 since 2000.

U.S. Total Market Capitalization as % of GDP data by YCharts

It took about seven years for the Buffett indicator to cross the 100% line again, but shortly thereafter the global financial crisis hammered stock markets without mercy.

More recently, the S&P 500 index fell 19% in 2022, and the Nasdaq Composite index fared much worse with a 33.1% drop. The recent collapse of U.S. markets was preceded by the Buffett indicator hitting an all-time peak just shy of 200% at the end of 2021.

What the Buffett indicator says now

After predicting three market crashes in a row, the Buffett indicator gets a lot more attention than it did 20 years ago. Unfortunately, it's also a lot harder to interpret. It's been nearly a decade since the total market capitalization of stocks listed in the U.S. was less than GDP.

Patience is important, but you'll never build a portfolio if you insist on waiting over a decade for an indicator's signal to turn from red to green. 

Right now, the market caps of U.S. listed stocks add up to 153.4% of GDP. That's a big improvement over the peak this indicator reached late last year, but it's still higher than it was before the dot-com bubble burst. 

Chart showing U.S. total market capitalization as percent of GDP still lower than the S&P 500, but taking a sharp upward turn in 2022.

US Total Market Capitalization as % of GDP data by YCharts

This could be a case of stocks being overvalued, or it could mean international operations of U.S. listed businesses are a lot stronger than they were 20 years ago. If I had to guess, I'd say it's a little of both.

It isn't just U.S. stocks that appear overvalued. The global Buffett indicator adds up the total market cap of stocks worldwide and then divides by global GDP. Unfortunately, the global Buffett indicator is in the danger zone too. It recently surged to nearly 110%, suggesting stocks everywhere have gotten a little bit ahead of themselves.

Don't panic 

All stock market indicators have a fatal flaw. They use the past to predict the future. If you've been following the stock market over the past few years, you've seen the word "unprecedented" used an awful lot to describe stock movements. 

The global Buffett indicator crossing the 100% threshold and approaching 110% isn't a reason to completely avoid putting your money to work in the stock market. That said, when markets fall, they tend to fall fast. Having buckets of cash you can use to take advantage of bargain prices that follow market meltdowns can really pay off.

When you see market signals like the Buffett indicator warning investors there may be a downturn ahead, one of the smartest things you can do is to begin building a cash reserve. Just divert a portion of the regular contributions you make to your retirement account toward your cash reserve. This way, you'll be ready to pounce on your favorite stocks when overall market sentiment sours and they begin trading at bargain prices.