In both good times and bad, shoppers typically love a bargain -- except in the stock market. Investors tend to perceive discounted prices as a concerning sign for either stocks or the environment in which they operate.

But while the difficulties that led to the discounted prices are often real, traders can sometimes overreact in their efforts to sell, and that tendency can increase the potential for elevated returns when high-quality companies get oversold. The latest example of this involves growth tech stocks Qualcomm (QCOM 2.19%) and Shopify (SHOP -3.41%). The opportunities related to these two stocks in 2022 and beyond appear especially promising. Let me explain.

1. Qualcomm

Qualcomm has led the market in smartphone chipsets since it oriented its company toward that business in 1998. In the 5G world, it continues to dominate the smartphone chipset market. Moreover, Grand View Research forecasted a 69% compound annual growth rate through 2028, virtually assuring Qualcomm will benefit from the upgrade cycle.

Furthermore, Qualcomm continues to prepare for the day when fewer functions take place on a smartphone. To this end, it powers the Oculus VR goggles made by Meta Platforms. It also has invested heavily in the metaverse and ventured into IoT and automotive applications.

Yet despite that potential for rapid growth, the stock continues to lag, falling by nearly 40% from the year's high. Slowing consumer spending negated the optimism about 5G upgrades, at least temporarily. Also, with the U.S. restricting some chip exports to China, investors are more concerned. As of last year, China accounted for about two-thirds of Qualcomm's revenue.

But for all the revenue worries, analysts expect revenue for fiscal 2022 (which ended in late September) to rise 22% at the midpoint to around $11.4 billion. They also project a consensus 47% gain in net income.

And though China remains an ongoing concern, Qualcomm's P/E ratio fell to 10. This is a lower earnings multiple than every major chip company except for Intel, which, unlike Qualcomm, does not currently lead its market. That indicates that any trouble is likely priced into the stock and that it should rebound once conditions improve.

2. Shopify

Shopify is now the leading platform in the U.S. for e-commerce, accounting for 33% of the market, according to Oberlo. It took this lead by emphasizing low-cost, versatile, speedy websites. Additionally, Shopify has built an ecosystem that can address issues such as payments, capital, inventory, and even fulfillment.

Moreover, its fulfillment business, known as the Shopify Fulfillment Network (SFN), is an enterprise with little relationship to software. That willingness to venture outside of software allows Shopify to transcend competitors who lack capabilities outside the software realm.

That has likely intensified a rivalry with Amazon (AMZN -0.68%), a company with a market cap more than 30 times as large as Shopify's $38 billion market cap. Indeed, Amazon seems to have targeted Shopify directly. Investors sold off Shopify earlier this year when Buy With Prime extended its free two-day shipping to third-party merchants, potentially making Amazon a more direct competitive threat. The move is partially why Shopify stock is down by nearly 85% from its 12-month high.

However, Shopify may benefit from other news that no one's talking about: Amazon recently announced plans to shutter or cancel warehouses amid slowing sales growth and operating losses in its North America e-commerce segment. This comes as Shopify invested heavily to build out its fulfillment network.

Amid those investments, analysts forecast revenue for Shopify of about $7.5 billion for 2022, rising 24% from year-ago levels. Admittedly, slowing growth across the e-commerce segment and significant investments in its fulfillment network will probably lead to Shopify returning to losses in 2022.

Still, the expanding fulfillment capabilities should boost Shopfiy's long-term revenue and earnings potential. And with the drop in the stock price, the price-to-sales (P/S) is down to seven, a level that hovers near record lows. Assuming Shopify can make gains as Amazon retrenches, investors who buy now get an opportunity to get in on outsized long-term gains.