With the macroeconomic environment weighing on advertising stocks, it makes sense that investors have given these companies the cold shoulder. Meta Platforms has fallen almost 67% so far this year, and one of the dominant sell-side advertising technology (adtech) players -- PubMatic -- is down 55% over the same period. 

You can't blame investors for dropping these companies. In an uncertain economic environment, advertising is one of the first expenditures that businesses cut back on. Advertising companies rely on healthy demand from these businesses, and when it dries up, financial results can plummet. Just look at Alphabet's most recent quarter. 

However, one adtech player is bucking this trend: The Trade Desk (TTD 0.04%). Third-quarter results for the digital ad-campaign market's top dog remained stable, and the company continued to make impressive progress. Its CEO and founder, Jeff Green, is more excited than ever about the prospects of this company, and here's why you should be, too. 

Artificial intelligence gathering information about its surroundings.

Image source: Getty Images.

The Trade Desk continues to gain market share

While this economic environment is challenging, Green's company is executing. In fact, he made it clear in the third-quarter earnings call that this turbulent time is helping the company gain an even bigger lead than it already has:

While I don't often comment on competitors' performance, I do think it's worth noting again that in an environment where many of our competitors have contracted or grew in the single-digit range, we grew 31%. That shows that we are outperforming the market and that we're gaining share even in what many are calling a challenging macro environment. While we will never be immune from those macro challenges, we are confident that we will continue to outperform.

According to PubMatic, digital advertising is expected to grow by less than 10% in 2022. This makes The Trade Desk's Q3 revenue growth of 31% and its expected full-year expansion rate of 32% to $1.6 billion multiples faster than the broader industry. During this tough time, while competitors are struggling, The Trade Desk is gaining incredible market share. The company will likely come out stronger with an even larger lead, while rivals are left trying to catch up. This alone could be a reason to buy its stock now.

Straying from the pack

That's not the only reason, however. Not only is The Trade Desk gaining share quickly, but its stable performance has resulted in incredible financial resiliency compared with other advertising stocks. Some investors criticized the company for its net income falling from $59 million in the year-ago period to just $16 million in Q3.

Those investors must not be seeing what's happening in the broader market: Look at Roku, for example. Net income in Q3 2021 was $69 million. That has plunged since, and in Q3 2022, the company posted a net loss of $122 million. Yes, The Trade Desk's profits might be falling, but the company remains far more resilient than other players in the space. 

What's not slowing is The Trade Desk's free-cash-flow generation. Free cash flow year to date has reached $334 million, a jump of 99.5% compared with the year-ago period. While other rivals have likely seen cash flow fall in line with revenue and might have to pull back future investment dollars, The Trade Desk can continue investing and refining its technology to gain even more share of this space. 

Why the stock is a screaming buy

After this jaw-dropping quarter, shares popped and brought the stock's valuation up to 49 times free cash flow. While this is still close to the company's five-year low, it's expensive on an absolute basis.

Many investors might shy away from the company because of its high valuation, and that's fine. Instead, investors can buy a "cheap" advertising stock that is likely struggling and losing market share. Of course, the prospects for a struggling business look much worse than The Trade Desk's position today. If you're willing to pay a slight premium to own a thriving top dog that is gaining market share and will likely come out of this uncertain time healthier than ever, The Trade Desk looks like a no-brainer investment