With the stock market still near all-time highs, it might feel like there's not a stock worth buying. This is where your best bet may be to look past the traditional valuation metrics and find opportunities the rest of the market is beating up. 

Our contributors have identified three stocks -- Under Armour Inc (NYSE:UAA) (NYSE:UA)Rite Aid Corporation (NYSE:RAD), and Core Laboratories N.V. (NYSE:CLB), -- that share two traits: They've all been beaten down pretty badly over the past couple of years, and we also think they're ready to bounce back. And while traditional metrics don't make these stocks cheap -- even after all of the beating -- opportunistic and patient investors could do very well with these companies. 

Man trying to compensate the losses by pulling up the charts.

Image source: Getty Images.

Keep reading to learn why these three stocks are primed to bounce back from the market's rough treatment. 

Under Armour stumbles, but its long-term story is intact

Seth McNew (Under Armour Inc): Shares of Under Armour took a serious beating after each of its last two quarterly releases as sales growth slowed and the investments made that were supposed to be leading to continued high growth left earnings looking weak. Analysts hammered the company for missteps with product launches and CEO Kevin Plank's political comments -- which were very publicly denounced by the brand's own top sponsored athletes -- and the stock has been cut in half in the last year.    

Still, Under Armour's long-term growth story looks intact. The company gets only about 15% of sales from international markets, but that grew 63% in 2016, year over year, and Under Armour continues to push in important markets like China, where the brand seems to be gaining a lot of traction thanks to the local affinity for the NBA and Under Armour ambassador Steph Curry. In the U.S., Under Armour has struggled in 2016 because of Sports Authority filing bankruptcy, but the company is diversifying among retailers, such as Kohl's, which just started selling Under Armour gear this spring as well as focusing on e-commerce and direct to consumer channels.

Then there's the much longer-term initiatives, like Under Armour's investments in manufacturing technology and the announced deal to outfit the MLB starting in 2020, which could provide new paths to sustained growth in the years ahead. Under Armour certainly has challenges ahead of it, but the company seems to be doing the right things to reignite its brand. Meanwhile, the stock is trading at just 1.7 times sales, a low valuation for this young brand that looks to have plenty of room to run. 

There's a clear catalyst that could drive a huge pop in these shares

Chuck Saletta (Rite Aid Corporation): The troubled drugstore chain keeps finding itself hanging around 52-week low lists. That's not where you'd ordinarily expect to see a company with a buyout offer waiting for it, but it's exactly where Rite Aid is today.

Rival drugstore titan Walgreens Boots Alliance has agreed to buy Rite Aid for between $6.50 and $7.00 per share. That buyout offer makes Rite Aid's recent market price of $4.25  an incredible bargain -- as long as the merger really goes through. With a decision on the merger expected within the next three months or so, that's a 50% to 65% potential pop in a matter of months.

The steep discount to the buyout price reflects the risk that the deal won't be approved. The buyout price was already lowered from $9.00 to that $6.50 to $7.00 range in part because of regulatory concerns prompting the sell-off of more stores than originally anticipated, so there is risk the deal could be denied. If the deal does get completely denied, Rite Aid's shares could have even more room to fall. As a stand-alone, Rite Aid is barely profitable and is trading at nearly seven times its book value.

The deal has been out in the public since October 2015, and the fact that we're nearly eighteen months since the announcement without a clear answer on approval simply adds to the uncertainty. The one thing that's absolutely clear, though, is that if the deal is approved on terms anywhere near the current arrangement, Rite Aid's shares have plenty of room to bounce from current prices.

The most-connected company in oil says the recovery is coming 

Jason Hall (Core Laboratories N.V.): While Core Lab isn't a household name for the uninitiated, you can rest assured there's not a single oil or gas producer on earth that's not familiar with the company. This is because Core Lab's business is helping producers get the most oil and gas out of the ground for the lowest cost. And the company is very, very good at what it does. 

While that hasn't made Core Lab immune from the oil downturn -- its shares are down more than 40% over the past three years -- it has helped the company remain profitable through even the worst of the current oil cycle.

CLB EPS Diluted (TTM) Chart

CLB EPS Diluted (TTM) data by YCharts.

The company's business model has also helped. Core isn't a traditional "picks and shovels" company, relying on its proprietary technology to analyze and provide data producers can use to improve production. This means it has a more advantaged cost structure that makes it easier to ride out downturns while being incredibly well-positioned for the recovery. 

And Core has already started seeing a recovery. The company has reported sequential improvements in both revenue and profits for two quarters now. Furthermore, CEO David Demshur said on the earnings call that global oil markets have actually been undersupplied in recent months, a move that will go a long way toward reestablishing supply and demand. 

This will drive more oil production, which will mean more business (and profits) for Core. That's a great recipe for a bounce-back for shareholders.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.