AI stocks now make up a large percentage of both the S&P 500 and Nasdaq-100.
Following two pieces of advice from Warren Buffett could prepare investors if the market eventually crashes.
Artificial intelligence (AI) stocks have helped lead the market higher over the past few years. While that has helped power the S&P 500 (SNPINDEX: ^GSPC) and Nasdaq Composite (NASDAQINDEX: ^IXIC) to new all-time highs, it has also left both indexes very top-heavy with leading AI stocks.
For example, eight of the S&P 500's largest holdings are tech stocks that make up more than 35% of its holdings. Most of these are top semiconductor companies and hyperscalers (owners of large data centers). It's even more dramatic for the popular Nasdaq-100, whose 10 largest holdings are tech stocks and account for nearly half its portfolio.
Missed Nvidia in 2009? This Rare Signal Is Flashing Again. In 2009, a "Double Down" signal flashed for a little-known chipmaker called Nvidia. For the first time in years, that same "Total Conviction" signal is flashing for a company 1/100th the size of Nvidia. Continue »
Former Berkshire Hathaway CEO Warren Buffett. Image source: The Motley Fool.
At the same time, most of these stocks' fortunes are very tied to each other. Hyperscalers are spending a tremendous amount of money building out AI infrastructure, which, in turn, is driving growth at semiconductor stocks. If hyperscalers don't see a strong return on their AI investments and this spending stops, then these stocks could go down in unison, dragging down the major indexes with them.
One of investing stalwart Warren Buffett's favorite measures of whether stocks are overvalued is to take the total value of the U.S. stock market and divide it by gross domestic product (GDP). The former CEO of Berkshire Hathaway has said a range of between 75% and 90% is reasonable, while stocks start to look overvalued when it rises above 120%. This measurement, sometimes called the Buffett indicator, is currently over 235%, signaling a very expensive market.
Other popular metrics, like the cyclically adjusted price-to-earnings ratio, or CAPE ratio, also point to a frothy market. This metric smooths out earnings by adjusting for economic cycles, seasonality, and inflation over the past 10 years. Historically, this index's long-term average is around 17.4. It rose above 42 in August and is at its highest level since before the dot-com crash in 2000.
Now, whether the market has formed an AI bubble and whether the stock market will crash anytime soon is uncertain. However, with these indicators pointing to a frothy market, it is best to be prepared. Let's look at two things Buffett would recommend.
One of Buffett's most famous pieces of advice is to "Be fearful when others are greedy, and greedy when others are fearful." Before he stepped down as CEO at Berkshire Hathaway at the start of this year, he had been following his own advice, not chasing stocks and instead letting his cash holdings climb.
One of the best things an investor can do before a potential market crash is to have some cash on the sidelines. This does not mean sell all your stocks and sit in cash. That would be a mistake, as no investor or market indicator can 100% predict when a market crash will occur.
However, if the market has a major pullback and you have no cash to invest, that also doesn't help. As such, if you want to follow Buffett, don't be fully invested and have some cash ready to pounce.
Another important lesson investors can take from Buffett is which types of stocks to buy during a big market pullback. When the dot-com bubble burst, there were some great stocks to buy, but also many that never made it.
In an article in Fortune magazine, Buffett described the type of stocks investors should be looking for, saying, "The key to investing is not assessing how much an industry is going to affect society, or how much it will grow, but rather determining the competitive advantage of any given company and, above all, the durability of that advantage."
In other words, not all AI stocks will be long-term winners. Look for companies with wide moats that give them a long-term competitive advantage. Buffett seemed to leave one hint on an AI stock to buy if the market crashes, with his last big bet being on Alphabet (NASDAQ: GOOGL) (NASDAQ: GOOG), which is the most complete AI stock with both world-class chips and AI models to go along with a strong distribution and ad network moat.
When our analyst team has a stock tip, it can pay to listen. After all, Stock Advisor’s total average return is 978%* — a market-crushing outperformance compared to 213% for the S&P 500.
They just revealed what they believe are the 10 best stocks for investors to buy right now, available when you join Stock Advisor.
See the stocks »
*Stock Advisor returns as of September 2, 2026.
Geoffrey Seiler has positions in Alphabet. The Motley Fool has positions in and recommends Alphabet and Berkshire Hathaway. The Motley Fool has a disclosure policy.