The Trade Desk (TTD -1.98%) stock tumbled on its second-quarter earnings report, but prior to that, the leading independent demand-side platform (DSP) had been building momentum through July into the earnings report.

According to data from S&P Global Market Intelligence, the stock finished July up 21%. As you can see from the chart below, the stock took several steps higher over the course of the month.

TTD Chart

TTD data by YCharts

Let's take a look at that performance before discussing the company's earnings miss last week.

The Trade Desk joins the S&P 500

The Trade Desk got off to a strong start in July as Citigroup raised its price target to $90 and added to its 90-day catalyst watch.

The big news in the month for The Trade Desk was that it was tapped to join the S&P 500. The stock jumped 7% on July 15 after the news came out. The index announced that it would replace Ansys with The Trade Desk on July 18, as Ansys was acquired by Synopsys.

The addition by the S&P 500 is a bullish signal because it shows that the high-profile index manager believes The Trade Desk is worth including in the 500 companies that best represent the American stock market, and because it forces ETFs that track the index to buy the stock.

Following that announcement, the stock continued to march higher as several analysts raised their price targets and as digital advertising leaders like Alphabet and Meta Platforms reported strong quarterly results, showing advertising demand is robust.

A woman looking at several charts on a glass panel.

Image source: Getty Images.

Why the stock tumbled on earnings

Despite that momentum heading into earnings, the stock plunged on Aug. 8 after the company reported results.

Headline numbers were in line with expectations as revenue rose 19% to $694 million, which was ahead of $686 million. On the bottom line, adjusted earnings per share rose from $0.39 to $0.41, which matched estimates.

However, guidance called for revenue to decelerate, driving fears that the company was struggling with competition. Additionally, the company said CFO Laura Schenkein would step down to be replaced by Alex Kayyal, a longtime board member at The Trade Desk and a former Salesforce executive.

A number of Wall Street analysts downgraded the stock on the report, citing competitive and execution concerns as well as its high valuation.

The Trade Desk called for revenue growth of just 14% in the third quarter, which would be the slowest rate in its history, with the exception of a brief dip when the pandemic started. Given that, the investor caution around the stock seems warranted.