This year it seems like shares of The Trade Desk (TTD 0.85%) just can't catch a break. In August, the digital advertising company announced second-quarter earnings results that made the stock market cheer, but the enthusiasm didn't last.

Now, shares of The Trade Desk are down more than 20% from their summer peak and 46% from the all-time high they reached last year.

The Trade Desk stock may be down, but winds of change are blowing its underlying business in the right direction. Here's why you can confidently buy this stock now and hold it for the long run.

Sorry, Google

Google is still a digital advertising behemoth, but big spenders are increasingly likely to seek out The Trade Desk.

Google is falling out of favor, because as a subsidiary of Alphabet, it aims to serve publishers, ad buyers, and itself at the same time. The Trade Desk platform is built to serve the demand side of the equation specifically. The company ensures ad buyers have access to sufficient inventory thanks to its partnerships with sell-side ad tech platforms such as PubMatic.

Company Advertising Revenue Q2 2022 Year-Over-Year Growth
The Trade Desk $377 million 34.6%
PubMatic $63 million 26.9%
Google $56.3 billion 11.6%

Data source: company filings. Table by author.

As you can see in the table above, digital advertising platform operators without the conflicts of interest seen at Google are growing their businesses roughly two to three times faster than the tech giant. They've also just scraped the surface of the overall digital advertising market.

The CTV champ

The Trade Desk's demand-side platform shows ad buyers where they can bid on available inventory, and big spenders in the digital ad realm are flocking to our living rooms.

During the company's second-quarter earnings call, CEO Jeff Green said connected television (CTV) "is evolving faster than anyone predicted." He also went on to tell investors The Trade Desk is poised to benefit more than any of its competitors.

Investor looking for stocks to buy.

Image source: Getty Images.

Much of the digital advertising industry is in upheaval since Google announced it would quit allowing third-party cookies that track user activity. With a privacy-preserving workaround already emerging -- Unified ID 2.0 (UID2) -- this challenge is an opportunity for The Trade Desk to gain more ground in a competitive industry.

Amazon Web Services (AWS) recently announced it would support UID2, which allows AWS customers to easily integrate The Trade Desk's new non-invasive tracking solution into their applications. Now, ad buyers can access the UID2 interface when bidding on Hulu, ESPN, and other Disney properties.

You may have heard that Netflix hired Microsoft to manage its upcoming ad-supported subscription tier. Netflix and Microsoft haven't reached out to The Trade Desk yet, but Green is so confident in the strength of his company's platform that he said it's "extremely likely" they will.

One big concern

Before risking your hard-earned money on The Trade Desk stock, you should know the company has been on a hiring spree and rewarding its employees. The company posted a net loss of around $19 million in the second quarter, due in part to a whopping $125 million in stock-based compensation.

TTD Stock Based Compensation (Quarterly) Chart

Data by YCharts.

The Trade Desk looks like a good stock to buy at current prices, but investors want to keep a close eye on the bottom line for at least a few more quarters. The company over-invested in response to soaring demand in 2021 that has given way to a weaker economy this year.

But it's probably just a matter of time before The Trade Desk begins reporting positive earnings again. For investors who are willing to look past the near-term volatility, this stock can be a high-growth piece of a well-diversified portfolio.