After hitting the public markets in September 2017, Roku (ROKU -1.27%) shares skyrocketed more than 1,900% in a period of less than four years. This business benefited from loose monetary policy, a risk-on investing environment, and rapid growth in the streaming industry. Only these ingredients could help to catapult a consistently unprofitable enterprise to such an elevated valuation. 

However, with more subdued market sentiment, coupled with heightened economic uncertainty today, Roku's stock is down 87% from its peak (as of April 10). And shares now trade at a price-to-sales multiple of 2.8, which is nearly the cheapest they have ever been. Does this mean that it's time to buy Roku stock? 

Hurting from cyclical trends 

Roku's growth throughout the past few years has been outstanding, particularly as it rode the wave of viewers ditching cable TV in favor of the more user-friendly streaming option. But in 2022, Roku faced a notable slowdown. Revenue for the full year of $3.1 billion was up just 13.1% versus 2021, far lower than the greater than 50% gains posted in three straight years before 2022. And in the fourth quarter, sales increased by just 0.2%. Like many pandemic darlings, this business is dealing with a new economic reality. 

Speaking of the economy, there's a major factor that has negatively impacted Roku, and that's the softer digital advertising market. Roku's platform segment, which accounted for 84.3% of revenue in the latest quarter, makes money partly from marketers who choose to advertise on connected TV. If executives believe that a recession is likely, they will quickly pare back their marketing to conserve cash and prepare for worse economic times. "The U.S. ad market was down 12% year over year in December," said CEO Anthony Wood on the Q4 2022 earnings call. 

Moreover, inflationary pressures have hurt Roku's hardware segment, which includes sales of the company's popular media players. The business has sold these products at a loss over the past several quarters, most recently at a gross margin of negative 32.1% in the fourth quarter, as higher component costs aren't getting passed on to customers. This situation further fuels the question of when Roku will ever become profitable.

It's likely that these headwinds will persist for the foreseeable future. Management expects overall first-quarter sales to be $700 million, good for a 5% year-over-year decline.  

Benefiting from secular trends 

Despite recent issues plaguing the business, coupled with the fact that Roku is far from generating positive profits, the long-term secular trend of streaming entertainment should continue to provide a huge boost. By the end of 2023, there will be more households that don't have a cable-TV subscription than those that do, according to eMarketer. And according to Nielsen, streaming commanded the highest share of total TV viewing time in the U.S. in February. These underlying trends can continue to support Roku's growth well into the future. 

That's because Roku positions itself as a three-sided ecosystem that connects viewers with all their favorite streaming services, while giving advertisers a way to target this engaged audience in a connected-TV environment. Because there are numerous streaming services, consumers find incredible value in being able to access all of them in one place. According to the management team, Roku has leading market share among smart-TV operating systems in the U.S. And even in a difficult year last year, Roku's active accounts grew 16% and hours streamed were up 19%, demonstrating strong user gains and engagement.  

Wall Street consensus analyst estimates call for Roku's revenue to increase at a compound annual rate of 10.6% between 2022 and 2027. And in 2027, analysts see the business getting to positive net income, which is probably something that all shareholders would love to see from a company focused fully on achieving growth no matter what. 

For those investors who believe that Roku's long-term opportunity outweighs its recent challenges, this stock looks like a screaming buy at its current valuation.