Surging inflation, rising interest rates, and fears of a recession have all contributed to the markets sliding into bear territory this year. The Federal Reserve's hawkish stance on raising interest rates is expected to hurt stocks even further. However, some analysts at Bank of America are estimating that the next bull market could arrive in October this year. What's more, the investment bank's analysts point out that the average bull market lasts 64 months and fetches a return of 198%.

Investors that agree with these analysts would be wise to start setting up their portfolios for long-term gains and buy fast-growing companies with bright prospects on the cheap while the stock market is still down. Assuming you have $10,000 to invest right now, the likes of Twilio (TWLO -2.99%), ASML Holding (ASML -0.73%), and Unity Software (U -3.48%) could turn out to be great buys given their potential for delivering long-term gains. Let's see why these three stocks offer up so much opportunity.

1. Twilio

Twilio's solutions allow companies to move their contact centers into the cloud and away from the traditional, physical locations. Its APIs (application programming interfaces) are used by companies to integrate voice, messaging, text, video, and email into their platforms to facilitate communication with customers.

Cloud-enabled customer service associates simply need the internet and a device such as a smartphone or laptop to connect with customers. This gives them the flexibility to work remotely and allows organizations to lower infrastructure costs. Not surprisingly, the demand for cloud-based contact centers is expected to increase at an annual rate of nearly 25% through 2030 and hit $45 billion in revenue, according to a third-party estimate.

Twilio has generated just over $3.1 billion in revenue over the trailing 12 months, which means that it's scratching the surface of a massive opportunity. The good part is that Twilio's already making the most of the cloud contact center market, as its growth indicates.

The company's first-quarter revenue increased 48% year over year to $875 million. It's anticipating 37% year-over-year revenue growth in the current quarter, and analysts expect Twilio to finish the year with 36% revenue growth. What's more, Twilio's top line is expected to jump another 29% next year, while its earnings are forecast to increase at a tremendous annual rate of 155% for the next five years.

With Twilio's stock price down 68% in 2022 and trading at 4.8 times sales as compared to its five-year average sales multiple of 17, buying it right now looks like a no-brainer as it could soar significantly in the long run.

2. ASML Holding

Semiconductor manufacturing equipment supplier ASML is another stock investors can buy at a relatively cheap valuation now following its 40% drop this year. At 35 times trailing earnings, ASML is cheaper than its five-year average earnings multiple of 40.

Buying this Dutch giant while it's still down should turn out to be a smart long-term move, as the demand for its chipmaking equipment is healthy. This was evident from ASML's massive order backlog of 29 billion euros at the end of the first quarter of 2022. To put things in perspective, ASML had generated 18.6 billion euros in revenue in 2021, and it expects its top line to grow 20% this year to just over 22.3 billion euros.

ASML's backlog indicates that its outstanding growth is here for the long run. This explains why analysts are expecting nearly 30% annual growth from the company for the next five years. It won't be surprising to see ASML clock such strong growth consistently, as it dominates the market for lithography machines that help foundries make chips, with a share of over 90%.

Each semiconductor manufacturing machine from ASML reportedly costs $160 million. Chipmakers such as Taiwan Semiconductor Manufacturing and Intel have been lining up to buy ASML's machines, as its backlog indicates. And now, ASML is reportedly working on a more advanced machine that could cost $400 million apiece and help foundries make more efficient and powerful chips. The good part is that ASML has already received more than 10 orders for these machines, even though they're still in the prototyping phase.

With the world's thirst for semiconductors expected to increase substantially by the end of the decade, ASML could turn out to be a top semiconductor bet thanks to the key role it's playing in alleviating the chip shortage.

3. Unity Software

It has been a terrible 2022 for Unity Software, as the stock price has crashed 72.6% year to date. Though the company has been growing at an impressive pace, weaker-than-expected guidance for the second quarter of 2022 sent investors panicking last month.

However, savvy investors should look at the bigger picture, as Unity is on track to deliver solid growth in 2022. The company anticipates revenue to increase 25% this year to $1.38 billion. Even better, analysts expect Unity to step on the gas from next year with estimated revenue growth of 31% for 2023. The company's bottom line is expected to clock nearly 70% annual growth over the next five years.

Analysts are upbeat about Unity's future because of the markets it serves. Unity is known for its gaming engine that allows creators and developers to make video games for personal computers, consoles, iOS, Android, and MacBooks. This is a highly popular platform with a market share of 48%. Third-party research forecasts that the demand for gaming engines is set to increase at an annual pace of 13.7% through 2030. Unity's solid market share puts it in a nice position to take advantage of this space.

The company's solutions are also gaining traction in additional applications such as architecture, real estate, automotive, retail, and digital twins. These could unlock a multi-billion-dollar market for Unity to tap and accelerate the company's long-term growth. All this makes Unity an attractive tech stock to buy right now following its big drop in 2022, which brought down the stock's sales multiple to 8.5, compared to last year's multiple of 40.