Artificial intelligence (AI) stocks skyrocketed in 2024 amid excitement about this technology that could revolutionize businesses, saving time and money and leading to important discoveries. These players faced a few difficult months recently due to concerns about a potential economic slowdown. However, some of the uncertainty has passed, suggesting better days may be ahead for AI stocks.

Against this backdrop, Nvidia (NVDA -0.10%), Apple (AAPL -0.41%), and Amazon (AMZN -0.27%) are set to soar in the second half. Here's why.

An investor cheers while looking at something on a phone.

Image source: Getty Images.

1. Nvidia

President Donald Trump's plan to impose tariffs on imports weighed on technology stocks, including AI chip giant Nvidia, several weeks ago. This pushed Nvidia down nearly 30% from the start of the year through early April. Though the president initially exempted electronics products, this exemption was temporary, suggesting chips and other items would face tariffs at some point in the near future.

But Nvidia has since rebounded, thanks to optimism that tariffs won't be as steep as originally expected and as the company showed the strength of its earnings through the first quarter of the year. Nvidia's revenue surged 69% to $44 billion, demand remained strong, and customer comments indicate that their spending plans for the year remain intact. This bodes well for ongoing growth for Nvidia.

On top of this, the chip giant is making investments in U.S. manufacturing to limit any eventual tariff impact and sticks to its plan to update chips on an annual basis -- a move that should keep it ahead of rivals.

Today, Nvidia trades for only 33 times forward earnings estimates, down from about 50 times just a few months ago, and this level offers the stock plenty of room to run in the second half.

2. Apple

Among all the top tech stocks, Apple may be the one that has suffered the most amid the recent tariff turbulence. Trump, displeased that Apple has generally produced most iPhones abroad, even threatened to impose a 25% tariff on Apple's imported iPhones. Meanwhile, Apple has made efforts to diversify its manufacturing, with a plan to move much of it from China to India.

Uncertainty remains as the president wants Apple to bring iPhone production to the U.S., but doing this could result in a drastically higher price for the smartphone. All of this has hurt Apple stock, which is down about 20% since the start of the year.

I view this as a buying opportunity because I don't think the U.S. aims to destroy Apple's growth. It's possible that both parties will reach a reasonable agreement. Meanwhile, any positive news on the subject could result in Apple stock bouncing back in the coming months.

It's important to remember that Apple has built a very profitable smartphone empire with a tremendous moat, or competitive advantage, and these elements should support growth over the long term. All of this means that buying Apple now may result in gains in the coming months, but even better, set you up for a long-term win.

3. Amazon

Amazon's performance has been sluggish in recent times, with a 3% decline for the year, amid concerns that tariffs could hurt its e-commerce business and cloud computing unit, Amazon Web Services (AWS).

But as mentioned above, the worst-case tariff scenario has been avoided, and the U.S. is making progress on trade agreements. So, I wouldn't expect to see a major impact from the tariffs on Amazon's growth.

A key point is that Amazon has revamped its cost structure in recent years after facing pressure from rising inflation. This helped the company return to growth in just one year, and the efforts have positioned it well to maximize profit during future challenging times. So, these cost structure moves should help Amazon manage any potential tariff situation moving forward. And events such as Prime Day, which take place in the second half of the year, could help boost revenue.

AWS has also been seeing tremendous growth from its AI efforts, which have helped it reach a $117 billion annual revenue run rate. We're still early in the AI story, so I would expect to see ongoing growth in this area, particularly since AWS is the world's No. 1 cloud service provider.

Today, Amazon shares trade for 34 times forward earnings estimates, a reasonable level that could prompt investors to buy -- and help the stock take off in the second half.