As indexes slid earlier in the first half, so did highflier Palantir Technologies (PLTR -0.80%) -- but not for long. Investors in the tech stock seemed to shrug off concerns about a potential economic slowdown and halt in spending as they piled into shares of the software company.
Even after the stock's spectacular performance, here's why you shouldn't sell Palantir before the second half of 2025 (which begins Tuesday, July 1), and instead, hold on for the long term.

Image source: Getty Images.
Why do investors love Palantir?
First, though, a quick look at why Palantir has become so popular with investors. Palantir's business may not sound extremely glamorous -- its software helps customers aggregate their data and make better use of it. But this platform actually is producing game-changing results -- from better performance on the battlefield for the military to streamlined maintenance or improved supply chain operations for commercial customers.
And Palantir, seeing the potential of artificial intelligence (AI), launched its Artificial Intelligence Platform (AIP) two years ago to add AI to an already strong data analysis system. Thanks to high demand for AIP, investors see Palantir as a current and future winner in the AI boom.
This focus on AI also has helped Palantir drive growth in its commercial business. Over most of its 20-year history, Palantir's biggest customers were governments.
In recent times, though government revenue continues to increase in the double-digits, commercial customers have joined this growth story. Throughout the latest quarter, both government and commercial revenues have climbed in the double digits. And the number of commercial customers and value of their contracts have skyrocketed.
About four years ago, Palantir had 14 U.S. commercial customers -- today, this number exceeds 430. And in the recent quarter, U.S. total commercial contract value climbed 183% to a record of $810 million.
An 80% gain this year
All this helped Palantir stock soar more than 80% in the first half -- after already advancing 340% last year to deliver the best performance in the S&P 500 (^GSPC -0.06%).
Even concerns that President Donald Trump's import tariff plan may weigh on the economy didn't prompt investors to turn their backs on Palantir for very long. The stock slipped from an earlier high and stumbled through March and April before strongly rebounding.
Now the one big concern today -- and the reason why some analysts advise selling Palantir -- is the stock's valuation has reached extremely high levels, trading for 240x forward earnings estimates. This is very pricey, and such levels could dissuade some investors from buying.
But this metric uses earnings estimates for the coming year and doesn't take into account the company's long-term potential. So, when considering a highly innovative company like Palantir that's seeing tremendous demand and operating in a high-growth field such as AI, investors might set aside the valuation argument and buy the stock anyway. That's what's been happening over the past year.
Moving forward, this could continue -- driving Palantir stock higher -- as the company delivers strong earnings. Palantir in the recent quarter already increased its forecasts for full-year revenue, adjusted income from operations, and adjusted free cash flow. Of course, the risk is that with such impressive performance so far, any small disappointment could hurt stock performance. This may happen, but what's actually likely is that Palantir, at some point, will take a pause and stagnate for a while.
Take a long-term view
Before making any investment decisions, though, it's important to take a long-term view and consider where Palantir will be a few years from now. Though commercial revenue is soaring, the number of commercial customers today suggests there's room for many more to hop on board. So Palantir still is in the early days of its commercial growth story, and at the same time, government demand could hold strong as Palantir helps with something that's a big priority these days: efficiency.
All this means that, unless you need to access your cash or are uncomfortable with risk, it's a great idea to hold on to your Palantir shares -- even after the stock's tremendous gains. This company, whether it rises or stumbles in the second half of 2025, could have a lot farther to go over the long term.