What a change a few months can make. At the start of the year, shares of South African mining giant Anglo American (LSE: AAL) were at a historic low as cratering commodity prices and high debt led to the suspension of dividend payments and plummeting investor confidence.

Since then shares are up 188%, but is Anglo a better long-term investment now than it was in January?

Possibly. Anglo can do little to staunch the bleeding in commodity prices as long as the market remains drastically oversupplied. However, the company has done well to control its own spending and slashed unit costs by 19% year-on-year at June results.

This helped boost free cash flow from $200m to $1.1bn over the same period and alongside asset sales, reduced net debt by $1.2bn over the past six months.

The bad news is that the company’s gearing ratio remains worryingly high at 35.4%. This means dividends are likely to remain subdued if they return as expected by the end of next year.

With the company still reporting steep losses, higher debt than competitors and a poor outlook for diamonds and iron ore (its most important products), I’ll be looking elsewhere in the commodities sector for my long-term holdings.

Expensive shares

It’s been better days for gold miners as volatile global markets and slowing economic growth have sent prices of the precious mineral up by more than 25% from January lows. While current prices of $1,300/oz remain well below 2011 highs of $1,800/oz, that hasn’t stopped shares of miner Randgold Resources (LSE: RRS) rising 102% year-to-date.

Randgold is certainly in better shape than diversified giants such as Anglo American with a healthy balance sheet and continued, if declining, profitability. Despite that, I remain leery of investing in the company at this point in the cycle. After their super-charged performance to start the year, the shares are looking quite expensive at 35 times forward earnings.

Although management has raised hopes of improved dividend payouts, analysts are only forecasting the shares to yield 1% by the end of 2017. And that level of dividends remains reliant on gold prices continuing their upward trajectory, which is never a certainty. With dividends expected to be that low, investors looking for exposure to gold may be better off with one of the many gold-tracking ETFs that have traditionally outperformed the miners anyhow.

Impossible to predict prices

Valuations are even loftier for Mexican gold and silver miner Fresnillo (FRES), where shares trade at an astronomical 62 times forward earnings after a 171% return year-to-date.

The good news is that revenue and profits are already growing at a rapid clip as output ramps up at the company’s open pit mines. Gold production bumped up 23% year-on-year and silver output also increased by 6% in the half year to June.

However, the company still faces the same issue as Randgold. Dividends yields will remain low for the time being and each company remains dependent on the price of gold rising. Unlike iron or copper, gold has fewer industrial uses so its price is almost entirely dependent on the mood of global investors. That makes it nearly impossible to predict where prices will go and gives me reason enough to avoid shares of Fresnillo for the time being.

Prefer your growth shares not too have the roller-coaster nature of volatile mining companies?

The Motley Fool's top analysts certainly do. That's why their latest free report details A Top Growth Share that has returned 250%-plus to investors over the past five years by selling a far less sexy product than gold or silver.

Thanks to dependable demand for its goods, the Fools believe this company has the potential to triple again in the coming decade.

To discover this stellar growth share for yourself, simply follow this link for your free, no obligation copy of the report.

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