It was only just over six months ago that mining stocks were languishing; many investors priced a lot of them for bankruptcy because of the negative outlook surrounding commodities and worries over their massive piles of debt.

Since then, miners have rallied strongly, and this bullish sentiment continues to drive the share prices of many miners ever higher. Canada’s two largest miners have been among the biggest beneficiaries of this improving outlook. Teck Resources Ltd. (TSX:TCK.B)(NYSE:TCK) has more than doubled in value, and First Quantum Minerals Ltd (TSX:FM) rocketed skyward by an impressive 75%.

Even though this rally has been incredible and continues to gain steam, there are signs that it is completely overdone, heralding considerable pain for investors once the jubilation ends.

Now what?

One warning sign that stands out is that mining stocks have vastly outperformed gains in commodity prices. For the year to date, miners have performed remarkably well with the S&P TSX Global Mining Index surging higher by 69%, whereas base metals copper and zinc have only gained about 11% over that period. Then you have steel-making or coking coal, a key ingredient in the fabrication of steel, which remains caught in a deep slump.

Yet this rally is continuing. The prices of miners are predicated on higher commodity prices, which certainly won’t occur any time soon.

You see, the outlook for China, the world’s single largest consumer of commodities, remains shaky. The days of China’s economy growing at double digits are well behind us, as is the massive investment in infrastructure-led development that made it the world’s largest consumer of commodities.

When these factors are considered in conjunction with Beijing’s desire to curb the excesses of the past and transition the economy to more sustainable growth that’s focused on domestic consumption, it does not bode well for any significant increase in demand.

Another headwind impacting commodities is excess capacity. Supply substantially exceeds demand for the majority of commodities. This isn’t being helped by major miners such as BHP Billiton Ltd. and Rio Tinto Plc, which are focused on growing production regardless of weak prices in order to boost market share.

These factors clearly indicate that market fundamentals do not support the rally in mining stocks and that this rally is now, in fact, overdone. They also highlight that when commodities finally rebound, any gains in their prices will be far more modest than they were previously.

When all of these factors are considered in conjunction with the surge in mining stocks that now sees companies such as Teck and First Quantum trading with lofty valuations, including enterprise-values of almost 13 times EBITDA, the rally is clearly unsustainable.

So what?

It is hard to justify the valuation of mining stocks in the wake of the recent rally with weak commodities prices acting as a headwind that will keep their earnings under pressure for the foreseeable future. If anything, it indicates that the stock prices of miners are now disconnected from market fundamentals, meaning that a correction is likely.

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 Matt Smith has no position in any stocks mentioned.