After years and years in the dumps, Canada’s mining sector has been on fire thus far in 2016.

Gold has led the rally, something investors haven’t been able to say in a very long time. Since the beginning of the year, the yellow metal has surged 14% higher in U.S. dollars. With negative interest rates seemingly here to stay in certain parts of the world, many investors are considering gold a very viable alternative to government bonds. A decline in the U.S. dollar has also helped. If the dollar is less valuable, even if gold’s value stays the same, gold would be more valuable when priced in U.S. currency.

It isn’t just gold rallying. Other metals like copper, platinum, and silver are all up thus far in 2016 with some posting better results than others. And although crude oil has been down thus far in 2016, many investors are starting to think it is at least close to the bottom. In short, the world isn’t quite as bearish about commodities as it was a few months ago.

This is likely the reason for much of the recent rally in Teck Resources Ltd. (TSX:TCK.B)(NYSE:TCK) shares, which have done extremely well so far in 2016. At the beginning of the year, shares of Canada’s largest coal, copper, and zinc producer opened up at $5.34 each. About six weeks later, they’ve popped all the way up to $8.20, good enough for a 54% increase.

We all knew there was tremendous potential in Teck shares when the underlying commodities rallied. Does this move mean investors have missed out?

Still plenty of room

Teck released numbers from the fourth quarter last week, and, for the most part, results showed the company is weathering this storm quite well.

Although prices of each of its commodities fell for 2015–remember, these results are from before the rally in January and February–costs fell even further. A combination of low fuel costs, a weak Canadian dollar, and strong production numbers helped the company post an adjusted profit of $188 million before impairment charges. That’s not bad for a company that suffered through pretty much a perfect commodity storm.

The company also reported that its huge investment in the oil sands, Fort Hills, continues to be on track to begin production in 2017. The project is being helped by a decrease in costs for the whole sector. Teck is still on the hook for $1.2 billion in upcoming capital expenditures for the project.

It appears Teck will be able to come up with the cash for Fort Hills without having to increase its debt. The company raised its cash balance by approximately $400 million in the quarter primarily through a streaming deal with Franco-Nevada. In exchange for US$610 million, Franco-Nevada can buy Teck’s share of production from the Antamina silver mine in Peru for 5% of the spot price.

The cash balance as of the end of the quarter was $1.8 billion. As long as Teck’s main businesses can stay at least free cash flow neutral in 2016, the company shouldn’t have to borrow to fund Fort Hills. This is good news for a company with $9.6 billion in total debt.

Ultimately, the Teck story, like so many of its peers, is dependent on commodity prices. The company looks to have improved its balance sheet enough to get through this rough patch–assuming the prices of commodities don’t fall off a cliff again.

If coal, copper, or zinc make big recoveries, there’s still plenty of upside potential for the company. If they go much lower, the company’s free cash flow will be threatened, which in turn puts additional stress on the balance sheet.

It’s as simple as commodity prices for Teck. As long as they head higher, there’s still ample time for investors to get in and enjoy nice potential returns.

Like Teck? Then you can't miss this!

Teck Resources isn't the only Canadian commodity stock with huge potential upside.

Check out our special FREE report "2 Canadian Energy Stocks on the Cusp of a Powerful Long-Term Trend". In this report, you'll find that Canada is rich in other commodities that are poised to take off. Click here now to get the full story.

Fool contributor Nelson Smith has no position in any stocks mentioned.