Last year saw the worst stock market performance since 2008, but it appears we may have finally turned a corner. The S&P 500 has already notched gains of as much as 28% since hitting its bear market low in Oct. 2022. That means the only thing needed to kick off the next bull market is a new all-time high for the index -- or a 14% gain from where the S&P 500 stands as of this writing.

Helping drive the upswing are recent advances in generative artificial intelligence (AI) and the vast productivity gains it promises. With that said, it's hard to pin down exactly what the market might be worth. An estimate from Cathie Wood's Ark Investment Management values the AI opportunity at $14 trillion by 2030. More conservative estimates from Morgan Stanley and Goldman Sachs estimate the market opportunity will reach $6 trillion to $7 trillion by the end of the decade. 

While we don't know exactly how much the market will be worth, one thing is clear: Businesses are scrambling to stake their claim in the AI revolution. What's equally clear is that while some AI stocks will profit from the boom, others are more likely to go bust.

A person looking at a mobile device while seated at a computer desk with an overlay of AI algorithms and stock price graphs.

Image source: Getty Images.

Palantir: AI before it went viral

While Palantir (PLTR 3.73%) went public just three years ago, its history as an AI innovator goes back much further. The company has been creating and deploying AI solutions for the U.S. government and its allies for more than two decades. It was first envisioned as a way to aggregate and mine siloed data in order to catch terrorists. However, Palantir has long since expanded its mandate, using these same algorithms and data mining tools to help businesses glean actionable insights from current and legacy systems.

In Palantir's second-quarter shareholder letter, management lauded the strong demand for its Artificial Intelligence Platform (AIP). The system, which was released just six months ago, weaves generative AI into the company's existing AI tools. More than 100 organizations have signed on to the new offering, which has attracted interest from 300 more. Management noted that demand was "unlike anything we have seen in the past twenty years." 

The company's recent results show just how far it has come. For the first half of 2023, Palantir delivered revenue of more than $1 billion, up 15% year over year, swinging from a loss to a profit as well with $0.02 in earnings per share (EPS). More importantly for investors, the company has delivered three consecutive quarters of profits and positive cash flow, and executives signaled this trend should continue in the coming quarter and for the rest of the year.

Palantir increased its full-year guidance, catching many on Wall Street off guard. It then went a step further: "As a result, we anticipate that we will become eligible for inclusion in the S&P 500 after we report our financial results for Q3 2023 in early November." Palantir also announced a $1 billion share buyback program, which was icing on the cake.

The company's long history of AI innovation, improving financial results, and quick pivot to capitalize on generative AI show why investors should be buying Palantir stock right now.

C3.ai: You can't judge a book by its cover

Going simply by its name alone, investors would be forgiven for thinking that C3.ai (AI 3.02%) might have a leg up in the AI revolution -- but appearances can be deceiving. Sure, the company claims to have "over 40 turnkey enterprise AI applications that meet the business-critical needs of global enterprises" across a variety of industries. 

Add to that the viral nature of AI, and it's easy to see how C3.ai got caught up in the frenzy. If you need any evidence, merely look at its share price, which has surged almost 140% so far this year. Stepping back, however, reveals the big picture: C3.ai stock is still down 85% from its peak, and if its recent results are any indication, there's trouble brewing just below the surface.

A glance at the company's recent financials helps illustrate its ongoing struggles. For its fiscal 2024 first quarter (ended July 31), the company delivered revenue of $72.4 million, up 11% year over year, resulting in a loss per share of $0.56, continuing its long history of red ink. In fact, since its IPO in late 2020, it has yet to deliver a single quarter of positive cash flow or profits.

Even more disturbing is C3.ai's remaining performance obligations (RPO), or contractually obligated sales that have yet to be earned as revenue. In a perfect world, RPO would grow faster than revenue, suggesting accelerating demand. Unfortunately, C3.ai's RPO is going the other direction, shrinking 27% year over year. 

Given the rush from companies of all sizes to adopt AI, you'd think businesses would be lining up for C3.ai's services, but there's nothing in the company's financial results to suggest that's the case. Even as generative AI hits the mainstream and demand is at an all-time high, C3.ai's results remain tepid.

While the company's outlook improved marginally, it still lags behind the AI industry overall. Management is guiding for revenue growth of roughly 19% year over year in the fiscal second quarter and 15% for the full fiscal year, all while its losses continue to mount.

It's hard to imagine a better atmosphere for a company that purports to be an AI expert. If this is the best C3.ai can do in an environment of unprecedented demand, this is one stock investors should steer well clear of.