Palantir Technologies (PLTR 3.73%) has soared thus far in 2023, driven higher by a general rebound in technology stocks and advances in artificial intelligence (AI) that are taking the world by storm. Shares of the data mining and AI specialist are up 177% so far this year, more than 13 times the 14% gains of the S&P 500. That impressive achievement largely erased the terrible share price performance of last year, when it lost more than 64%. Tracked since the start of 2022, it is now almost back to even.  

While the debate rages as to just how far demand for AI could run, Palantir is reaping the rewards of its long history of developing next-generation algorithms, which dates back 20 years -- long before AI joined the cultural zeitgeist. Further backstopping Palantir's rise is its steadily improving financial results over the past year, which suggests the broader economic meltdown that weighed it down might finally be abating.

What does this mean for investors who stayed on the sidelines during Palantir Technologies' recent rally? Should they simply buy the stock and hold it for the long term, or take a hard pass based on its frothy valuation?

The virtual button with the letters AI in a circle hovering above a keyboard, about to be clicked by a cursor.

Image source: Getty Images.

What plagued Palantir stock last year?

2022 was a tough year for Palantir and its investors. Faced with some of the worst macroeconomic headwinds in more than a decade and expecting matters to get even worse, businesses battened down the hatches and cut spending. Discretionary spending was slashed from budgets. While some would argue that data should play a critical role in decision-making, others opted to take a "better safe than sorry" approach.

The challenging environment dragged on Palantir's results last year. While its revenue increased by a solid 24%, that didn't hold a candle to the 41% gains it generated in 2021. The pronounced decline in revenue growth sent a collective shiver down the spine of investors, causing some to head for the exits. Given what followed, however, those sellers may have been hasty.

While some companies are just now jumping on the AI bandwagon, Palantir has a long track record of delivering custom AI and data mining solutions for government agencies and enterprises. That history gives the company a degree of credibility that its AI solutions will be able to deliver the goods.

What could propel Palantir stock higher?

While the AI revolution will likely provide additional tailwinds to push Palantir stock higher, investors have been keenly focused on the company's rapidly improving bottom line.

Palantir's recent results continued a trend that began several quarters earlier. In Q2, the company delivered its third successive quarter of GAAP profitability "as we continue on our path to sustained and durable earnings." Furthermore, Palantir's track strong record of operating and free cash flow suggests the trend will continue. Not only did Palantir exceed Wall Street's expectations, it raised guidance for the full year and instituted a $1 billion stock buyback. 

Management's bullish commentary helped provide additional evidence that the future is bright. Palantir's Artificial Intelligence Platform (AIP), which it introduced last quarter, has been adopted by more than 100 organizations already, and Palantir is in talks with 300 more. 

CEO Alex Karp pointed to growing demand from enterprises that want to integrate generative AI that leverages existing first-party data. "As a result, the demand for AIP is unlike anything we have seen in the past 20 years." 

At present, it's hard to quantify the potential market for artificial intelligence, but the stakes are compelling. Analysts at Goldman Sachs estimate the market will reach $7 trillion by the end of the decade, while Morgan Stanley pegs the opportunity at about $6 trillion. Yet even the most conservative estimates are telling. TD Cowen analyst John Blackledge is much more conservative, suggesting that the market for generative AI software could reach $81 billion by 2027.

That still spells a massive opportunity for Palantir to tap. 

How to view Palantir stock now

I'd be remiss if I didn't address the 800-pound gorilla in the room. Palantir's stock price rally this far in 2023 this year has resulted in a proportionate increase in its already-rarefied valuation. The stock currently trades for roughly 18 times trailing sales and 14 times next year's sales, so there's already a significant amount of growth priced into it. Anyone looking for a quick profit should stay far away.

However, for those with a long-term outlook, this could still represent an opportunity. Palantir's expertise gives it decided advantages, and the secular tailwinds driving its growth could persist for years. Furthermore, Wall Street expects Palantir to deliver double-digit percentage revenue growth, and its earnings per share are expected to grow fourfold between now and 2024. 

To be clear, the stock isn't for every investor. But if Wall Street's estimates are anything close to reality, this could be the beginning of a years-long run for Palantir.