The year has turned out to be good for the stock market so far despite bouts of volatility. While the S&P 500 has gained 8% in 2023, the tech-laden Nasdaq-100 has rallied nearly 20% so far. This explains why shares of Meta Platforms (META 2.98%) and Roku (ROKU 5.41%) have been on fire in 2023.

While Meta stock shot up a whopping 82%, Roku has delivered terrific gains of 58%. Investors might find the big jump in shares of Meta and Roku a tad surprising, given that both companies are coming off a difficult 2022 and are expected to report tepid growth in 2023. But a closer look at their long-term prospects and valuations will tell us why investors should buy these hot stocks before they surge higher.

1. Meta Platforms

Meta Platforms' 2022 revenue was down slightly over the prior year to $116.6 billion thanks to the weakness in the company's advertising business, but analysts are anticipating a turnaround to take shape this year. Consensus estimates suggest that Meta's 2023 revenue could increase by 5% to $122 billion.

More importantly, Meta's focus on reducing costs in 2023 is expected to help increase its earnings to $9.68 per share from $8.59 per share last year, when it witnessed a big 38% drop in earnings. These are probably the reasons Meta has a Street-high price target of $305 according to a consensus of 46 analysts, which points toward a 39% jump from current levels.

With Meta stock trading at 22 times forward earnings compared to the Nasdaq-100's forward earnings multiple of 26, investors still have an opportunity to buy it at an attractive valuation given the potential upside on offer. Meta's bottom-line growth is also expected to gather pace in 2024 and beyond.

Chart showing Meta's EPS estimates rising for the next 3 fiscal years.

META EPS Estimates for Current Fiscal Year data by YCharts

That won't be surprising, as Meta is on track to take advantage of the secular growth in digital advertising. It's developing artificial intelligence (AI)-backed tools to tap this market. Digital ad spending is expected to jump from $567 billion in 2022 to $835 billion in 2026, and AI will likely play an important role in this massive market. The use of AI in marketing is estimated to grow at an annual pace of 25% through the end of the decade, which explains why Meta is taking steps to deploy generative AI-backed advertising tools.

Meta plans to launch a commercial generative AI service by the end of the year. Meta Chief Technology Officer Andrew Bosworth told Nikkei in an interview this month that Meta's large language model can help advertisers generate relevant images that could reduce costs and improve ad effectiveness.

Meta is a key player in the digital ad market, with advertising revenue of $113.6 billion in 2022. The company ended 2022 with 2.96 billion daily active people across its family of apps, which was an improvement over the 2.82 billion daily active people in the year-ago period. This massive user base and AI-enabled advertising tools could help Meta attract more ad spending in the long run and help the company maintain its strong position in the lucrative digital ad space.

It won't be surprising to see Meta's top-line growth gather momentum from next year as analysts expect.

Chart showing Meta's revenue estimates level or rising slightly for the next 3 fiscal years.

META Revenue Estimates for Current Fiscal Year data by YCharts

All this indicates that Meta Platforms could remain a hot growth stock in the long run, which is why investors may want to buy it before it's too late.

2. Roku

Roku is another hot growth stock that investors can buy cheaply right now despite its impressive rally. The stock is trading at just 2.8 times sales, which makes it only slightly more expensive than the S&P 500's price-to-sales ratio of 2.4. It's also worth noting that Roku stock is trading at a significant discount to its five-year average sales multiple of 12.

Buying the stock at its current valuation looks like a no-brainer. The TV streaming platform provider is coming off a strong 2022, where its revenue increased 13% to $3.1 billion despite macroeconomic difficulties. The company's active account base increased to 70 million at the end of 2022 from 60 million in the prior year. Streaming hours increased by 14.3 billion hours to 87.4 billion, while the average revenue per user (ARPU) was up 2% year over year to $41.68.

Roku should be able to sustain its robust growth thanks to the growing adoption of TV streaming platforms and its solid position in this market. The company claims to be the largest TV streaming platform in terms of hours streamed in the U.S., Canada, and Mexico. It's also gaining traction globally, with the number of streaming hours per active account per day increasing to 3.8 in the fourth quarter of 2022 from 3.6 hours in the year-ago period.

The good news for Roku is that there's still a lot of room for growth in the North American video streaming market. The annual revenue generated by video streaming is expected to increase from $36 billion in 2022 to $59 billion in 2027. ARPU is expected to increase from $212.70 last year to $273.80 in 2027. It won't be surprising to see Roku add more users to its platform in the long run.

The growing spending on connected TV (CTV) advertising could be another tailwind. Roku is the leading player in CTV advertising, an ad channel that reached 94% of U.S. households in the first half of 2022. Roku controlled an impressive 44% of the CTV ad market, well ahead of Samsung's 17% share.

With CTV ad spending in the U.S. expected to jump to $43 billion in 2026 from last year's estimate of $21 billion, Roku's healthy share of this market puts it in a solid position to grow its revenue and earnings at a nice clip. Not surprisingly, analysts are expecting 43% annual earnings growth from Roku over the next five years.

The company's cheap valuation, the lucrative end-market opportunity, and the rapid growth Roku is expected to deliver make it an ideal bet for investors looking to buy a fast-growing company without having to pay through their noses.