The Trade Desk (TTD 1.67%) has been a runaway success for investors, having delivered a mind-blowing 379% return over the last five years.

But can the company repeat its stock performance in 2024? I will try to answer that question below, helping investors decide whether the stock is a buy now.

Two people look at a computer monitor.

Image source: Getty Images.

The Trade Desk is a solid company

The Trade Desk's solid stock market return is not without reason. It has been one of the most consistent high-growth stocks, increasing revenue more than tenfold from $114 million to $1.6 billion between 2015 and 2022. More impressively, it has remained profitable throughout that period, a feat that only a handful of companies have achieved.

So how did The Trade Desk do it? By solving customers' pain points and delivering massive value. For starters, the tech company provides a platform that helps clients -- such as agencies, brands, and large companies -- perform programmatic advertising. Powered by its vast database accumulated over the years, The Trade Desk helps advertisers make the best advertising decisions in real time to maximize the value of their advertising budget.

With The Trade Desk's platform, customers gain access to almost all digital (and non-digital) advertising channels, such as connected TV, online video, mobile, audio, display, and more. Besides, advertisers have visibility over every aspect of the advertising process, giving them more control over their advertising campaigns. This way, customers not only make better decisions -- which increases the return on their advertising budget -- but also improve their workflow efficiency.

While The Trade Desk's historical performance has been remarkable, its prospects are equally (if not more) attractive. For perspective, the global advertising industry is an $830 billion opportunity (and still growing). Despite the tech company's home-run performance, it enabled just $7.7 billion of advertising spend in 2022. That's not even 1% of the opportunity!

The Trade Desk's solid track record and colossal growth opportunity make it a great company for investors to watch.

But buying the stock at today's valuation is risky

Finding a solid company, while necessary, is just one part of the investment decision. Investors must consider the other part: buying the stock at a reasonable price. Doing so protects capital and provides a good upside potential.

Unfortunately, I don't think The Trade Desk meets the second requirement. As of this writing, the stock trades at a sky-high price-to-earnings (PE) ratio of 226. Comparatively, Alphabet -- a leading tech and digital advertising company -- trades at a PE ratio of 25 times.

While it makes sense for The Trade Desk to trade at a premium due to its smaller size and colossal growth runway, investors must question whether such a massive premium is warranted. After all, Alphabet is a top-notch tech company with solid prospects.

The Trade Desk must maintain its world-class execution to meet investors' high expectations in the coming years. If it fails, the stock price could fall significantly to close the premium gap. A great example of what could happen is when the stock plunged 18% at the end of 2023 after it provided disappointing guidance.

Besides, investors should also note that The Trade Desk's growth rate in the first nine months of 2023 has already slowed down from 36% to 23% and is expected to slow even further to just 18% in the last quarter of 2023.

A good company is not necessarily a good investment

The Trade Desk possesses many characteristics of a solid company.

It has executed well over the last few years and is well-positioned to continue to grow for the foreseeable future.

Yet it's not a safe investment given its high valuation, which exposes investors to the risk of permanent capital impairment. In other words, this stock may be too pricey for its own good.

All said, while The Trade Desk is not necessarily a sell -- existing investors can hold on to the stock -- it would not be prudent for new investors to buy it at today's valuation.