Motley Fool co-founder David Gardner has often said: "Winners keep on winning." In other words, don't be afraid to buy a stock just because its share price has appreciated significantly -- those stocks can still be great places to put your money. That may seem counterintuitive, but David's advice has led to some of my most rewarding investments.

Pinterest (PINS 0.89%) and The Trade Desk (TTD 4.15%) have both crushed the market over the last two years, surging 195% and 227%, respectively, in that time. But I think these winners still have plenty of room to run.

Here's why.

Investor holding a digital cortex, from which two upward trending arrows lead to a bullseye.

Image source: Getty Images

1. Pinterest

Pinterest is designed for inspiration. Its platform blends visual search with social media, allowing users to discover, curate, and share collections of images and videos. In other words, people come to Pinterest looking for ideas, which makes it a great place for brands to reach consumers.

To that end, Pinterest introduced several new tools for marketers last year. Brands can now transform their profiles into storefronts, upload product catalogs more quickly, and automate the bidding process for digital ads.

Pinterest also launched new measurement tools, making it easier for brands to analyze campaign performance and attribute results to its platform. Notably, management believes ads on Pinterest offer 2.3 times better cost per conversion compared to other social media.

Collectively, the company's business model creates a strong network effect. As more people use Pinterest to find inspiration, marketers benefit from a larger audience; and as more brands advertise on Pinterest, users benefit from a wider selection of inspirational content. That dynamic has translated into rapid growth.

Metric

2017

Q1 2021 (TTM)

CAGR

Monthly active users

216 million

478 million

28%

Revenue

$472.8 million

$1.9 billion

54%

Data source: Pinterest SEC filings. TTM = trailing 12 months. CAGR = compound annual growth rate.

Since 2017, Pinterest's revenue has grown almost twice as fast as monthly active users on its platform. That means marketers are willing to pay more to reach each user, an indication of the platform's growing value. And as Pinterest continues to onboard new content, investors should expect that trend to continue.

Here's the big picture: According to eMarketer, digital ad spend hit $378 billion worldwide in 2020, and that figure will only expand in the years ahead. Moreover, Pinterest has $2 billion in cash and short-term investments on its balance sheet, but no long-term debt -- and that gives the company plenty of firepower to capitalize on its massive market opportunity.

2. The Trade Desk

The Trade Desk helps advertisers plan, launch, and measure data-driven campaigns across channels like desktop, mobile, and connected TV. The company works with over 300 partners, giving clients access to a robust range of third-party data and digital ad inventory.

Its platform also leans on artificial intelligence, allowing clients to automate and optimize campaigns in real time. In fact, its Koa predictive engine uses artificial intelligence to analyze nearly 11 million impressions each second. That improves the accuracy of targeted ads, driving efficiency for clients.

The Trade Desk also benefits from significant scale. As the most popular independent buy-side platform, it delivers more ads, measures more results, and collects more data than most rivals. In other words, The Trade Desk has a better understanding of which ads will resonate with which consumers. And those insights are continuously fed back into its AI models, improving Koa's predictive capabilities over time.

That virtuous cycle has been a powerful growth driver, helping the company exceed a 95% retention rate over the last seven years.

Metric

2017

Q1 2021 (TTM)

CAGR

Revenue

$308.2 million

$895.2 million

39%

Free cash flow

$18.2 million

$352.3 million

149%

Data source: The Trade Desk SEC filings. TTM = trailing-12-months. CAGR = compound annual growth rate.

Investors should note that, unlike many high-growth tech companies, The Trade Desk is profitable. Since 2017, earnings have grown at 56% per year to reach $4.86 per diluted share. In other words, The Trade Desk has demonstrated that its business model is viable, despite competition from ad tech giants like Alphabet's Google.

Looking ahead, the digital ad market is expected grow at 14% per year, reaching $645 billion by 2024, according to eMarketer. The Trade Desk is growing much faster, and if the company can maintain that momentum, it should continue to gain market share in the years ahead. That's why this growth stock is still a buy.