In June 2022, the benchmark S&P 500 stock market index officially closed 20% below its all-time high. There was general agreement among Wall Street analysts that a bear market had officially begun, and the index continued to slide until October. Last month, the S&P 500 marked a 20% gain from that October low point, and some on Wall Street began declaring the beginning of a new bull market. Not everybody agrees (many experts think the index also needs to reclaim its previous all-time high) that the bear has been forced back into hibernation just yet. 

What's the average investor supposed to do with all this? For the long-term investor, it doesn't really matter all that much. Focusing on the long term smoothes out this type of noise and increases the probability of generating a positive return. It's more important to remember that the S&P 500 has always recovered to new highs throughout history, given enough time. 

Ahead of the next bull market, there are two stocks long-term investors might want to look at, in part, because they are still trading at a steep discount to their all-time highs. Buying them now might pave the way for strong returns, regardless of when the next bull market does officially start.

1. Zscaler: Down 60% from its all-time high

Cyber risks grow each day for companies that run their operations online using cloud computing. The cloud helps organizations tie their businesses together in the digital sphere across borders, connecting departments and reaching customers no matter where they're located. It also facilitates remote work for employees, which allows companies to access a global talent pool. But all that remote access also creates vulnerabilities. Zscaler's (ZS 1.28%) cybersecurity tools are designed to eliminate those vulnerabilities.

Zscaler's Zero Trust technology adds extra layers of verification for those wanting to access the network. It looks at the device being used and the location of the login attempt to determine whether it's the remote worker or a malicious actor.

That sounds secure but it isn't always enough, because attackers are constantly growing more sophisticated. Zscaler also secures workloads through the Zero Trust Exchange, which means each employee is only assigned access to the online applications they need to do their jobs. Even if there is a login breach in one segment of the network, a hacker can't gain access to the rest.

Artificial intelligence (AI) powers all of this security behind the scenes. The Zero Trust Exchange ingests 300 trillion signals into its models and fends off 9 billion attacks on behalf of customers each day, making it the largest security cloud in the world. Over 6,000 businesses use Zscaler and, as that number grows, its AI models will have access to more data and become more proficient at protecting customers. 

Zscaler's stock is down 60% from its all-time high since November 2021, fueled in large part by the broader sell-off in the tech sector. The stock price has bounced 32% this year, signaling the start of what could be a much stronger recovery. Why? Because Zscaler is one of few companies consistently beating its revenue targets and increasing its forecasts, despite tough economic conditions.

It generated $418 million in revenue during fiscal 2023's third quarter (ended April 30), which was up 46% year over year and well above its prior guidance. As a result, the company raised its full-year revenue forecast to $1.6 billion, marking the third forecast increase in fiscal 2023.

That kind of operational performance offers strong hints that Zscaler stock is worth considering for those who anticipate a new bull market. 

2. Redfin: Down 87% from its all-time high

Redfin (RDFN 8.49%) is in a totally different situation to Zscaler. It's a real estate technology company suffering from economic headwinds stemming from rising interest rates. It's also in the middle of a major restructuring. This has led to plenty of volatility with Redfin stock trading 87% below its all-time high, but also trading up a whopping 188% in 2023.

In 2022, Redfin elected to close its RedfinNow iBuying business, which involved buying homes directly from willing sellers and attempting to flip them for a profit. With higher interest rates, the threat of a fall in real estate prices loomed, and RedfinNow faced the prospect of significant financial losses on its inventory of already-purchased homes. Management was duly concerned and started liquidating the iBuying segment. The segment accounted for almost half of Redfin's total revenue, so the closure had a major impact on its top-line results. It also created an eventual path to profitability for the company, which is a welcome trade-off.

Redfin now focuses on its service-based segments, which are capital light. Its real estate brokering business is the largest of them. The company employs 1,876 lead agents, who cover 98% of U.S. geographic markets, which allows Redfin to focus on volume by charging listing fees as low as 1%, compared to the 2.5% that small agencies normally charge. 

Redfin's mortgage business is also gaining momentum following its acquisition of Bay Equity Home Loans in 2022. In the first quarter of 2023 (ended March 31), approximately 20% of Redfin homebuyers borrowed from its mortgage division, compared to just 4% one year ago. 

Additionally, Redfin recently built a plug-in for the AI chatbot ChatGPT, which home buyers can prompt to find their ideal house. Rather than spending hours scrolling through listings online, they can simply describe what they want to ChatGPT and the chatbot will retrieve all the available Redfin properties that meet their criteria. Reducing friction could theoretically result in faster sales.

Redfin's revenue crashed by 45% year over year during Q1, primarily due to the absence of RedfinNow. But on a positive note, management says the renewed focus on services could result in the company generating positive adjusted earnings before interest, taxes, depreciation, and amortization (EBITDA) for the 2023 full year. 

Wall Street analysts predict Redfin's total revenue will return to a modest growth rate in 2024. There's upside potential because some experts believe the U.S. Federal Reserve could start cutting interest rates early in the new year. If that happens, real estate prices could gather momentum, which would be great for Redfin's brokering and mortgage businesses in particular. That makes Redfin a great stock to carry into a new bull market.