The stock market has been in recovery mode so far in 2023 after being hammered badly last year over concerns about surging inflation and the resulting rise interest rates. The S&P 500 index is up 24% since hitting its most recent low on Oct. 12, 2022, and some on Wall Street are suggesting that a new bull market is underway.

The stock market's jump this year has been mostly driven by technology stocks, which benefited from the growing craze around artificial intelligence (AI). This explains why the Nasdaq-100 Technology Sector index jumped 39% so far in 2023 as compared to the S&P 500's 15.5% gains. Tech stocks could head even higher and help the S&P 500 -- which is less than 10% off its record highs -- hit a new benchmark by the end of the year and usher in a new bull market.

Records going back to 1932 indicate the average bull market lasts for almost five years. They also show the S&P 500 averages gains of almost 178% in bull markets. Given these trends, now might be a good time to buy tech stocks, especially AI stocks, as they are expected to play a central role in sending the index higher.

Advanced Micro Devices (AMD -1.96%) and Palo Alto Networks (PANW 0.71%) are two AI stocks worth buying hand over fist before they surge higher. Let's look at the reasons why.

1. Advanced Micro Devices

Nvidia is a dominant player in AI chips and cornered a huge chunk of this fast-growing market, but Advanced Micro Devices is making gains as well. Customer interest in AMD's current generation MI250 data center accelerator increased thanks to software tweaks that allow the chip to close in on its Nvidia competitor. Also, AMD's upcoming MI300 accelerator is currently being tested by key customers and is on track to enter into accelerated production before the end of the year. Its specs indicate that it could help the company grab a bigger portion of the AI chip market.

AMD CEO Lisa Su said on the company's recent earnings conference call, "AI cluster engagements grew by more than seven times sequentially as multiple customers initiated or expanded programs supporting future deployments of Instinct MI250 and MI300 hardware and software at scale."

This suggests AMD could soon start taking advantage of the lucrative market for AI accelerators, which the company anticipates could be worth a whopping $150 billion a year in 2027. More importantly, AMD's focus on the AI accelerator market could pull the company out of the slump it is in right now. Analysts anticipate AMD's top line to fall 3% in 2023 to nearly $23 billion, thanks to a weak PC market. But the company's growth is expected to accelerate sharply from next year.

AMD Revenue Estimates for Current Fiscal Year Chart.

.

AMD Revenue Estimates for Current Fiscal Year data by YCharts.

Assuming AMD does hit $31 billion in revenue in 2025 and maintains its current sales multiple of 7.8, its market cap could hit $242 billion in three years. That would be a 40% increase from current levels. But don't be surprised to see AMD clocking faster growth and delivering even better upside in the coming years, given the huge addressable opportunity in AI chips.

AMD's stock price is already up 69% so far in 2023. Catalysts such as AI could help this semiconductor stock maintain its impressive momentum, which is why it will be a good idea for investors to buy it before it surges higher.

2. Palo Alto Networks

Share prices of Palo Alto Networks surged 14% on Aug. 21 after the company released fiscal 2023 fourth-quarter results (for the three months ended July 31) on Aug. 18. The cybersecurity specialist delivered impressive growth in revenue and earnings -- beating consensus estimates -- and delivered healthy earnings guidance for the new fiscal year that turned out to be way better than Wall Street's expectations.

Palo Alto finished fiscal 2023 with a 25% increase in revenue to $6.9 billion. The company's remaining performance obligations (RPOs), which refers to the total value of customer contracts that are yet to be fulfilled, increased at a faster pace of 30% to $10.6 billion, indicating that Palo Alto has built a solid revenue pipeline on account of an increase in customer spending. The company also reported $4.44 per share in adjusted earnings last year, a massive increase of 76% over the prior year.

Palo Alto expects to finish fiscal 2024 with earnings of $5.27 to $5.40 per share, which would be a jump of 19% to 22% over last year. That's way higher than the consensus estimates of $4.98 per share. However, don't be surprised to see Palo Alto clock faster growth thanks to the growing adoption of AI in the cybersecurity space.

Palo Alto estimates that the growing autonomy of cybersecurity operations could add $90 billion to its total addressable market (TAM) by 2028. As a result, the company plans to deploy AI across its entire product portfolio so that it can "deliver unparalleled detection and response to achieve near real-time security." More specifically, Palo Alto aims to lower the time taken to resolve cybersecurity incidents by 65% with the help of AI.

The good part is that several Palo Alto products and modules are already equipped with AI. The company estimates that it will finish 2023 with 35 AI-powered products as compared to 28 last year. All this indicates that Palo Alto is well-placed to capitalize on the huge AI-driven TAM at its disposal for the next five years.

Analysts anticipate the company's earnings will grow at 33% a year for the next five years. Palo Alto seems capable of delivering on that front, given its already solid pace of growth, a huge end-market opportunity worth $213 billion, and the company's focus on integrating AI across its portfolio so that it can tap a fast-growing niche.

Assuming Palo Alto clocks 30% annual earnings growth for the next five years, its bottom line could hit $16.48 per share at the end of the forecast period using its fiscal 2023 earnings as the base. Multiplying the projected earnings after five years with the Nasdaq-100 index's forward earnings multiple of 27 points toward a stock price of $445. That would be an 85% jump from current levels, which is why investors should consider buying this potential AI winner before it is too late.