Shares of Roku (ROKU -10.29%) are up 38.5% this week as of Thursday's close, according to data provided by S&P Global Market Intelligence, after the media-streaming specialist announced strong quarterly results and a better-than-expected forward revenue outlook.

Indeed, shares of Roku popped more than 30% on Thursday alone after the company told investors its third-quarter revenue grew 20% year over year to $912 million -- well above the $855 million most analysts were modeling. On the bottom line, that translated to a net loss of $330.1 million, or $2.33 per share -- technically wider than consensus estimates for a loss of $2.12 per share.

Roku's platform is outperforming the broader ad market

Roku's top line included an 18% increase in platform segment revenue to $787 million and a 33% increase in device sales to $94.2 million. Meanwhile, Roku grew its number of active accounts by 2.3 million sequentially from last quarter to 75.8 million -- also well above Wall Street's estimates for a total closer to 75.3 million. Streaming hours were 26.7 billion during the quarter, up 4.9 billion from the same point a year ago. Average revenue per user, however, declined 7% year over year to $41.03.

Perhaps most encouraging, Roku management noted that even as the broader macroeconomic environment continued to pressure the overall U.S. advertising market -- with ad spending on traditional linear TV down 12% and traditional TV ad scatter down 27% -- video advertising on the Roku platform managed to outperform both the overall ad market and the linear TV ad market.

"We had a solid rebound in video ads in Q3 and we expect the YOY growth rate of video ads in Q4 to be similar," wrote Roku founder and CEO Anthony Wood. "However, we remain cautious amid an uncertain macro environment and an uneven ad market recovery."

What's next for Roku stock?

Even so, for the fourth quarter, Roku expects revenue of $955 million -- again above Wall Street's consensus estimates of $952 million.

With shares of Roku down around 40% from their August highs, perhaps this week's rally was the result of Roku stepping over a very low bar amid broad pessimism for the advertising market. But if its underlying advertising business can indeed sustain its relative outperformance in the coming months, I won't be the least bit surprised if this leading streaming stock continues to follow suit.