The stock of Palantir Technologies (PLTR 1.07%) has been outpacing the market in 2023. Shares of the data mining and artificial intelligence (AI) company had already risen 30% this year at the time of publishing, and Palantir's financial results contained a couple of surprises that could drive the stock even higher in the months and years to come.

For the fourth quarter, revenue grew 18% year over year to $509 million, driven by robust government sales growth. This helped push net income into positive territory, marking the first time the company has generated a profit according to generally accepted accounting principles (GAAP). This resulted in earnings per share (EPS) of $0.01, or adjusted EPS of $0.04. 

A person writing code while sitting at a desk with multiple computer monitors.

Image source: Getty Images.

For context, analysts' consensus estimates were calling for revenue of $502.6 million and adjusted EPS of $0.03, so the company cleared both bars with ease. 

Perhaps the most impressive thing about this accomplishment was that Palantir hit its profit goal years ahead of schedule, after planning to reach GAAP profitability by 2025. 

Palantir experienced solid growth in both its major business segments. Government revenue continued to pay the bills, up 23% year over year to $293 million, while sales from its commercial segment grew 11% to $215 million.

The financial results were bolstered by strong customer growth. Its customer count surged 55% year over year to 367, and the company closed 976 deals, an increase of 61%. 

Management expects growth to continue. For the first quarter, Palantir is forecasting revenue of about $505 million, up roughly 13% at the midpoint of its guidance, resulting in adjusted operating income of $93 million.

The company's full-year forecast is even more robust. Management expects 2023 revenue of $2.2 billion, up 16%, while also guiding for positive net income for the year. Given the general state of the economy, that guidance is likely conservative.

CEO Alex Karp believes the current spotlight on AI-based technologies, including ChatGPT, could provide Palantir with additional upside. Karp wrote in his annual CEO letter: 

Our collective focus on artificial intelligence, including the natural language processing capabilities that have recently been made more widely available to the public, is not misplaced. The demand from customers for our platforms has in recent months gained additional momentum, in significant part because of the accelerating embrace of artificial intelligence by companies across sectors and industries. We anticipate that this new source of demand will contribute to our growth moving forward, above and beyond what we would have anticipated even late last year. 

That said, economic headwinds continue to be a wild card. Chief financial officer David Glazer prefers to view the current conditions as an opportunity, expanding its relationship with Palantir's current customers, as they try to "do more with less." 

Not much love for Palantir?

The current macroeconomic challenges aside, there are several factors that bears have long taken issue with, citing these as reasons investors should avoid Palantir.

First, some contended that Palantir stock was far too expensive, though the bear market has made that argument largely moot. Palantir's valuation has come down considerably over the past couple of years, and it currently sells for less than 6 times forward sales, down from its peak of 46 times in early 2021.

While most experts agree that an optimum price-to-sales ratio is generally between 1 and 2, that number shouldn't be viewed in a vacuum. Given the company's consistent growth, Palantir has shown it's deserving of a premium.

Second, many investors have cited Palantir's stock-based compensation as a reason to stay away -- and there's certainly merit to that argument. Because its systems are highly technical, the company needs top-shelf talent to create and maintain its cutting-edge AI systems and data mining capabilities. Technology companies often lure potential employees with either large cash salaries or the promise afforded by stock options, namely that they could strike it rich if the stock price soars. Palantir chose the latter. 

However, management has been making good on its promise to bring down its stock-based compensation expense. In fact, since its peak in early 2021, Palantir has reduced its stock-based compensation by more than 60%. 

And third, there was the matter of profits -- or lack thereof. Until now, Palantir has relied on "adjusted" metrics to cast its results in the best possible light. The company's long streak of net losses gave some investors pause, and they preferred to invest in companies they viewed as safer.

With its first-ever profit, Palantir is signaling that its wants to be taken seriously by investors. The stock shot up as much as 20% in after-hours trading yesterday immediately following the release of its fourth-quarter results, and was trading 11% higher when markets opened this morning. So, it seems the company is achieving that objective.

To buy or not to buy?

Palantir has come a long way in just a couple of years, reducing expenses, cutting its stock-based compensation, and -- thanks to the ongoing bear market -- boasting a valuation that is much more reasonable. This might not be enough for value-minded investors, who still might find the stock unpalatable.

That said, for investors who don't mind taking some additional risk for the possibility of greater return, I believe Palantir stock is a buy.