Teck Resources Ltd. (TSX:TCK.B)(NYSE:TCK) has rallied more than 25% off of its recent lows, and contrarian investors are wondering if this is the time to finally buy the stock.

Let’s take look at the current situation.

Commodity woes

Teck is a producer of metallurgical coal, copper, and zinc. The prices for these commodities have been on a nasty slide in recent years, and Teck’s stock has followed suit.

How bad has it been?

Teck’s stock traded for more than $60 per share five years ago. Today investors can pick it up for less than $6 a share.

That’s an ugly chart, and most investors want nothing to do with the company, but Teck is a low-cost producer and its products follow cyclical patterns. At some point, the coal, copper, and zinc markets will come back into balance and Teck will benefit.

When will the turnaround occur?

The production of metallurgical coal, also called steel-making coal, is Teck’s largest operation, followed by copper and zinc. After the financial crisis, China launched a massive wave of infrastructure construction, and that drove up demand for metallurgical coal and the base metals. Prices rose as a result, as did new supply.

The subsequent slowdown in the Chinese boom has hit the three markets hard with coal getting the worst of it. At the moment, things still look grim, but the bottom could be in sight.

Coal is entering uncharted territory on the downside. According to Teck’s price-cycle analysis, coal’s latest down cycle is now at five years–the longest of any downturn since 1950. The peak-to-trough price slide is at a record 73%.

If the market respects the 60-year trend, the coal market should be getting close to a bottom, although it might not happen in 2016.

Copper is also in a protracted slump, currently down nearly 50% from the previous high. As with coal, the downturn should be entering the late innings of the game.

Zinc’s slide has lasted just as long, but the price plunge has not been as bad with a 30% peak-to-trough price drop. Teck expects the zinc market to rebound faster than coal.

Fort Hills

Teck has a 20% interest in the Fort Hills oil sands development. Production is expected to begin in late 2017, but Teck still has to pony up $1.5 billion to get the project completed. In its presentation at a December global metals and mining conference the company said it expected to finish 2015 with $1.8 billion in cash, which would be more than enough to cover the Fort Hills requirement.

Teck is a survivor

Management has done an excellent job of navigating through the crisis. Year-over-year Q3 2015 coal-unit costs dropped 24% and copper-cash-unit costs fell 12%. Since 2012 the company has delivered about $750 million in sustainable cost reductions.

No long-term debt is due before 2017, and the company has roughly $6 billion in available credit facilities.

The crash in the loonie against the U.S. dollar is helping ease the pain. Most of Teck’s costs are incurred in Canada, but it sells its products in U.S. dollars.

Should buy-and-hold investors get in now?

Teck has 100 years’ worth of coal resources, 30 years of copper resources, and 15 years of zinc resources. China’s growth will ramp up again at some point and supply shortages are likely to occur along the way as producers tend to overshoot on closures the same way they build too much when times are good. When that happens, Teck is going to benefit.

If you have a contrarian investing style, it might be time to start nibbling on this stock.

Looking for stocks that won't keep you up at night?

These three top stocks have delivered dividends to shareholders for decades. Check out our special FREE report: "3 Dividend Stocks to Buy and Hold Forever".

NEW! 1 TOP STOCK FOR 2016 AND BEYOND...

Let’s not beat around the bush – energy companies performed miserably in 2015. Yet, even though the carnage was widespread, not all energy-related businesses were equally affected.

We've identified an energy company we think offers one of the best growth opportunities around. While this company is largely tied to the production of natural gas, it doesn't actually produce the gas. Instead, it provides the equipment required to get natural gas from the ground to the end user. With diversified operations around the globe, we think it's a rare find in the industry.

We like it so much, we’ve named it as 1 Top Stock for 2016 and Beyond. To find out why, simply enter your email address below to claim your FREE copy of this brand new report, "1 Top Stock for 2016 and Beyond"!

Fool contributor Andrew Walker owns shares of Teck Resources Ltd.