Bear markets are never easy to navigate, and the Nasdaq 100 technology index is on pace for the worst annual decline since the 2008 global financial crisis. But one hallmark of every market downturn is opportunity: High-quality stocks often overshoot to the downside amid broader declines which are driven largely by fear.

A panel of Motley Fool contributors have identified Advanced Micro Devices (AMD 1.14%), Datadog (DDOG -0.45%), and Shopify (SHOP 1.25%) as three opportunities investors should consider buying on the dip, as each stock is trading at a steep discount to its all-time high. Let's explore the details.

A best-in-class semiconductor stock trading at a 65% discount

Anthony Di Pizio (Advanced Micro Devices): Semiconductors are the advanced computer chips essential to our most prized electronics, and the cloud computing technology that hosts our online experiences. Advanced Micro Devices is a world-class semiconductor producer, and it's one of the most diverse in the entire industry.

The company makes hardware for both the Sony PlayStation 5 and the Microsoft Xbox gaming consoles, and its chips are responsible for powering the infotainment systems in Tesla's electric vehicles. But that's not all: It also works with all the top providers of cloud services, from Amazon Web Services to Microsoft Azure to Alphabet's Google Cloud.

Now, AMD is set to take a leadership position in high-performance computing thanks to its $49 billion acquisition of Xilinx earlier this year. Xilinx is a pioneer in adaptive computing, which could be the future for advanced technologies like artificial intelligence (AI). Mainstream semiconductors are often in a solid state, meaning they need to be swapped out for new ones when it's time to upgrade. But adaptive chips can adjust to the user's needs in real time and can be reconfigured even after the manufacturing process -- shortening the upgrade cycle.

AMD just reported disappointing preliminary results for the third quarter of 2022, booking $5.6 billion in revenue, for growth of just 29% year over year. However, the data center segment continued to shine with $1.6 billion in revenue and a growth rate of 45%. The company's greatest opportunities over the long run could be in the data center, especially when it comes to applying adaptive technologies, so it's promising to see the segment remaining strong.

Plus, according to analysts' expectations, the company remains on track to grow total sales by 45% for the whole of 2022, to $23.8 billion. With AMD stock down 65% from its all-time high, this could be a prime opportunity to take a position.

An appealing balance between growth and profitability, now at a 58% discount

Jamie Louko (Datadog): Technology and software companies have fallen out of favor with investors lately, but that doesn't mean there aren't high-quality businesses in the space. While many investors have fled from the tech sector, companies like Datadog have continued to post stellar adoption rates and profits.

Datadog operates application observability and performance monitoring software, which helps customers ensure that their digital applications and tech infrastructure are running smoothly and effectively. This is a must-have service for customers, so it makes sense that demand has remained relatively stable this year, despite the concerning economic backdrop. According to Gartner, Datadog is a leader in the space; this helped the company achieve 74% year-over-year top-line growth in Q2, reaching $406 million in revenue.

Importantly, Datadog has profit and cash flow coming in, signaling that it isn't sacrificing profits to achieve artificially higher growth rates. Over the trailing 12 months, Datadog generated almost $354 million in free cash flow -- for a 26% margin -- while keeping net income at $6.5 million.

This cash flow can help the company do something critical to continue thriving in this space: innovate. Competition is fierce in the application performance monitoring space, with immense pressure from established rivals like Dynatrace. For Datadog to maintain its leadership status, it must continue to build and release new products for customers, and the company has done that. As of August, Datadog had announced the rollout of six products in 2022, and it expects to roll out even more by year's end.

With shares down 58% from all-time highs, Datadog's valuation has fallen from an egregious multiple to a much more acceptable one; shares trade at 74 times free cash flow. While that's still expensive on an absolute basis, it's far lower than earlier this year, when the stock was valued as high as 200 times free cash flow.

Considering the company's leadership and flawless execution in an industry expected to be worth $53 billion in 2025, Datadog looks worth paying up for.

The market leader in e-commerce software, at an 82% discount

Trevor Jennewine (Shopify): Shopify makes it easy for merchants to manage an omnichannel business. Its software helps sellers build direct-to-consumer (D2C) websites, and it also integrates with online marketplaces like Amazon and social media like Alphabet's YouTube. Shopify sweetens the deal with adjacent services including discounted shipping, financing, and payment processing.

The comprehensive nature of its offerings has made it popular with small businesses, though Shopify Plus -- a more customizable option for larger businesses -- is also gaining traction. In fact, Shopify and Shopify Plus rank as the top two e-commerce platforms in terms of market presence, according to G2 Grid, and Shopify powered 10.3% of online retail sales in the U.S. last year, second only to Amazon.

Despite that strong market position, Shopify has struggled with high inflation this year, as evidenced by its disappointing financial results. Revenue climbed just 16% in the second quarter, and the company posted a non-GAAP (adjusted) loss of $0.03 per diluted share, down from a non-GAAP profit of $0.22 per diluted share in the prior year. As a result, Shopify has seen its share price plunge 82% since last peaking in November 2021.

However, investors need to focus on the big picture. Shopify actually continued to gain market share in U.S. retail, both online and offline, through the first half of 2022. Moreover, temporary economic headwinds leave the long-term investment thesis unchanged: Shopify is the leading e-commerce software vendor, and it has a particularly strong foothold in the U.S. That bodes well for the future, as online retail sales in the U.S. will grow faster than 12% annually to approach $1.7 trillion by 2026.

But Shopify is also working to strengthen its position and expand its market opportunity. For instance, it recently added business-to-business (B2B) commerce tools to Shopify Plus, so Plus merchants can now sell D2C and B2B from the same platform. That could be a game changer for a couple of reasons. First, it makes Shopify a more compelling option for larger sellers. In fact, management says more than half of existing Plus merchants could utilize B2B tools. Second, it should allow Shopify to capitalize on the massive B2B market. For context, global B2B e-commerce sales are expected to grow at nearly 20% annually to reach $33 trillion by 2030, according to Grand View Research.

Currently, Shopify is bouncing off a 52-week low, and shares trade at an inexpensive 7.5 times sales. That's why this beaten-down growth stock is worth buying now.