Roku's (ROKU 4.10%) stock price rebounded this year after falling sharply in 2022. After reaching a peak of $490 in 2021, the shares now trade around $83, but that's more than double what the stock price was at the beginning of the year.

Investors are more optimistic about Roku's growth prospects because the advertising market, which is how Roku generates most of its revenue, is starting to turn the corner. Advertisers like Roku due to its growing base of 73 million households flocking to the content (including free stuff) on the platform. This will work to the company's advantage when the ad market sees better days.

However, investors should understand the risks to Roku's business before buying the stock.

Bear case: Roku depends on a strong ad market

Roku generates about 12% of its revenue from device sales, with the majority of its remaining revenue coming from advertising (it also gets a portion of revenue from partnership deals with streaming services accessing its media players). When consumers are not spending money in a shaky economy, businesses are less willing to invest in advertising, which can hurt Roku.

Roku's revenue growth hit 81% year over year during Q2 2021. As inflation climbed and advertisers became more cautious, its revenue growth slowed throughout 2022.

ROKU Revenue (Quarterly) Chart

Data by YCharts

Another negative for Roku is that it doesn't generate a consistent profit. This means a weak advertising market can disrupt the company's ability to invest in new initiatives for long-term growth. For example, Roku laid off employees in order to reduce operating expenses as profitability deteriorated.

The company reported a net loss of $107 million in the second quarter, which was a small improvement over the previous quarter. But its trailing 12-month net loss amounted to $660 million through Q2. 

ROKU Net Income (Quarterly) Chart

Data by YCharts

Investors who are interested in a digital entertainment company for the long term might want to consider a subscription-based business, like Netflix, which is not as vulnerable to a weak economic environment.

Those are reasons not to invest in Roku. However, long-term investors can take advantage of the swings in advertising demand to buy ad-dependent companies on the cheap and potentially score a huge return as growth rebounds. This is what value investing is all about, so here's why Roku could be deeply undervalued right now.

Bull case: Dominating the connected TV market

From a competitive perspective, Roku is dominant in the connected TV market. Apple TV and Amazon's Fire TV products compete directly with Roku's streaming devices, but these tech titans haven't been able to put a dent in Roku's lead. According to Pixalate's measure of open programmatic ads sold by device in North America, Roku commanded a 50% share of this market in February, followed by Samsung at 21%, Amazon at 13%, and Apple at just 5%. 

Those numbers reflect Roku's growing audience reach and advertising tools that help ad buyers measure and manage their campaigns to optimize returns. Despite the weak advertising market, Roku reported a 16% year-over-year increase in active accounts last quarter, while total streaming hours on its platform grew 21% to 25.1 billion. 

Roku is also proving it can grow internationally. Over the last three quarters, it was the top-selling smart TV operating system in Mexico. This is while it continued to dominate as the leading TV operating system in the U.S.

The advantage for Roku is affordability. The company's line of TVs is aimed squarely at the value end of the market. You can buy a Roku smart TV for almost as cheap as an Apple TV streaming device. Another draw for consumers is The Roku Channel, which offers exclusive content for free through an ad-supported model. The Roku Channel is a big magnet for viewers and advertisers, as its share of total U.S. viewing time hit 1.1% in May for the first time. 

These are good indicators that Roku's revenue growth will accelerate again. It's only a matter of when the economic outlook is more favorable for advertisers to invest in these platforms.

Roku's revenue growth accelerated to 11% year over year in the second quarter, so the worst could be behind it. The stock has already doubled year to date, but its price-to-sales ratio of 3.6 is much less than its average valuation before the pandemic. At these share prices, it appears investors have accounted for the near-term headwinds, so once the ad market recovers, this top streaming stock could outperform the broader market over the next decade.