A US stock rally supercharged by excitement over artificial intelligence is drawing comparisons with the dotcom bubble two decades ago, raising the question of whether prices have again been inflated by optimism over a revolutionary technology.

AI fever, coupled with a resilient economy and stronger earnings, has lifted the S&P 500 index (.SPX) to fresh records this year following a run of more than 50 per cent from its October 2022 low. The tech-heavy Nasdaq Composite index (.IXIC) has gained over 70 per cent since the end of 2022.

While various metrics show stock valuations and investor exuberance have yet to hit peaks reached at the turn of the century, the similarities are easy to spot. A small group of massive tech stocks including AI chipmaker Nvidia (NVDA.O) symbolize today’s market, recalling the “Four Horsemen” of the late 1990s: Cisco, Dell, Microsoft and Intel.

The dizzying run in shares of Nvidia, which gained nearly 4,300 per cent in a recent five-year period, stirred memories of how network equipment maker Cisco (CSCO.O) surged about 4,500 per cent over five years leading up to its peak in 2000, according to a BTIG comparison of the two stocks.

Valuations have grown as well, though many tech champions appear to be in far better financial shape than their dot-com counterparts of the late 1990s and early 2000s. Other measures, such as investor bullishness, have yet to reach the frothy heights of the turn of the century.

The concern is that the AI-driven surge will end the same way as the dot-com boom – with an epic crash. After nearly quadrupling in just over three years, the Nasdaq Composite plunged almost 80 per cent from its March 2000 peak to October 2002. The S&P 500, which doubled in a similar timeframe, collapsed nearly 50 per cent in that period.

While several internet stocks such as Amazon (AMZN.O) survived and eventually thrived, others never recovered.

“No one exactly knows what will happen with artificial intelligence,” said Sameer Samana, senior global market strategist at the Wells Fargo Investment Institute, noting the same uncertainty about the eventual long-term winners.

Echoing the dot-com boom, the information technology sector (.SPLRCT) has swelled to 32 per cent of the S&P 500’s total market value, the largest percentage since 2000 when it rose to nearly 35 per cent, according to LSEG Datastream. Just three companies, Microsoft (MSFT.O), Apple (AAPL.O) and Nvidia, represent over 20 per cent of the index.

However, tech stocks are more modestly valued now than at the peak of the dot-com bubble, trading at 31 times forward earnings, compared to as high as 48 times in 2000, according to Datastream.

The difference is clear in the valuations of Nvidia and Cisco, a key provider of products supporting internet infrastructure, whose stock has yet to rescale its peaks of the dotcom boom.

While both stocks have soared, Nvidia trades at 40 times forward earnings estimates, compared to Cisco’s 131 level reached in March 2000, according to Datastream.

Capital Economics analysts also note that the current rally is being fueled more by solid earnings outlooks rather than growing valuations, a sign that fundamentals are more of a driver this time.

Forward earnings per share in sectors containing today’s market leaders – tech, communication services and consumer discretionary – have been growing faster since early 2023 than the rest of the market, a Capital Economics analysis showed. By contrast, expected earnings in the sectors grew at a similar pace to the rest of the market in the late 1990s and early 2000s, while their valuations soared faster than for other stocks.

More broadly, the S&P 500’s price-to-earnings ratio of 21 is well above its historical average but below the roughly 25 level reached in 1999 and 2000, according to Datastream.

“Our base case is that this tech bubble won’t burst until the valuation of the overall market has reached the sort of level that it did in 2000,” Capital Economics analysts said in a note.

Dotcom investors were much more euphoric by some measures. Bullish sentiment in the widely followed American Association of Individual Investors survey, often seen as a worrisome indicator at high levels, reached 75 per cent in January 2000, just months before the market peaked. It recently stood at 44.5 per cent, compared to its historical average of 37.5 per cent.

While an AI bubble is not a foregone conclusion, many investors are wary that metrics could become even more stretched in coming months if US growth remains robust and tech stocks continue charging higher.

“There are a lot of similarities,” said Mike O’Rourke, chief market strategist at JonesTrading. “When you have a bubble, usually it’s rooted in … some true, positive, fundamental development that is behind it and that creates that enthusiasm for people to pay any price for things.”