Over the past couple of months, one particular element has guided stock market movement, and that's President Trump's import tariff plan. Trump set out a broad framework early last month, including double-digit tariffs on countries worldwide and a tariff on China that reached 145%, and that sent stocks spiraling lower. The concern was high tariff levels would weigh on the economy and even lead to a recession. That wouldn't be good news for corporate earnings or share prices.
But, when Trump halted the plan for 90 days to allow for negotiations with countries, indexes rebounded. And just this week as the U.S. and China reached an initial deal that greatly lowered tariff levels, the three major indexes soared. The S&P 500 even moved into positive territory for the year after earlier falling as much as 15%.
Among the biggest gainers in the market were tech stocks. Though Trump has exempted electronics for now, he indicated duties specifically for these products were on the way -- and tech companies rely heavily on manufacturing abroad. So, a satisfactory trade deal between the U.S. and China suggests any tariffs on electronics also would be manageable. Against this backdrop, let's consider which of the following market leaders -- Amazon (AMZN 0.18%) or Nivida (NVDA 0.28%) -- make the better buy today.

Image source: Getty Images.
The case for Amazon
You may know Amazon well as a seller of everything from groceries and essentials to mass merchandise. And since many of those items are imported from China or other countries, the company clearly is exposed to the tariff risk. On top of this, Amazon Web Services (AWS), the cloud computing unit, sells products -- such as artificial intelligence (AI) chips -- that are produced abroad to U.S. customers. That, too, represents exposure to tariffs.
This means agreements with lower-than-expected tariffs represent good news for Amazon. Of course, any tariff at all will add to costs or could push prices higher, but a well-established powerhouse like Amazon has what it takes to handle the challenge. The company said in its recent earnings call that it's already taken steps to manage the situation -- for example, buying some inventory early to lock in lower prices. Meanwhile, it's important to keep in mind that third-party sellers on Amazon may have different strategies -- some may pass costs on to customers while others may not. So, with the enormous selection of products on Amazon, even in a tariff environment, shoppers still should be able to find bargains.
Now, though, with the tariff situation looking brighter, there's even more reason to be optimistic about ongoing growth from Amazon, a company that's delivered an impressive earnings track record over the years. And as Amazon continues to win in AI -- its AI offerings helped AWS deliver a $117 billion annual revenue run rate in the recent quarter -- growth could take off.
The case for Nvidia
Nvidia has become the name that's practically synonymous with AI. The company is the world's top seller of AI chips and has developed an entire ecosystem of related products and services -- making it the "go to" destination for any potential customer looking to develop an AI platform. All of this has helped Nvidia generate double- and triple-digit quarterly revenue growth, with that revenue reaching record levels.
This momentum led Nvidia shares higher in recent years -- but tariff news weighed heavily on them over the past couple of months. Investors worried about an eventual tariff on electronics imports hurting Nvidia's revenue growth since the company relies on manufacturing in Taiwan.
Immediately, Nvidia took action, setting out a plan to invest in U.S. manufacturing and eventually make AI supercomputers in the U.S. for the first time. Mass production is expected to ramp up at two facilities over the coming 12 to 15 months. So, like Amazon, Nvidia has been taking action to control the level of risk presented by tariffs.
But, of course, the idea that tariffs in general may be much lower than originally expected is fantastic news for the company. It means Nvidia may not have to rush to shift production to the U.S. and instead can pace its investment -- without being crushed by massive tariff levels in the meantime.
So, like Amazon, Nvidia is positioned to benefit from this new tariff climate, making it a solid stock to own right now.
Should you buy Amazon or Nvidia?
Which of these tech giants makes the better buy following the U.S. and China tariff talks? Let's consider valuation before answering the question. Right now, both of these stocks are trading at very reasonable levels, much lower in relation to forward earnings estimates from earlier in the year.
AMZN PE Ratio (Forward) data by YCharts
But Nvidia looks particularly interesting from this valuation perspective, and I would even consider it cheap at today's level.
As mentioned, high tariff levels represented a risk for both Amazon and Nvidia -- and today, the worst-case scenario has disappeared, replaced by a situation that should be much more manageable. That makes both of these stocks a great buy at the moment, but considering valuation, Nvidia gets extra points in my book -- so if you can only choose one of these top AI stocks, Nvidia makes the better buy right now.