One of Teck's mines. Image source: Teck Resources Limited.

What: Teck Resources Limited's (NYSE:TECK) stock price rose nearly 60% last month. That's a huge gain, but hardly enough to offset the roughly 85% loss over the past five years. It would be easy enough to suggest that rising commodity prices were the impetus for the swift advance, but there's more to it than that.

So what: Teck Resources is one of Canada's largest miners, with a portfolio that includes steel-making coal, copper, and zinc. It does some other things, but those are the big ones right now. Although coal remains a rough market, copper and zinc have both been heading higher lately. So some of the miner's advance is tied to improved commodity prices.

However, Teck is also facing some notable costs in the near future. That's because it's expanding into the oil business through a new project in the Canadian oil sands (its interest in the Fort Hills project is roughly 20%). The company's partner is oil-sands specialist Suncor Energy. This "oil mine" is roughly 50% complete at this point, but Teck still has about $900 million or so to pay before it's done.

The problem with that bill is that Teck has been suffering along with other miners as commodity prices have fallen. That's put it into survival mode and led to cost-cutting and asset sales. And that's why the company's 2015 earnings release was so important. Basically, the miner said that as long as commodity markets don't get worse, it has enough cash to pay all its bills -- for now, anyway. That helps explain why the shares really started to rally after quarterly earnings were released on Feb. 11.

Now what: Teck is working hard to get through a difficult market. It's nowhere near the end of this tunnel, and the big oil investment isn't helping. But over the long term, Teck has a collection of decent assets, many with very long lives ahead of them. Assuming it can muddle through this downturn, while still managing to invest in the future (the oil sands project), it could easily turn into a good long-term investment when commodity supply and demand hits an equilibrium point. That said, risk-averse investors should probably stay on the sidelines here, just in case the commodity markets do get worse.

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.