The Magnificent Seven -- Alphabet, Amazon (AMZN 3.20%), Apple, Meta Platforms, Microsoft, Nvidia (NVDA 3.34%), and Tesla (TSLA 0.01%) -- has continued to outperform the broader market, up 15% year to date as a group, compared to a 6% return from the Nasdaq Composite.

However, not all stocks in this group have lived up to its label recently. Shares of Nvidia and Amazon have been two of the best performers, up 76% and 20% year to date, respectively. Meanwhile, Tesla stock has fallen 37% this year, as it is struggling to grow sales of electric vehicles (EVs) amid rising interest rates.

Accelerating growth in a company's revenue and profits usually leads to superior shareholder returns, and Nvidia and Amazon still have near-term catalysts that could support higher share prices. Here's why these two Magnificent Seven stocks are still solid choices.

1. Nvidia

Companies are investing heavily to build and train computing models with artificial intelligence (AI). This is pushing the world's largest data center operators to plan significant increases in capacity over the next few years. This spells a tremendous growth opportunity for Nvidia, a leading data center supplier.

Nvidia's H100 graphics processing unit (GPU) is in short supply and sells for the price of a Tesla Model 3. But unlike with Tesla, demand for Nvidia's product is exploding. Nvidia's revenue jumped 126% last year, and management expects its next-generation chips to remain supply-constrained due to high demand.

Almost every industry is using AI in some form. That's why about $1 trillion of data-center infrastructure is transitioning to GPU-centric computing systems to handle the rigorous demands of AI processing.

Companies rely on Nvidia because of its multidecade GPU innovation. The company recently unveiled its next-generation Blackwell B200 chip. This new AI chip will reportedly cost between $30,000 to $40,000, and Amazon, Google, Meta Platforms, Microsoft, and Tesla are expected to be early adopters.

The Wall Street consensus expects Nvidia to grow earnings by 89% this year. The stock's forward price-to-earnings ratio of 35 seems on the low side for that level of growth, but it seems investors are already anticipating that Nvidia won't be able to sustain this high level of growth for long, as companies with $60 billion of annual revenue usually can't.

However given the large amount of data center infrastructure that is in the early stages of switching over to more advanced hardware, Nvidia should grow revenue and profits at double-digit rates for several more years. That should lead to market-beating returns from current share prices.

2. Amazon

Amazon reported accelerating growth from its online stores in the fourth quarter as the e-commerce market recovers. It appears the impact of high inflation on consumer spending a few years ago is starting to fade. Even Amazon's cloud services business, which generates most of the company's operating profit, experienced an uptick in growth toward the end of the year. The company entered 2024 with growing momentum across the business.

The key catalyst that could send the stock higher from here is the company's improving profitability. The e-commerce leader spent years investing billions to expand its transportation capabilities and same-day delivery across major cities. Management is now focused on reaping the rewards of these investments. Operating profit soared in Q4, up 383% year over year, and there's more to come.

CEO Andy Jassy noted in the recent annual shareholder letter that Amazon reduced its cost to serve on a per-unit basis for the first time since 2018, and it still has more work to do. Roth MKM analyst Rohit Kulkarni estimates Amazon still has over 20% efficiencies to gain in the supply chain. This should translate to even higher profits. The current Wall Street consensus has Amazon's earnings per share more than doubling over the next two years.

Despite the stock's gains so far this year, it still trades at a price-to-sales ratio that is in line with its previous 10-year average -- a period when margins from online sales were lower due to the company's heavy focus on expanding its e-commerce capabilities. If Amazon continues to increase its profit margin over the next decade, it might earn an even higher valuation and fuel market-beating returns for investors.

The stock could pull back if there's another market dip, but looking ahead a few years, I believe Amazon offers attractive upside potential.