Are you hesitant to jump back into the stock market? After watching the major market indexes fall for more than a year, it's easy to understand why many investors would rather stay on the sidelines.

While it may seem like a good time to avoid buying stocks, many of the world's most successful investors know it's the stocks they buy during downturns that make them the most money over the long run. 

These two stocks have tumbled more than 80% from their previous peaks even though their best days are up ahead. Here's why you could end up regretting not scooping up some of their shares off the floor and tucking them into your portfolio.

Roku

Shares of Roku (ROKU 1.91%) are down about 88% from the peak they set way back in 2021. Fear of a looming recession is largely to blame for its tumbling stock price.

You probably think of Roku as a manufacturer of streaming sticks and Roku-enabled televisions but it's the company's rapidly growing advertising and distribution businesses that attract savvy investors. By hours streamed it's the most popular platform in North America and it keeps growing. The number of active accounts at the end of March was up 17% year over year at 71.6 million.

Fear of a deep recession caused advertisers to spend a lot less than usual during the first quarter. According to Roku, traditional TV ad purchases in the U.S. market declined 12.7% year over year in the first quarter. Roku reported platform revenue that declined by just 1% over the same time frame.

The Roku operating system is built from the ground up to monetize television streaming, and it's helping Roku pull market share away from linear TV that can't offer the same benefits. For example, Roku recently announced a new partnership with Instacart that will allow consumer packaged-goods advertisers to measure how often viewers buy advertised products in real time.

Roku also announced a new tactic that will accelerate big brand advertisers' shift to streaming platforms. A new primetime reach guarantee will allow up-front ad buyers to reach more TV households than an average program on a top-five cable network with a level of confidence linear TV can't offer.

Roku has fallen a long way from its previous peak, but the stock is still risky. The company still doesn't know when it will be able to report profits according to generally accepted accounting principles (GAAP). While it's a stock you could regret not buying on the dip, it's only appropriate for investors at the upper end of the risk tolerance spectrum.

Pubmatic

Pubmatic (PUBM -0.14%) is another increasingly important player in the rapidly shifting digital advertising arena. Publishers list their available ad inventory on Pubmatic's platform, where ad buyers come to place roughly 1.4 trillion bids on available inventory every day.

At the end of 2022, display ads that show up on third-party websites made up roughly two-thirds of Pubmatic's business, but this is changing. Display ad sales fell sharply in the fourth quarter, but video ad sales are soaring.

You probably know that a flood of subscription-based streaming services drove Netflix to begin offering an ad-supported tier this year. What you might not realize is how quickly big brand advertisers that generally avoid third-party websites and social media feeds jump at a chance to display their ads alongside premium content.

Bolstered by a partnership with Roku, Pubmatic reported fourth-quarter revenue from connected television (CTV) ads that more than doubled year over year. If CTV ad sales can rise sharply during an industry downturn, just imagine what could happen once overall ad spending returns to normal.

Pubmatic is well positioned to gain from the rapidly shifting market for digital ads but its stock price doesn't reflect the opportunity. Now that it's down nearly 81% from its former peak, the stock's trading for just 27.1 times trailing earnings. Scooping up some shares now and holding them in a well-diversified portfolio looks like a smart move.