From its lows of $5 a share in January to its current price of over $20 a share, Teck Resources Ltd. (TSX:TCK.B)(NYSE:TCK) investors have been rewarded handsomely with a 400% return in a matter of months.

The reason for the latest pop has been a sharp rise in the price of various commodities. Coal, which contributes roughly one-third of operating profits, has shot up by over 30% since the year began. Teck’s management team has cited improving demand amid shrinking supply due to mine closures and Chinese output curtailment.

Still, despite the impressive run, shares continue to trade at a lower level than they did just 12 months ago. Is Teck Resources truly out of the woods? Can coal go from a major detractor to company saviour?

Teck was primed for a rebound

Commodity prices are not under any mining company’s control. However, individual companies do have one major financial item that they can heavily influence: costs.

Throughout the latest downturn, Teck has been relentless in cost cutting, which has allowed many of its major mines to remain cash flow positive. Last year the company beat its guidance for full-year production costs and capital expenditures.

“We’ve achieved significant sustainable operating cost reductions through our CRP, the cost-reduction program, and our results have been helped by lower oil prices,” said CEO Donald Lindsay. “At the mine level, we’ve reduced our cash unit costs at all operations year over year and, importantly, all of our major operating mines are cash flow positive after sustaining capex in Q4 in 2015.”

Cost reductions have continued to beat expectations, allowing Teck to mitigate profitability declines without raw materials strengthening. Now that commodities are finally starting to show some life, Teck has an opportunity to post surprising profitability numbers.

Is coal going to save the company?

Teck estimates that every dollar change in the price of coal per tonne leads to a US$15 million increase in the company’s gross profit. With coal rising over US$25 per tonne since the year began, you can start to see how investors are anticipating a major surge in profitability. In the first quarter Teck realized prices of US$75 per tonne. Contract prices for the second quarter are around US$84 per tonne. If the recent rally holds, Teck may be able to sell into the market at above US$90 a tonne.

While shrinking supply has contributed to the rally, there are also some long-term demand drivers that have the opportunity to surprise even bullish investors. For example, according to Zacks Investment Research, “World demand for coal is expected to grow by 7% through 2030 as a result of emerging markets prioritizing cost effective energy production methods over environmental sustainability.”

While many investors are scared of renewable technologies eating into coal demand, many analysts are now calling those claims overdone. “While renewable energy demand in the developed world is expected to increase 53% over the next 15 years,” the report continues, “it will remain a modest threat, as coal demand will still be significantly higher.”

Coal’s drag on Teck’s profitability could finally be at its end, but remember that the positive tailwinds are very long term in nature. If you’re looking to play coal’s reversal, it’s best to maintain a buy-and-hold outlook.

Why we're buying more of this "Wall-Street Darling" that was left for dead!

The savvy team of analysts and advisors inside Stock Advisor Canada recently issued a "buy" alert on this downgraded stock. After being left for dead by five or more big banks in a five-week span, our team scooped up shares as fast as we could--and are recommending that Stock Advisor Canada members jump on this rare opportunity immediately. So simply click here to unlock the full details behind this new recommendation and join thousands of others inside of Stock Advisor Canada.

NEW! This Stock Could Be Like Buying Amazon In 1997

For only the 5th time in over 14 years, Motley Fool co-founder David Gardner just issued a Buy Recommendation on this recent Canadian IPO.

Stock Advisor Canada’s Chief Investment Adviser, Iain Butler, also recommended this company back in March – and it’s already up a whopping 57%!

Enter your email address below to claim your copy of this brand new report, “Breakthrough IPO Receives Rare Endorsement.”

Fool contributor Ryan Vanzo has no position in any stocks mentioned.