The S&P 500 advanced 24% last year. Those gains were driven in large part by stronger-than-expected economic expansion and excitement about artificial intelligence. An analyst at JPMorgan Chase (JPM 0.06%), a leader in investment banking revenue, believes those tailwinds will carry some stocks higher this year. Specifically, investors will likely focus on solid growth, proven profitability, and reasonable valuations, given the lingering risk of recession.

Building on that framework, JPMorgan selected Amazon (AMZN 3.43%) and Alphabet (GOOGL 10.22%) (GOOG 9.96%) as top picks in 2024. The investment bank stands behind those recommendations. It had nearly $40 billion invested between Amazon and Alphabet as of September, representing 4.4% of its portfolio.

Here's what investors should know.

1. Amazon

JPMorgan analyst Doug Anmuth highlighted revenue acceleration (across retail and cloud) and margin expansion as key reasons why Amazon made its top-picks list. The catalysts behind those predictions are resilient consumer spending, logistics cost optimization, and growing demand for cloud artificial intelligence (AI) services.

Amazon has a strong presence in e-commerce. It operates the most popular online marketplace in the world as measured by monthly visitors and the largest online marketplace across North America and Western Europe as measured by sales. Amazon has cemented its leadership in retail with logistics infrastructure that not only controls costs but also supports fulfillment services for merchants and timely delivery for consumers.

Amazon recently switched to a regional fulfillment model to further optimize costs. To quote CEO Andy Jassy, "Shorter travel distances and fewer touches mean lower cost to serve. But perhaps most importantly, shorter distances and fewer touches mean that customers are getting their shipments faster." He also said Amazon was on track to achieve its fastest delivery speeds for Prime customers in history.

Beyond retail, Amazon Web Services (AWS) is the market leader in cloud infrastructure and platform services (CIPS), and consultancy Gartner recently recognized the company as a leader in cloud AI developer services. AWS hopes to monetize that expertise with several new products, including its generative AI application development service Bedrock, AI-enabled coding assistant CodeWhisperer, and AI-enabled business assistant Amazon Q.

Going forward, the Wall Street consensus calls for Amazon to grow sales at 11% annually over the next five years. That estimate makes its current valuation of about 3 times sales appear reasonable. Now is a good time for long-term investors to buy a few shares of this growth stock.

2. Alphabet

Doug Anmuth at JPMorgan also highlighted revenue acceleration and margin expansion as key reasons why Alphabet made its top-picks list. The catalysts behind those predictions are a rebound in online advertising, ongoing efforts to control expenses, and AI innovation across advertising and cloud computing.

Alphabet leads the digital advertising market with an estimated share of 39%, according to Statista. That dominance is a product of its unparalleled ability to engage internet users and source data through popular web platforms like Google Search, YouTube, Android, and Chrome. Additionally, Alphabet is regarded as a leader in AI research, and the company is bringing that technical expertise to bear on its advertising ecosystem.

Search Generative Experience (SGE) is an ongoing experiment that infuses Google Search with generative AI to improve the user experience. For instance, SGE will show an AI-powered overview of the search topic and allow users to ask follow-up questions. Additionally, Alphabet is using generative AI to help media buyers create campaigns and adapt advertising content to the context of search queries.

To quote Chief Business Officer Philipp Schindler, "Advances in everything from foundational research models to [large language models] to generative AI are improving our ability to deliver better performance and profitability for advertisers, and more helpful, delightful experiences for users."

Meanwhile, Alphabet widened its operating margin by three percentage points over the past year, yet the company continued to invest in cloud product development and go-to-market capabilities. Those efforts are paying off. While Google Cloud Platform ranks a distant third to AWS and Microsoft Azure, its CIPS market share increased two points to 11% over the last year. Those share gains could continue as businesses race to benefit from generative AI.

Alphabet recently launched Gemini, a multimodal AI model that can understand and blend different types of information, including text, images, videos, and audio. That distinguishes it from large language models like OpenAI's GPT-4, which are limited to text applications. Google Cloud customers can use Gemini to build custom generative AI applications, which could certainly translate into market share gains.

With that in mind, Wall Street expects Alphabet to grow sales at 10% annually over the next five years, a reasonable estimate given the tailwinds behind its advertising and cloud computing businesses. That forecast makes its recent valuation of 6.7 times sales appear reasonable. Investors with a five-year time horizon should consider buying a few shares of this growth stock today.