Image source: Teck.

What: Teck Resources Limited (TECK -0.72%) stock rose nearly 61% last month. That brings the year-to-date price advance to 214.5%!. As if that weren't impressive enough, since the middle of January the stock has gone up nearly 292%.

So what: Teck is a miner, and it can't control the prices it gets for the commodities it brings out of the ground. What it can control is how much it spends to run its mines. And like its peers, it's been working hard to keep costs down. But at the end of the day, commodity prices are going to be the biggest determinant of Teck's success.

That's why the commodity rally that started in mid-January has taken the shares along for the ride. And it's been generally good news since about Jan. 15 or so, including in April, when copper and zinc, two of the company's main commodities, started higher again after a brief pullback in May.

That said, Teck's steelmaking coal business has remained a weak spot. And while that commodity remains moribund, there are glimmers of hope. For example, Teck noted in its late April earnings release that "the outlook for steelmaking coal prices has improved slightly with the second-quarter benchmark price settling at US$84 per tonne, up from US$81 per tonne in the first quarter of 2016." So perhaps the miner will start hitting on all cylinders pretty soon, which has investors understandably excited after such a long downturn. In fact, the stock rallied roughly 13% between the April 26 earnings release and end of the month.

Adding to the positives, Teck appears to be financially strong enough to pay for a big growth project in the works in the oil space. That was a major concern heading into the oil downturn. This project will give the company a fourth major commodity to help diversify its business further away from coal. And with oil prices solidifying, too, it's starting to look like a better investment than it did at the end of last year.

Now what: If you've watched Teck's truly incredible rally, you shouldn't get drawn in too quickly. The stock was beaten down and has been recovering from historically low prices -- which is why the rally looks so impressive. Yet it's still down nearly 80% over the past five years despite the price upturn.

In fact, the first-quarter earnings release is filled with words like "volatility" and "challenging." There's a reason for that, since commodities are inherently volatile and a few good months don't mean the company's fortunes are permanently on the mend. It's also why Teck again stressed its commitment to reducing costs and right-sizing its business. This may be a good time to take a look at Teck because its business prospects are truly looking better on a fundamental basis, notably its oil investment, but don't jump in here if you can't stomach volatility driven by commodity price fluctuations. You might wind up with an unwelcome surprise.