Investors in The Trade Desk (TTD 1.71%) have had much to celebrate this year, as shares have soared nearly 170% -- even though the stock lost 21% of its value during the recent tech rout.

What's driving these massive gains? The company's platform, which automates the buying, placement, and optimization of available advertising, has carved out a successful and lucrative niche for itself, particularly in key channels like connected TVs and in-app, video, and web spaces.

With the market being less forgiving lately, investors will be watching closely when the company reports its third-quarter financial results after the market close on Thursday, Nov. 8. As we prepare for this report, let's take a look at The Trade Desk's Q2 results and what the company is estimating for Q3.

Two hands touching a digital globe showing various consumer advertising touchpoints.

Image source: Getty Images.

Skyrocketing growth (no, really!)

The Trade Desk has been growing like crazy so far this year, and the second quarter was no different. The company produced record revenue of $112.3 million, an increase of 54% year over year, and adjusted earnings per share of $0.60 were up 15% compared to the prior-year quarter. Both significantly exceeded analysts' consensus estimates, which were calling for revenue of $104 million and adjusted earnings per share of $0.44. They also sailed past management's forecast.

Some of the underlying numbers were even more eye-popping. Sales of mobile ads, which include in-app, video, and web, grew 89% year over year, and accounted for 45% of gross ad spend -- the highest ever. Ad revenue from connected TVs more than doubled sequentially, having soared more than 2,100% year over year in the first quarter. Audio ads climbed 191%, while mobile video and mobile in-app grew 156% and 104%, respectively. Revenue from the company's international markets grew 85% year over year.

The company reported that over the past 12 months, the top 50 worldwide advertisers had increased their spending with The Trade Desk by nearly 100% compared to the prior-year period. In one of the more telling quotes from the second-quarter conference call, The Trade Desk founder and CEO Jeff Green pointed out: "We continue to see marketers allocate budgets beyond a few search and social sites that historically got the most incremental advertising dollars."

What's to come

In light of the company's stellar performance, The Trade Desk's management bumped its full-year guidance for the second time in as many quarters. The company is now expecting revenue of at least $456 million and adjusted EBITDA (earnings before interest, taxes, depreciation, and amortization) of $140 million for 2018. Both figures have been increased more than 13% from management's initial guidance during the fourth quarter of 2017.

For the third quarter, The Trade Desk is forecasting revenue of $116 million and adjusted EBITDA of $33 million, for year-over-year growth of 46% and 35%, respectively.

Wall Street analysts' consensus expectations are for $117.37 million in revenue, and adjusted earnings per share of $0.50.

It's important to note that the market has become less forgiving in recent weeks, and the recent uncertainty is ongoing. The Trade Desk has carved out a niche for itself, as many companies are making the transition to digital advertising. That said, with a forward price-to-earnings (P/E) ratio of 55, any slowing of its soaring growth -- real or imagined -- could cause a commensurate correction of the stock price.

I'm less concerned with short-term stock price moves, however, and more interested in the significant runway the company has ahead of it. I think other investors should be as well.