Sometimes the machine knows best. Shares of The Trade Desk (NASDAQ:TTD) moved 18.6% higher last week, climbing despite an analyst downgrade and a secondary offering. Trade Desk stock had risen 15.1% a week earlier after the company posted encouraging financial results, bringing its two-week haul to a juicy 37.6% gain.

The prior week's rally was more than warranted. A pioneer in programmatic advertising, where software dictates how marketing budgets are allocated, Trade Desk came through with a better-than-expected fourth-quarter report. Revenue for the period rose 70% to $72.4 million, well ahead of the $62.1 million analysts were forecasting. Trade Desk's fourth-quarter adjusted profit of $0.33 a share blasted through Wall Street's target of $0.23.

Momentum clearly carried through a week later, despite Cantor Fitzgerald analyst Youssef Squali's downgrade on Thursday. The stock had barreled through his $40 price target, and after what was then a 30% rally in less than two weeks, Squali figured the shares were due for a breather.

Trade Desk also completed the placement of a follow-on offering of nearly 7.3 million shares of stock by pre-IPO investors this past week. Investors typically slam stocks pouring more shares into the public float, but Trade Desk actually paired up the secondary announcement with the monster quarterly report a week earlier. Trade Desk's report two weeks ago was too strong to be roughed up by the follow-on offering. The secondary won't be dilutive, since Trade Desk itself is not issuing any new shares in the over-subscribed offering. The new shares were ultimately priced on Thursday at $35.50 per share.

The Trade Desk execs on their first day of trading.

Image source: The Trade Desk.

Meet the new and less vulnerable Don Draper

Cantor Fitzgerald's analyst cooled on the stock on Thursday, but that wasn't the case with Kerry Price at Needham a day later. He stuck to his "buy" rating on the shares, boosting his price target from $32 to $48 to keep pace with Trade Desk stock's big move. 

Rice was impressed by the blowout quarter, and he thinks Trade Desk will continue to gain market share in 2017. The popularity of programmatic advertising is growing faster than the more traditional agency-based allocations, but Trade Desk is also growing faster than the programmatic marketing industry itself. 

Trade Desk initiated guidance for the upcoming year at the time of its head-turning quarterly report two weeks ago. The Big Data-chomping platform provider is eyeing $270 million in revenue for all of 2017 on $1.45 billion in total gross spend by its clients. Analysts were targeting just $248.1 million on the top line, and at least one Wall Street pro -- Brendan McGoldrick at Susquehanna -- thinks Trade Desk's guidance was conservative. 

Trade Desk has now come through with back-to-back blowout quarters since going public at $18 in September. With its software platform continuing to gain traction with marketers, betting with Trade Desk has been the smarter play than betting against it.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.