Gold mining company Centamin (LSE: CEY) has released a production update for the third quarter of the year. It shows that production has increased by 41% versus the same quarter of the previous year. It also provides clues as to whether Centamin is a better buy than resources peer BP (LSE: BP).

Centamin’s performance in the third quarter was highly encouraging. Its Sukari operation in Egypt delivered another solid quarter. Production of 148,674 ounces takes the company’s total production for the first nine months of the year to 414,249 ounces of gold. Furthermore, Centamin’s throughput rates at the processing operation were stable and consolidate the improvements delivered over the previous quarters. Crucially, they remain above its base case forecast rate of 11Mtpa.

Looking ahead, Centamin is on track to reach the upper end of its production guidance for the full year. It expects to produce between 520,000 and 540,000 ounces of gold this year. This is forecast to boost Centamin’s bottom line by 140%, which puts its shares on a forward price-to-earnings (P/E) ratio of just 9.1. This indicates that there’s upward rerating potential.

Clearly, Centamin is benefitting from a firmer gold price. The prospects for the precious metal, however, are very unclear. On the one hand, US interest rate rises could dampen demand for gold since interest producing assets could become more popular. However, the global economic outlook is very uncertain and Brexit could cause a spike in demand for lower risk assets such as gold.

Resources woes

Of course, the reality is that this situation is the same for all resources companies. BP faces an unclear future due to a glut in the supply of oil. This could be reduced if the OPEC deal to cut supply goes through in November. However, there are no guarantees that this will happen and with demand growth for oil being sluggish, it would be unsurprising if the oil price came under renewed pressure.

As such, the key is for investors to seek out a wide margin of safety before investing in resources companies. In Centamin’s case, its low P/E ratio provides evidence that it offers this. However, in BP’s case it’s less obvious. Although BP is forecast to grow its bottom line by 140% in the next financial year, it trades on a forward P/E ratio of 15.5. While still reasonable, it’s much higher than Centamin’s P/E ratio.

Despite this, BP has appeal. It has a diversified and high quality asset base, which should allow it to adapt to the changing energy needs of the global economy. It’s also moving on from the Deepwater Horizon oil spill, which should improve its financial outlook. However, due to Centamin’s lower valuation and gold’s defensive characteristics, it seems to be the superior buy at the present time.

But will Centamin make you a millionaire?

Of course, Centamin isn't the only company that could boost your portfolio returns. However, finding the best stocks at the lowest prices can be challenging when work and other commitments get in the way.

That's why the analysts at The Motley Fool have written a free and without obligation guide called 10 Steps To Making A Million In The Market.

It's a step-by-step guide that could make a real difference to your financial future and allow you to retire early, pay off your mortgage, or even build a seven-figure portfolio.

Click here to get your free and without obligation copy - it's well-worth a read!

Peter Stephens owns shares of BP and Centamin. The Motley Fool UK has recommended BP. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.