The benchmark S&P 500 stock market index is currently trading in bear territory with a year-to-date loss of 20%. Bear markets can be unnerving, and while it feels like things aren’t improving in the near term, we might be closer to the end than you think. That’s because the average bear market (going back to 1929) lasts about nine and a half months. Since the S&P 500 officially entered bear territory in mid-June 2022, it suggests we could be just three months away from a reversal and a new bull market. Of course, it will depend on how quickly key economic headwinds (especially high inflation and rising interest rates) resolve, but history shows that the stock market is forward looking and often moves before such events materialize. That’s why now might be an opportune time to buy quality stocks that are trading at steep discounts. The share prices of DigitalOcean (DOCN -2.20%) and Zscaler (ZS -3.02%) both fell to new 52-week lows this week, but here’s why that doesn’t reflect the strong performance of their underlying businesses. 1. DigitalOcean is walking with cloud giants Almost all businesses are using the cloud in some way whether they realize it or not. It’s the technology that powers digital capabilities like storing files online or running a website. That’s why the cloud industry is on track to become a $1.5 trillion annual opportunity by the end of this decade. The industry is dominated by giants like Amazon Web Services (AWS) and Microsoft Azure, but DigitalOcean has carved out a lucrative niche serving small-to-mid-sized organizations, usually with under 500 employees. The more intricate needs of these customers are often overlooked by the larger players, so DigitalOcean is scooping them up by competing on price and service. It’s paying off handsomely, because in the recent third quarter (ended Sept. 30), DigitalOcean grew its revenue 37% year over year, which was faster than both AWS and Microsoft’s intelligent cloud segment. The company had a record-high 142,100 paying business customers, and its average revenue per customer also reached an all-time high of $79.22, which translated to $152 million in revenue for the quarter. But this growth story is just getting warmed up. DigitalOcean has outlined plans to reach $1 billion in annual revenue by 2024, and considering it’s on track to generate $574 million in 2022, that means there could be 74% growth on the table over the next two years alone. Plus, the company expects its addressable market will more than double from $72 billion this year to $145 billion in 2025, so even if it achieves its revenue goal, it will have only scratched the surface of its opportunity. With DigitalOcean stock down 80% from its all-time high — and after touching a new all-time low in just the past week — now is a great time to buy ahead of a new bull market. 2. Zscaler continues to grow at a scorching economic pace slowdown? Not for the cyber security industry. As more businesses move to the cloud, their digital assets require increasingly advanced protection to fight off attackers who can now be located anywhere in the world. That’s why, according to a survey by Morgan Stanley, cybersecurity is the last expense of many large organizations intending to cut, even if a recession hits. Zscaler is the developer of Zero Trust technology, which is designed to protect companies in the age of remote work and complex digital networks. As the name implies, with Zero Trust enabled, anyone attempting to access a network is treated as hostile. The technology seeks to validate employees not only based on their login credentials (like most traditional technologies) but also through context by analyzing their location and device, for example. Plus, Zscaler’s Zero Trust Exchange connects employees only to the applications they need to access rather than the whole network itself. This means if a bad actor does penetrate the security barrier, they can’t move laterally or jump across to different areas of the network. It’s surprising that this type of security is in high demand. In the first quarter of fiscal 2023 (ended Sept. 30), Zscaler delivered $355 million in revenue, which was a whopping 54% jump year over year. The company has already increased its full-year forecast for fiscal 2023 after just one quarter, now guiding for $1.53 billion in total sales. Zscaler’s customer metrics are rock solid. The number of organizations spending at least $1 million annually with Zscaler came in at 340 in the latest quarter, up 55% from the same time last year. Its net retention rate firm held at 125%, meaning existing customers are spending 25% more with the company each year. Nonetheless, Zscaler stock is hovering near its 52-week low. That might spell opportunity for investors, especially since the stock has the overwhelming support of Wall Street — not a single one of the 39 analysts tracked by The Wall Street Journal recommends selling. John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool’s board of directors. Anthony Di Pizio has no position in any of the stocks mentioned. The Motley Fool has positions in and recommends Amazon.com, DigitalOcean, Microsoft, and Zscaler. The Motley Fool has a disclosure policy.