At the end of last year, investors were fleeing the mining sector as it looked as if many of the world’s largest miners would fail to make it through the current hostile commodity market environment.

However, this year the story couldn’t be more different. Miners such as Anglo American (LSE: AAL) have seen their shares rally hard since the lows printed back in January, and as sentiment across the sector improves, there could be more gains to come.

Time to buy?

The second and third weeks of January 2016 marked one of the lowest points for miners since the financial crisis. Commodity prices had plunged to a 13-year low, and many miners were rushing to reassure shareholders that their balance sheets were robust enough to weather the downturn.

It seems as if this PR push worked as sentiment has since drastically improved across the sector. Year-to-date shares in Anglo-American have risen 116%, wiping out most of the losses the shares suffered in the last quarter of 2015. Similarly, shares in Glencore (LSE: GLEN) have jumped higher by around 100% from the lows printed in mid-January, and shares in Rio Tinto (LSE: RIO) have also outperformed the wider FTSE 100, adding 26% compared to the FTSE’s 100 return of 3.6% over the same period.

Nonetheless, just as the market overreacted at the end of last year by overselling these miners, investors have gone on to overreact this year by charging back into the mining sector despite the fact that there has been no significant improvement in underlying fundamentals during the past six months.

As a result, it’s hard to try and evaluate whether or not these miners are worth buying after recent gains. The global macroeconomic picture has hardly improved over the past six months, and there are still questions about China’s ability to hit its growth targets and commodity markets around the world remain oversupplied.

Stay away?

So, until the supply/demand rebalance is restored in the commodity markets and global economic growth picks up, it might be wise for investors to view the mining sector with a degree of caution. What’s more, these three miners all look expensive after recent gains and based on city expectations for growth this year.

Rio Tinto’s shares currently trade at a forward P/E of 22.2 and earnings per share are expected to fall 40% this year. The company’s shares support a dividend yield of 3.6%. Anglo American trades at a forward P/E of 27.7 and earnings per share are expected to fall 34% this year. And finally, Glencore trades at a forward P/E of 54.9. Analysts currently expect the company’s earnings per share to remain constant this year before jumping 79% next year. If this forecast does indeed play out, the company is trading at a 2017 P/E of 32.9.

Looking for income?

Our analysts have recently discovered a company we believe is one of the market's dividend champions. All is revealed in the Motley Fool's new income report, titled A Top Income Share From The Motley Fool. It gives a full rundown of the company, its prospects and our reasons for buying. 

This is essential reading for income investors.

The report is completely free and will be delivered straight to your inbox. Click here to download the free report today!

Rupert Hargreaves has no position in any shares mentioned. The Motley Fool UK has recommended Rio Tinto. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.