The S&P 500 has soared in recent years amid excitement about artificial intelligence (AI) stocks. Investors piled into these exciting growth stories. In more recent times, though, companies specifically focused on AI have experienced some headwinds, from general worries about the economic environment to concerns about the level of spending on AI. This weighed on the performance of some -- and has pushed certain investors into looking for other growth opportunities.
The AI story certainly isn't over. Demand for AI products and services remains high, and the technology is just starting to be applied in the real world, signaling earnings growth potential ahead. But investors looking for another growth theme, one that may offer a bit more stability, might turn to certain consumer goods players.
Amazon (AMZN 1.75%), Walmart (WMT +1.25%), and Costco Wholesale (COST +0.80%) are excellent options. But, of the three, which is the smartest buy for the second half? Let's find out.
Image source: Getty Images.
The case for Amazon
Amazon actually is an AI stock, thanks to its Amazon Web Services (AWS) cloud computing arm -- the unit offers AI products and services to its customers, and this has resulted in a $150 billion annual revenue run rate for AWS. But the company also is an e-commerce giant, selling essentials, general merchandise, and even entertainment like books and movies to its customers.

NASDAQ: AMZN
Key Data Points
This e-commerce business has built a significant track record of earnings strength. And earnings may become even stronger in the quarters to come, thanks to Amazon's revamp of its cost structure a couple of years ago. The company cut certain jobs, shifted its U.S. fulfillment system to a regional model from a national one, and made other moves to favor profitability.
Amazon's focus on fast delivery, its broad range of products, and its global presence should keep customers coming back and earnings climbing.
The case for Costco
What I like most about Costco's business model is that you, as a customer, generate revenue for the company before you even set foot in a warehouse to shop. This is through membership fees, and these fees are high-margin for the company -- and they actually drive Costco's profit growth.

NASDAQ: COST
Key Data Points
To make the story even better, Costco's renewal rates are extremely high. In the company's biggest markets of the U.S. and Canada, renewal rates have topped 90% quarter after quarter. This is fantastic because it offers us visibility regarding earnings ahead. The membership model also is great because once shoppers pay the fee, they will want to amortize it -- so they will likely shop as much as possible at Costco.
All of this has helped this warehouse giant increase earnings over time -- and this business model sets Costco up for victory over the long run too.
The case for Walmart
Walmart's focus on low prices makes it a favorite of customers and gives it an advantage in any market environment. The company has also made progress in areas such as digital sales -- something that helps it compete with Amazon -- and membership -- something that helps it compete with Costco. In the recent quarter, worldwide e-commerce sales rose 26%, and membership fee revenue advanced 17%.

NASDAQ: WMT
Key Data Points
This retail giant also has benefited from its advertising business, offering brands the ability to advertise to gain attention for their products across Walmart's digital platforms and in stores. The business generated 37% growth in the latest quarter.
So, Walmart offers investors a certain level of revenue stability and the potential for growth, a combination that has helped the stock price soar in recent years.
Which retailer is the better buy?
Each of these players has proven itself over time and offers solid long-term prospects -- so you can't go wrong by investing in any of them. And each has seen a bit of a sell-off recently, offering investors a potential buying opportunity. But if I could only invest in one of these retail winners for the second half, I would choose Amazon. The company trades for a lower valuation than Walmart and Costco, yet it offers superior revenue growth.
AMZN PE Ratio (Forward) data by YCharts
At the same time, Amazon may benefit from the AI boom, but it also could be a winner during times of slower economic growth, thanks to its e-commerce business and focus on value for the customer. All of this makes Amazon a reasonably priced stock to buy now -- it's one that could excel during any environment in the second half of 2026 and beyond.






