Artificial intelligence (AI) stocks have been on fire in recent years, leading the S&P 500 higher in this bull market. Investors rushed to get in on these players early in their growth stories, and this move paid off: Companies such as Nvidia, Palantir Technologies, and Alphabet have seen revenue climb thanks to their AI businesses, and their stock prices have followed.
But, over the past few months, investors have thought twice before picking up AI stocks -- even as messages from the biggest players remain positive. The latest example unfolded last week, as Taiwan Semiconductor Manufacturing Co. (TSM 2.96%) and ASML (ASML 2.06%) reported earnings that beat estimates and spoke of soaring demand. Yet their shares, as well as shares of other AI players, fell.
Why are AI stocks declining? And should we buy on the dip or stay away? Let's find out.
Image source: Getty Images.
From the early AI boom to now
First, a quick look at the general AI story. In the earliest stages of this boom, AI customers focused on training models, and this resulted in growth for chip designers and manufacturers and other infrastructure players. These companies, such as TSMC, Nvidia, and ASML, generated significant earnings growth, making them early winners of the AI revolution.
Training remains an ongoing task in AI, but it's now joined by others, such as the actual application of AI to problems and the expansion and development of AI across various fields, such as telecom and robotics. And this means a broader range of companies -- and investors -- could benefit. Analysts forecast that the AI market will reach beyond $3 trillion by early next decade, suggesting this could continue to be a major growth space for quite some time.
Now, let's consider what's unfolded in recent times and this week. Though the AI story looks promising, general uncertainties such as conflict in Iran and higher prices in the U.S. have weighed on investor appetite for stocks seen as "risky" due to their reliance on a growth environment. This has prompted investors to rotate, at least partially, into "safer" companies -- such as pharmaceutical players that maintain a certain steadiness in sales due to the essential nature of their products.
On top of this, the enormous spending on the AI build-out has worried some investors -- the concern is that the revenue opportunity may disappoint. Tech giants have said they aim to spend almost $700 billion this year on AI infrastructure.

NYSE: TSM
Key Data Points
The messages of TSMC and ASML
Still, the message from AI players remains bright. As mentioned, last week, TSMC and ASML each reported earnings that surpassed estimates. TSMC spoke of strong demand from its customers -- chip designers -- as well as their customers, cloud service providers. The company even announced an additional $100 billion investment in Arizona to build out operations there. ASML, the maker of extreme ultraviolet lithography machines for the production of advanced semiconductors, lifted its annual guidance for the second time this year amid "extremely strong" order momentum.
In spite of these positive reports, TSMC, ASML, and the general AI sector saw their shares fall.
Why such a reaction? A few factors come into play. The geopolitical and economic backdrop remains uncertain as turmoil in Iran continues. And as companies continue to pour investment into AI, investors are still questioning whether such levels are necessary -- even amid high demand. This is also happening at a time when AI stocks have already climbed in the double, triple, and quadruple digits in recent years, and investors understand that stocks don't advance in one straight line upward forever. Meanwhile, overall valuations have increased, suggesting a major pullback may be ahead.
What should you, as an investor, do in such an environment? As always, investors should focus on each stock individually. While some AI stocks may be overvalued and high risk, others today may trade at bargain levels and have fantastic long-term prospects. It's important to remember that, even if AI stocks fall, this doesn't mean the AI story is over. The technology has proven its strengths, and we're in the early days of actually applying it in the real world.
What this means is now is the time to bargain-hunt for quality tech stocks with solid AI prospects, add them to a well-diversified portfolio, and hold on for the long term.



