2023 was a year of recovery for the tech-heavy Nasdaq Composite, which jumped 43% amid the easing of inflation and other macroeconomic challenges that hurt stocks in 2022. But if history is anything to go by, the rally could be just getting started. According to an analysis of data going back to 1971, the index has surged by an average of 19% every year following a bear-market rebound like the one we experienced in 2023.

Nvidia (NVDA 0.03%) and Amazon (AMZN 0.75%) could make great ways to bet on this pattern repeating itself in 2024 and beyond -- especially as both companies develop their new growth strategies around artificial intelligence (AI) technology.

Tense man looking at stock market charts

Image source: Getty Images.

1. Nvidia

With shares up 236% over the last 12 months, Nvidia was one of the Nasdaq's biggest winners in 2023 -- helping drive the index's recovery after its slump in 2022. The tech giant is riding a wave of demand for its data center chips for large language models -- the technology behind AI chatbots. And with these applications becoming increasingly demanding, Nvidia's boom might be just getting started.

While 2023 was a breakout year for AI, the technology is still in its nascent stage. As an article in Time noted, the rate at which AI is surpassing humans at various tasks is accelerating, which could unlock new and increasingly complex use cases. Nvidia is at the forefront of this trend because of its industry-leading chips like the H100, sales of which helped power its 206% year-over-year revenue jump to $18.12 billion in the third quarter.

To be fair, Nvidia is not the only game in town. Rival Advanced Micro Devices is racing to capture a slice of the opportunity with new AI chips of its own. But with industry experts projecting the market for that hardware to grow tenfold to $400 billion by 2027, there seems to be plenty of room for more players to get involved without significantly eroding Nvidia's revenue growth and margins.

The company's forward price-to-earnings (P/E) multiple of 24 also means shares are reasonably valued compared to the Nasdaq's average of 29.

2. Amazon

With a market cap of $1.55 trillion, Amazon is one of the world's largest companies. And this didn't happen by accident. The tech giant's success has hinged on its ability to quickly grow its footprint in new industries -- from e-commerce to cloud computing. Now, AI technologies could help power its next phase of expansion.

Amazon is weaving AI into most aspects of its operations. And this includes product recommendations, fulfillment optimization, and its virtual assistant, Alexa, which is being boosted with new conversational abilities. But the greatest impact will probably be felt in Amazon Web Services (AWS), where it is building a platform for enterprise clients to create and scale their own AI applications.

Emblematic of these efforts was Amazon's announcement in September of its plans to invest up to $4 billion in Anthropic, an AI research start-up similar to ChatGPT creator OpenAI. As part of the deal, Athropic will use AWS cloud services to train and deploy its models, potentially serving as a proof of concept for Amazon's new Trainium and Inferentia AI data center chips, which it designed to be high-performance, low-cost alternatives to third-party hardware.

Trading at a forward P/E ratio of 38, Amazon's stock is more expensive than the average Nasdaq stock. But that premium seems reasonable, considering it is a well-diversified blue-chip company with a long track record of success.

Another banger year?

Nothing is guaranteed in the stock market, but investors have many reasons to be optimistic about 2024. For starters, the high inflation that caused so much trouble over the past two years has largely been reined in, and the Federal Reserve is likely to lower benchmark interest rates this year, making it easier for companies to access the funds they need to maintain and grow their businesses.

That could be a shot in the arm for AI start-ups, many of which make use of Nvidia and Amazon's enterprise-focused AI solutions. Both tech giants look poised to succeed in 2024 and beyond, and it is not too late for investors to bet on their long-term success.