Artificial intelligence (AI) has helped push tech giants, including Microsoft and Nvidia, to new valuation highs and lifted the performance of the stock market at large. On the other hand, not every company with powerful strengths and attractive long-term opportunities in the space has rocketed to new valuation peaks.

Even though the S&P 500 index is now trading in the neighborhood of record highs, some promising players in the AI revolution are still sitting at deeply discounted levels -- and investors who back the right ones could score massive returns.

With that in mind, read on to see why two Motley Fool contributors think investing in Palantir (PLTR 3.73%) and The Trade Desk (TTD 1.67%) is a smart move while the stocks are still trading down big from their highs.

A person holding a lightbulb.

Image source: Getty Images.

This AI leader's growth is ready to accelerate

Keith Noonan (Palantir): Palantir stock has already seen some strong rebound momentum over the last year. The data software specialist's partial valuation recovery has been powered by improving business performance and excitement about the company's strengths in artificial intelligence.

On the other hand, Palantir still trades down 58.5% from the high it reached shortly after going public. For investors looking to build positions in potentially explosive AI stocks, the company's shares still trade at levels that leave the door open for very strong returns.

Palantir's revenue increased 17% year over year to reach $558 million in the third quarter. Meanwhile, the company posted roughly $72 million in net income. The performance marked Palantir's fourth consecutive quarter of profitability and was a dramatic improvement from the roughly $124 million loss it posted in the third quarter of 2022.

Palantir's overall U.S. commercial customer base has increased tenfold over the last three years. Revenue from this customer category grew 33% year over year in the third quarter to reach $116 million -- representing roughly 46% of the period's $251 million in sales to private sector customers and 21% of total revenue.

Aided by strong demand for the company's new AI tools, sales to U.S. commercial customers will soon account for the majority of its private sector business. Sales to private sector customers will also soon account for the majority of revenue, surpassing the slower-growing government customers segment.

The fastest-growing parts of Palantir's business are on track to quickly become its largest sales contributors. In turn, there's a good chance that revenue and earnings growth will proceed at a faster pace. With the company seeing its business composition shift in favorable directions while AI is still just heating up, Palantir looks poised to be a long-term winner.

An abundance of growth opportunities

Jeremy Bowman (The Trade Desk): Digital advertising has experienced a huge boom over the last decade -- driven by new platforms such as social media and video-sharing sites like YouTube -- and there's little doubt that technology will only play a greater role in advertising in the coming years.

Connected TV, or ad-driven streaming, is only starting to go mainstream as streaming services focus on their advertising tiers. Artificial intelligence is set to improve ad creation and targeting, and new platforms, like virtual reality headsets, also present a new opportunity for advertisers to find potential customers.

There's one company at the nexus of this evolving opportunity: The Trade Desk. The Trade Desk is the largest independent demand-side platform (DSP) in the adtech industry, and it has a long track record of delivering excellent results. The company has achieved a customer retention rate of at least 95% for nine years, showing customers are overwhelmingly pleased with the service.

The Trade Desk is also on the cutting edge of technology in the industry. Its Unified ID 2.0 (UID2), a cookieless tracking protocol, is the leading candidate to replace third-party cookies, which Google plans to ban in the second half of 2024. It's also rolling out its new Kokai artificial intelligence platform designed to enhance campaign optimization, data-sharing, and measurement, among other features.

In addition to the potential growth in advertising and new technology, right now also looks like a great time to buy the Trade Desk because the stock is down 43% from its all-time high. And the company is still delivering rapid growth on the top and bottom lines in a difficult environment for the advertising industry. The Trade Desk stock could surge once the economy and the ad industry enter a steady recovery.