Sometimes the best opportunity to buy a stock is when the market has trashed it, sold it off, and left it for dead. But that can also work out to be the absolute worst time to invest, too. What's the difference? In short, it's whether the market is right or not about the prospects of the underlying company. 

With this in mind, we asked three of our top energy and materials contributors to write about a stock that's had Mr. Market take it behind the woodshed recently -- and to discuss whether they're worth buying at this point or best left alone. They came up with gold producer Barrick Gold Corp (USA) (GOLD -1.12%), uranium miner Cameco Corp. (USA) (CCJ 0.06%), and offshore driller Seadrill Ltd. (SDRL)

Two lightbulbs separated by a line, with "risk" and "reward" written under them.

Image source: Getty Images.

Keep reading to learn whether these stocks, which have all fallen between 33% and 99% from their highs, are steals at recent prices, or more likely to steal from you. 

This gold stock is cheap 

Neha Chamaria (Barrick Gold Corp.): Barrick Gold was gleaming until an unexpectedly disappointing set of first-quarter numbers in mid-April cut short the gold stock's strong rally that lasted several months. Barrick is now down almost 19% since, leaving investors wondering where the stock's headed. I believe the gold titan has a good chance of bouncing back from here.

I don't blame investors for becoming wary after Barrick reported higher all-in sustaining costs (AISC) for its first quarter and downgraded its full-year production guidance. However, scratch the surface and you'll realize that things really aren't that bad. The production downgrade came largely because Barrick sold off a 50% stake in its Veladero mine to China-based Shandong Gold Group for roughly $960 million. Furthermore, Barrick reiterated its full-year AISC guidance of $720 to $770 an ounce despite lower production. At those levels, Barrick would still be the most cost-efficient gold producer among the publicly traded gold companies.

There's no denying that Barrick has had its fair share of challenges that have spooked investors, including the three cyanide spills at Veladero that attracted regulatory action and halted production at the mine. However, regulators reportedly just lifted production restrictions on Veladaro, and I believe Barrick management will do its best to avoid further missteps. Meanwhile, Barrick continues to deleverage and target free-cash-flow breakeven at gold prices of $1,000 an ounce, which should help it generate strong margin. At less than 7 times price to cash flow, Barrick is a great deal at current prices.

10-year lows

Reuben Gregg Brewer (Cameco Corp.): Looking for a fire sale? How about a stock that's down more than 80% over the past decade and still sitting around its 10-year low? That would be uranium miner Cameco. To be fair, there's a good reason for the steep price decline: The price of uranium hit a 12-year low in 2016, and there doesn't appear to be a near-term catalyst for a rebound.  

Despite the long downturn, however, Cameco remains in fairly solid shape. For example, long-term debt makes up only around 20% of the capital structure, and it has a current ratio of more than 5. That's after a 12-year slide in the price of the commodity it mines, and it speaks to the company's conservative nature. Or, to put it another way, Cameco looks as if it can handle whatever this downturn dishes out.  

Truly bouncing back, though, will require a uranium upturn. And the news there is positive, but it might take a little bit for an upturn to play out. For example, global energy demand is expected to increase by over 50% between 2014 and 2035, according to the International Energy Agency. More than 50 nuclear power plants are under construction right now to help meet that demand and boost the global demand for uranium. And major miners such as Cameco and Kazatomprom are starting to trim production to help alleviate the current oversupply situation. Those positives aren't going to make a big difference in the next year, but they should improve things over the long term.  

Cameco could burn you if you expect a turnaround in the next few months. But if you're willing to wait and collect the roughly 3% yield while you do, this industry survivor has a good chance of bouncing back when uranium prices do.

When a fire sale becomes a garbage fire

Jason Hall (Seadrill Ltd.): There's no other way to describe what Seadrill has become. Once a high-flying, fat-dividend-paying leader in the offshore-drilling industry, Seadrill is on the cusp of bankruptcy, or some other arrangement that will almost assuredly wipe out all -- or at least a very significant portion -- of the equity common investors hold today. That's why you can buy shares for less than $0.50 each at recent prices. 

Yes, there is a very slight sliver of hope that management and the board of directors can somehow achieve an 11th-hour deal to rework its debt that doesn't wipe out common shareholders. But as they say, the chances are between slim and none, and slim went home already.

This situation leaves current investors with a hard decision to either scrape up whatever leavings remain after the stock has fallen 99% from its peak, or hold on to them on the outside chance they're still worth something in a few months. The decision lies in how much money you're dealing with, and whether it's worth recouping the remaining cash. 

What about buyers? Frankly, I can't think of a single good reason to buy Seadrill right now. After all, there are other dirt-cheap energy stocks far less likely to go belly-up, and with a far better chance of delivering big returns for investors.