The Trade Desk (TTD 3.89%) is reshaping the ad market, and it's also doing a pretty good job of reshaping portfolios. The Trade Desk stock moved 10% higher last week after SunTrust analyst Youssef Squali upgraded the stock from hold to buy. Shares of the fast-growing player in programmatic advertising have now nearly doubled in 2017, but Squali's move is actually more of a reaction to recent weakness in The Trade Desk.

The stock took a hit last month after offering up disappointing guidance for the fourth quarter. With shares kicking off last week 33% below October's all-time highs, Squali's decision to stick with his earlier $58 price target warranted the shift from neutral to bullish at current levels. It's not the ideal way to earn a nod from a Wall Street pro, but investors will take it as The Trade Desk wraps up its first full year as a public company.

The Trade Desk executives at its NASDAQ debut in Sept. 2016

Image source: The Trade Desk.

The power of persuasion

Squali feels that the combination of the stock's recent pullback and the potential of a short squeeze give The Trade Desk an attractive risk-reward profile at this point. He's also singing the praises of a recent social-media partnership, and feels that legislation lowering the corporate tax rate could offer a real boost to The Trade Desk's bottom line.

The shorts are definitely out there when it comes to The Trade Desk. A record 7.4 million shares of The Trade Desk were sold short at the end of November, nearly 28% of the stock's public float. The number of shares sold short has more than doubled over just the past two months, and any whiff of good news can send the naysayers scrambling to cover their positions.

We obviously don't have any guarantees that a short squeeze will happen. The Trade Desk struck out last time out. Revenue rose 50% and adjusted net income soared 63% in the third quarter, but guidance was a letdown. The company raised its full-year revenue and adjusted EBITDA (earnings before interest, taxes, depreciation, and amortization) forecast by less than the beat during the third quarter, effectively lowering its fourth-quarter targets.

There's no denying that The Trade Desk is in the right marketing niche, as programmatic advertising lets data-munching software allocate ad budgets across all platforms. Growth may be decelerating -- and The Trade Desk's November update pegs fourth-quarter revenue and adjusted EBITDA growth slowing to 40% and 19%, respectively -- but it's still gaining market share at the expense of traditional outlets.

Squali isn't the first analyst to see last month's post-earnings sell-off as an opportunity to get back in. Analysts at Macquarie and Susquehanna put out supportive notes right after the troublesome third-quarter report.

The Trade Desk has earned investors' respect since hitting the market late last year. It has delivered impressive top-line growth and blasted through Wall Street earnings forecasts by 25% or better every single time. While it will have some big stock gains to justify as we enter into 2018, The Trade Desk has proven that it's up to the task.