The Trade Desk's (TTD -1.17%) stock skyrocketed nearly 860% over the past five years as the S&P 500 rose just over 40%. The ad tech company impressed investors with its breakneck growth: Between 2016 and 2021, its revenue rose at a compound annual growth rate (CAGR) of 43% as it net income grew at a CAGR of 46%. But is it too late to buy this growth stock after those massive gains? Let's review three reasons to be bullish -- and one reason to be bearish -- to decide.

1. It has a resilient business model

The Trade Desk is the world's largest independent demand-side platform (DSP) for digital ads. DSPs help advertisers buy programmatic (automated) ad space across desktop, mobile, and connected TV (CTV) platforms.

A retired couple discusses their portfolio with a financial advisor.

Image source: Getty Images.

DSPs shouldn't be confused with sell-side platforms (SSPs) like Magnite (MGNI -4.29%), which enable publishers to sell their own ad inventories. Large digital advertising companies like Alphabet's (GOOG -2.13%) (GOOGL -1.98%) Google and Meta (META -12.58%) bundle together DSPs, SSPs, and other ad tech services, but they lock their advertisers into walled gardens. Therefore, companies that want to purchase ads across the "open internet" that aren't tethered to those large tech ecosystems have been flocking to independent platforms like The Trade Desk.

The Trade Desk's robust growth over the past several years reflects the growing demand for those programmatic ads. It's also carved out a high-growth niche in the CTV market by placing ads on streaming media services.

2. It quickly adapts to technological shifts

Last year, many digital advertising companies struggled with Apple's privacy update on iOS, which enabled its users to opt out of third-party data tracking features. That change made it difficult for companies like Meta's Facebook to craft targeted ads. Yet The Trade Desk quickly addressed that disruptive shift with Solimar, a new AI-powered platform that gathers more first-party data for advertisers to curb their dependence on third-party data. It's also adopting a new Unified ID (UID) 2.0 technology that eliminates the need for third-party cookies.

It's also gradually expanding beyond its DSP market with OpenPath, a new feature that completely bypasses SSPs and directly connects publishers to advertisers. That move could render stand-alone SSPs like Magnite obsolete, challenge integrated SSPs like Google's AdX, and make it a more diversified advertising platform for the "open" internet.

3. It still has plenty of room to grow

The Trade Desk expects its revenue and adjusted earnings before interest, taxes, depreciation, and amortization (EBITDA) to increase 32% and 30%, respectively, in 2022. Between 2021 and 2024, analysts expect its revenue to grow at a CAGR of 26% to $2.4 billion as its adjusted EBITDA rises at a CAGR of 24% to $955 million. If it's still trading at 14 times sales by then, it could be worth nearly $34 billion -- which would represent a near-50% gain from its current levels.

We should take those estimates with a grain of salt, but plenty of tailwinds could propel The Trade Desk toward those targets. For example, eMarketer expects CTV ad spending in the U.S. to more than double from $21.2 billion in 2022 to $43.6 billion in 2026 as linear TV platforms die out. Other overseas markets could experience similar growth spurts.

The one reason to sell The Trade Desk: its valuation

The Trade Desk's core business is firing on all cylinders, but a deep global recession could temporarily derail its growth. Furthermore, its double-digit price-to-sales ratio still makes it pricey compared to other ad tech stocks.

For reference, Magnite and the mobile advertising company Digital Turbine both trade at two times next year's sales. Both of those companies are growing slower than The Trade Desk and face tougher near-term challenges, but the latter could still easily lose its premium valuation if it falls short of the market's rising expectations.

Is it the right time to buy The Trade Desk?

The Trade Desk's stock isn't cheap, but I believe its strengths outweigh its weaknesses and easily justify its higher valuation. Its gains could be limited this year as high interest rates hold back growth stocks and fears of a recession loom over the ad sector, but I still believe it's an excellent long-term investment that should continue to outperform the market.