Technically speaking, the benchmark S&P 500 index has been in a bear market since falling more than 20% from its all-time high in 2022.

Some Wall Street analysts have already called it the beginning of a new bull market because the S&P 500 since climbed more than 20% from its October 2022 low point. But a consensus won't be reached until the index logs a new all-time high. Here's the good news: It only has to gain another 0.5% to get there.

With that in mind, history suggests 2024 is almost certain to be another positive year for the S&P 500, which would all but guarantee a new bull market by every definition. Here's why investors might want to welcome the new year with shares of Alphabet (GOOGL -0.52%) (GOOG -0.36%) and Advanced Micro Devices (AMD -0.23%).

An image of Google's office headquarters.

Image source: Alphabet.

1. Alphabet (Google)

Google was founded in 1998, and it came public in 2004 valued at $23 billion. It began trading under Alphabet in 2015 because the company had essentially become a conglomerate, following several acquisitions like YouTube and Waymo, and the important internal expansion into cloud computing.

Today, Alphabet is worth nearly $1.8 trillion, and that incredible value creation prompted management to execute two stock splits since 2014 to ensure its stock remained accessible to small investors. Those investors might be thankful this year, because Alphabet gained 60%, which is more than twice the return of the S&P 500 -- and 2024 could be another strong year.

Google search remains Alphabet's largest source of revenue. It struggled over the last 18 months with a challenging economic environment, but with interest rates poised to fall next year, businesses will likely ramp up their advertising spending once again. That could reignite Google's search revenue and drive growth for Alphabet overall.

But artificial intelligence (AI) has been another challenge. Alphabet entered 2023 on the back foot as Microsoft acquired a $10 billion stake in leading start-up OpenAI. Microsoft immediately integrated ChatGPT into its Bing search engine, and it threatened to change the way people find information on the internet -- prompting a chatbot and receiving direct answers is far more convenient than sifting through web pages.

But Alphabet rose to the occasion and launched its own chatbot called Bard. It also embedded AI into the traditional Google search experience, and users will now find the information they seek at the top of the search results without having to click through to any web pages. But December marked Alphabet's biggest leap forward in AI so far with the release of its new Gemini model.

Gemini's multimodal capabilities -- like creating and understanding text, images, videos, and computer code -- appear to outperform OpenAI's latest GPT-4 models, according to statistics released by Alphabet. It could be a game changer for the company, especially for Google Cloud because it faces fierce competition from the highly successful Microsoft Azure OpenAI Service, and Amazon Web Services, which features a growing number of models.

But valuation might be the biggest story for Alphabet heading into the new year. The company is on track to deliver $5.74 in earnings per share for 2023, and based on its stock price of $140.42, it trades at a price-to-earnings (P/E) ratio of just 24. That's a 17% discount to the Nasdaq-100 technology index, and it's also 32% cheaper than Microsoft's P/E of 36. I think Alphabet has the pedigree to trade alongside its AI rival, so investors might enjoy another year of strong upside in 2024.

2. Advanced Micro Devices

Advanced Micro Devices was founded in 1969, and it went public in 1972. Its stock has since delivered a blockbuster gain of 24,150%, prompting management to execute six stock splits since 1978 to ensure it remains accessible to smaller investors. But it could be set for substantial gains going forward, too, as it races to catch its rival Nvidia (NASDAQ: NVDA) in the race to develop AI data center chips.

AMD is one of the largest chip companies in the world. Its hardware powers some of the most popular consumer electronics, including the Sony PlayStation 5, which just crossed 50 million units sold. AMD's chips can also be found in the infotainment centers inside Tesla's electric vehicles. But the company's largest-ever opportunity will likely be in the data center.

Nvidia CEO Jensen Huang says there is $1 trillion worth of existing data center infrastructure that needs upgrading to support accelerated computing and AI. His company has a dominant share in that market thanks to its powerful H100 graphics processor (GPU) and the upcoming H200. But AMD is launching a challenge with its new lineup of data center chips designed for AI workloads, called the MI300.

It comes in a few configurations; the MI300X is a pure GPU, whereas the MI300A combines GPU and central processor (CPU) chips to create the world's first accelerated processing unit (APU) for data centers. AMD has already started shipping the MI300A to the Lawrence Livermore National Laboratory for its new El Capitan supercomputer, which is expected to be the most powerful in the world when it comes online next year.

In fact, 2024 could be the biggest year ever for AMD's data center segment, because it expects to exceed $2 billion in sales from GPUs alone.

AMD delivered a lackluster financial performance in 2023, as consumers spent less on computers and devices under the weight of high inflation and rising interest rates. But Wall Street is forecasting $3.73 in earnings per share in 2024, representing 40% growth at the bottom line. That would place AMD stock at a forward P/E ratio of 37.4, which is a premium to the current 29.6 P/E of the Nasdaq-100.

However, AMD estimates the market for its AI data center chips will grow to $400 billion by 2027, so next year's sales will barely scratch the surface of its opportunity. Paying a premium for AMD stock today might actually seem like a total bargain looking back on this moment a few years from now.