What happened

Shares of Roku (ROKU 0.66%) outperformed the market this week, as the stock jumped 17% through Thursday trading compared to a 3.3% rise in the S&P 500, according to data provided by S&P Global Market Intelligence. The increase wasn't nearly enough to offset wider losses, though, and the streaming video specialist's shares are still down over 50% so far in 2022.

Yet the surge reflected signs of an uptick in optimism about its growth ambitions.

So what

Roku stock benefited from several tailwinds this week, including a sharp rally in the Nasdaq index. That index, and many of the formerly high-flying growth stocks that call it home, has been pummeled as investors worry about a potential recession on the way. Growth stocks like Roku will tend to outperform when that negative sentiment swings back into positive territory, as it did this week.

There were also specific reasons to be more optimistic about Roku in recent days. Executives say the advertising business is expanding nicely, and moves by Netflix (NFLX -0.89%) into that market might only help the streaming platform.

Now what

Investors will have much more data to parse on these topics after Roku and Netflix report Q2 earnings results over the next few weeks. Netflix is set to update its shareholders on July 19, and Roku's announcement will likely come in early August.

Watch for both stocks to remain volatile in the weeks leading up to those reports. Given all the uncertainty around competition and consumer demand for digital entertainment today, short-term stock price rallies like Roku's latest one might easily give way to declines. But the broader growth outlook is positive for this business, and that's the focus that investors should keep as they hold stocks through market swings.