With less than 72 hours to go before the clock strikes midnight and we welcome in a new year, it's safe to say that 2022 will be the worst year for Wall Street in more than a decade. All three of the major U.S. stock indexes plummeted into a bear market at some point during the year, with the growth-dependent Nasdaq Composite getting hit hardest, with a peak-to-trough decline of as much as 38% since November 2021.

While looking at potentially sizable unrealized losses is never fun, bull markets tend to last significantly longer than bear markets. Furthermore, every bear market throughout history has eventually been cleared away by a bull market. In other words, bear markets are a green light for investors with a long-term mindset to do some shopping.

An computerized image of a human face appearing out of thousands of pixels.

Image source: Getty Images.

Buying on the dip can be especially fruitful when it comes to game-changing trends. For instance, the global artificial intelligence (AI) market is expected to grow by a compound annual rate of 38.1% between 2022 and 2030, according to a recent report by Grand View Research. In dollar terms, we're talking about a market worth close to $137 billion in 2022 growing to more than $1.81 trillion by the turn of the decade. 

Put simply, AI involves using machines or systems to handle tasks humans would normally tackle. The ability for machines and/or software to learn and adapt has broad-based applications throughout most sectors and industries.

As we ready to steam ahead into 2023, two artificial intelligence stocks stand out as amazing deals, while another AI-driven stalwart would be best avoided.

Artificial intelligence stock No. 1 to buy hand over fist in 2023: CrowdStrike Holdings

The first AI stock that stands head-and-shoulders above its peers as an incredible deal for the new year is cybersecurity company CrowdStrike Holdings (CRWD 2.66%).

Through last weekend, shares of CrowdStrike had lost half their value on a year-to-date basis, and 65% since hitting an all-time high late last year. The company's premium valuation -- both in terms of price-to-sales and price-to-earnings ratio -- has arguably been its biggest obstacle. During bear markets, it's not uncommon for investors to seek the safety of value and dividend stocks.

However, CrowdStrike has demonstrated for more than a half decade that it's every bit worthy of its premium. It all starts with the technology behind the company's end-user security services.

The secret sauce to CrowdStrike's success is the company's cloud-native Falcon security platform. Falcon relies on AI and machine-learning technology to become smarter over time, with the purpose to more efficiently identify and respond to potential threats. Falcon oversees in the neighborhood of 1 trillion events daily, and it uses these events to become more effective at protecting users.

If you need proof of how good Falcon is at protecting its subscribers, just take a closer look at CrowdStrike's operating results. Even though CrowdStrike's solutions aren't the cheapest, its gross retention rate has steadily climbed from below 94% at the beginning of fiscal 2018 to north of 98% by the end of fiscal 2022

To add to the above, CrowdStrike's dollar-based net retention rate cleared 120% for 16 consecutive quarters from the beginning of fiscal 2019 through the end of fiscal 2022. This is a fancy way of saying that existing subscribers spent at least 20% more in the following year, quarter after quarter, for four years.

But the real icing on the cake in CrowdStrike's operating results is the percentage of existing customers that are adding on new subscriptions. As of the end of October, 60% of the company's more than 21,100 clients had purchased five or more cloud module subscriptions. A little over five years ago, fewer than 10% of its subscribers had purchased four or more cloud module subscriptions. These add-on sales are CrowdStrike's golden ticket to sustained growth and an exceptionally high subscription gross margin.

Artificial intelligence stock No. 2 to buy hand over fist in 2023: Alphabet

The second AI stock that stands out as a no-brainer buy for the new year is none other than Alphabet (GOOGL 0.83%) (GOOG 0.72%), the parent company of internet search engine Google, streaming platform YouTube, and autonomous vehicle company Waymo.

Similar to CrowdStrike, Alphabet has struggled mightily in 2022. Shares were down 38% year to date through last weekend and are off 40% since hitting its closing high in November 2021.

Since Alphabet is predominantly an ad-driven company, and ad spending is among the first areas to be hit when the U.S. and global economy weaken, it's pretty easy to connect the dots and figure out why shares have been weaker this year. Thankfully, this weakness represents an opportunity for patient investors to pounce -- and it all starts with AI.

As you might be aware, Google is Alphabet's foundational operating segment. For the past three years, it's accounted for anywhere from 91% to 93% of global internet search. This is one reason Google is able to command such impressive ad-pricing power. But it's not the only reason.

In October 2021, the leader of Google's AI division, Jeff Dean, introduced the world to the company's next-generation AI architecture, dubbed Pathways. Pathways is intended to overcome many of the singular challenges existing AI systems face. In particular, it'll be capable of being trained to do "thousands or millions of things," according to Dean's Google blog that introduced the new technology. Pathways is the next evolution of Google search and should further boost the company's monetization efforts in an arena where it's already top dog.

Alphabet is also using AI to help moderate YouTube, which has become the second-most-visited social site in the world (2.5 billion monthly active users). Ensuring that the more than 1 billion hours of content watched on the platform each day meets community guidelines is a tough task, made much easier with the use of AI.

AI is also the (literal) driving force behind Waymo, which is arguably closer to level 5 self-driving autonomy than any other company. 

What this all translates to is a company generating boatloads of cash flow that's never been this cheap as a publicly traded company. With AI represented throughout its many moving parts, Alphabet can deliver superior growth and profits throughout the decade.

An engineer checking data center server wires while holding a tablet.

Image source: Getty Images.

The AI stock to avoid like the plague in the new year: IBM

However, not every artificial intelligence stock will be a winner. Whereas CrowdStrike and Alphabet have very bright futures, tech stock IBM (IBM 0.13%) can be passed up for greener pastures.

IBM isn't a train wreck by any means. The company has been consistently profitable for as far back as the eye can see, and it's been paying a market-topping dividend for years. The general predictability of its annual cash flow has made the company's nearly 5% yield a popular target for income seekers.

Additionally, IBM has made headway with its hybrid cloud transition, which also incorporates AI. Even with the worst of the COVID-19 pandemic now in the rearview mirror, more people than ever are still working remotely. This has created an expansive demand for mixed-computing solutions for the public and private cloud. In other words, the pandemic has played right into IBM's fastest-growing operating segment.

You might be wondering why it'd be worth avoiding a company that's profitable, paying a superior yield, and has seen its hybrid cloud grow by a double-digit percentage each year. The answer to that question is IBM hasn't truly distanced itself from a decade of underperformance.

Although IBM spun off its slow-growing managed infrastructure services business Kyndryl in November 2021, the company is nowhere near its operating pinnacle from nearly a decade ago. For example, in 2013 IBM generated more than $98 billion in sales and close to $15 in earnings per share (EPS). In 2022, it'll perhaps creep back above $60 billion in full-year revenue and generate a little over $9 in EPS.

Even factoring in Kyndryl's sales, it doesn't mask the fact that IBM's sales have been either stagnant or falling for nearly a decade. It'll take years of sales growth to get anywhere close to its 2013 figures.

The other concern is IBM's balance sheet. The company has made dozens of bolt-on acquisitions designed to enhance its AI-driven hybrid cloud. However, these acquisitions have increased the company's debt to almost $50.9 billion. While this debt load is serviceable, it could constrain IBM's financial flexibility as interest rates rise.

AI stocks should deliver supercharged growth and be on the leading edge of innovation. While IBM is the category leader in a few niche areas of AI software, it's not delivering the sales or profit growth that's going to excite investors. Therefore, there are simply far better choices in the AI space for 2023 than IBM.