What happened

Shares of The Trade Desk (TTD -0.34%) ended the second half of 2022 in positive territory, a rare feat among the tech glitterati. The stock climbed 7.6%, outpacing the break-even performance of the S&P 500.

The catalyst that sent the digital advertising stock into positive territory was back-to-back quarters that featured impressive financial results and equally compelling market share gains.

So what

With the bear market still ravaging many technology stocks, it's rare to find one that has outperformed the broader market. This feat was accomplished on the heels of back-to-back quarters with results that sailed past Wall Street's expectations. This all happened while many marketers were pulling back on ad spending, making life difficult for companies in the digital advertising space.

Yet, while many were feeling the pinch, The Trade Desk came through with flying colors. The company reported strong second-quarter results in early August, setting the stage for the stock price gains to come. Revenue of $377 million grew 35% year over year, driven by both new and expanded long-term advertising arrangements, which the company signed at a record pace. 

While that might not seem like a Herculean feat, consider this: Digital advertising rival Alphabet (GOOGL -0.83%) grew revenue by 13% during the same period, while Meta Platforms (META 0.68%) revenue declined by 1%. 

The Trade Desk also continued to generate profits -- also a rarity among high-growth companies. Adjusted earnings per share of $0.20 climbed 11%.

This performance led CEO Jeff Green to make a stunning pronouncement (emphasis mine): "This trend also gives us confidence that we can execute in any market environment." He went on to cite one secular tailwind that not only helped the company gain market, and that will help fuel the company's future growth -- the accelerating adoption of connected TVs. 

The good times continued when The Trade Desk announced its third-quarter results in early November. Revenue of $395 million climbed 31% year over year, while adjusted earnings per share of $0.26 surged 44%. For context, Alphabet's revenue climbed just 6%, while Meta's declined 4%. This helps illustrate The Trade Desk's strong position in the adtech industry it helped revolutionize.

Now what

For the upcoming third quarter, management is guiding for revenue of at least $490 million, which would represent year-over-year growth of roughly 24%. Given the macroeconomic environment, it's likely The Trade Desk is continuing its practice of issuing conservative guidance.

Things could still turn on a dime, and The Trade Desk's stock could go lower. That said, for those with a long-term mindset, the opportunity is clear. The Trade Desk is on track to generate revenue of roughly $1.58 billion in 2022,  which pales in comparison to total worldwide ad spending of roughly $750 billion. 

Finally, The Trade Desk isn't cheap in terms of traditional valuation metrics, selling for 11 times next year's sales when most experts agree that a reasonable price-to-sales ratio is between 1 and 2.

However, given the company's consistently strong performance, industry leadership, and secular tailwinds, The Trade Desk is a strong buy.