Advertising technology company The Trade Desk (TTD 1.67%) has been a monster home-run investment since it went public in 2016. Over this short time, the stock is up roughly 2,700%, absolutely crushing the 105% return of the S&P 500

With the stock up so much already, investors rightly wonder if The Trade Desk has more upside in 2023 and beyond. And I'm happy to say that it likely indeed does -- I'll explain a huge green flag for the company this year. However, I first want to make investors aware of a bright red flag.

The Trade Desk stock is undeniably expensive

It's difficult to learn how to properly value a stock. There are just so many valuation metrics to choose from, and each needs appropriate context to avoid drawing wrong conclusions.

The price-to-sales (P/S) ratio looks at the value of a company compared to its trailing 12-month revenue, and it can be helpful for high-growth companies like The Trade Desk. In my opinion, two crucial pieces of context for the P/S ratio are a company's growth rate and its profit margins. If the growth rate is accelerating and profit margins are improving, then a higher P/S ratio is likely warranted. The reverse is also true.

In the case of The Trade Desk, its P/S valuation has doubled over the past five years -- in other words, the stock is twice as expensive now compared to 2018, which isn't ideal when investing new money today.

The Trade Desk's gross-profit margin has improved somewhat, so that supports its higher valuation. But its growth rate has slowed substantially. Therefore, it seems the stock should be trading at a cheaper valuation given this context. But its valuation has soared nonetheless.

TTD PS Ratio Chart

TTD PS Ratio data by YCharts

With the valuation soaring, it's clear that the market is optimistic about The Trade Desk's future. As sage investor Warren Buffett said, "You pay a very high price in the stock market for a cheery consensus."

However, Buffett had something else to say about expensive stocks in his 1982 letter to Berkshire Hathaway shareholders. Buffett wrote, "For the investor, a too-high purchase price for the stock of an excellent company can undo the effects of a subsequent decade of favorable business developments." 

The Trade Desk stock is an expensive stock like those Buffett warned about -- that's the red flag. Therefore, compared to cheaper stocks, it will need to deliver better and more profitable growth over a very long time period if it's going to create market-beating shareholder value from here.

But it has a path.

The Trade Desk is in a unique position

Generating its revenue from digital advertising, The Trade Desk's biggest competitor is Alphabet, parent company of Google and YouTube. But Alphabet is already under intense scrutiny for how it operates. In January, for example, the Department of Justice sued Alphabet over what it claims are monopolistic practices. And these practices aren't great for advertisers or publishers.

Website publishers and advertisers put up with it all, however, because Alphabet's technology yields results superior to those of traditional advertising. And there's a lack of viable alternatives. But the tide is turning faster than ever in 2023.

Alphabet delivers superior results thanks to the information embedded in third-party cookies. However, Alphabet is phasing these cookies out in 2024. Of course, the company is ready with new tools to replace its cookies. But publishers and advertisers are looking elsewhere for alternative ways to do business, and they're discovering The Trade Desk's Unified ID 2.0 -- an open-source system that's rich with data but built to address privacy concerns up front.

Major publishers like Disney have already integrated with Unified ID 2.0, and more are signing up quarterly. In the most recent quarter, this included major publisher Comcast's NBC Universal.

The Trade Desk doesn't monetize Unified ID 2.0 directly. But if advertisers can achieve results as good as Alphabet's with the data in this cookie alternative, that's good for The Trade Desk's business. Rather than be locked inside one ecosystem, agencies can use The Trade Desk to advertise across multiple channels where opportunities are the greatest.

Is Alphabet doomed? No. And it doesn't need to be for this to be of extreme consequence for The Trade Desk. Alphabet generated over $224 billion in advertising revenue over the last 12 months. With the phasing out of the cookie, additional pressure for change from the Department of Justice, and rising adoption of Unified ID 2.0, at least a sliver of Alphabet's massive pie could get sliced off.

For perspective, The Trade Desk has generated just $1.6 billion in trailing 12-month revenue. I'd recommend investors watch momentum for the adoption of Unified ID 2.0 in coming quarters. Ongoing gains there could signal that The Trade Desk can indeed grow enough to overcome its valuation risk.