Investors should buy shares of global mining giants like BHP Billiton plc (LON:BLT) and Rio Tinto plc (LON:RIO), even amid volatile commodities markets and reduced capital budgets for mining companies, according to a UBS AG (VTX:UBSN) research note from Friday.

The bank maintained ‘Buy’ ratings for Rio Tinto, BHP, and Glencore Xstrata PLC (LON:GLEN), highlighting attractive stock valuations and robust earnings momentum. The three are among the largest mining companies in the world.

Diversified miners’ share prices are down 15 percent for the year to date, and have underperformed the FTSE 500 index by 25 percent. But that makes their low prices and valuations attractive, wrote UBS analysts.

Both Rio and BHP have potential upsides of about 30 percent, given spot commodity prices, said analysts in their note reviewing the first half of 2013 for the UK mining sector.

The note of confidence in these mining companies comes amid broad sentiment that the global gold mining sector needs to rein back capital and exploration costs, to better fit declining and volatile commodities markets.

The shift over the past year or so comes after a strong decade of booming metal prices and heavy project spending.

In addition, the South African mining sector, one of the world’s most important, has faced significant labor unrest this summer, with analysts fearing that the country is losing its edge in mining sector competitiveness.

Collective gross earnings before tax, depreciation, and other factors at UK diversified miners rose 9 percent from the difficult second half of 2012, though they stayed 4 percent lower from last year’s period. But the 9 percent gain is the first improvement in earnings from half to half since early 2011, wrote analysts.

Items which were less positive include the one-off special charges that some miners have taken in 2012 and 2013.

Glencore Xstrata took a $10 billion impairment due to its merger recently, and in 2012 overpriced acquisitions and capital spending overruns drove major one-off charges.

“While the impairments do not impact cash flow or our valuations, they do highlight how the mining industry has misallocated capital and reduced value over the last 7 years,” wrote the analysts.

Healthy cash flow at global miners is another concern, with net debt rising by $7.5 billion in the past six months for the companies cited. Platinum miner Anglo American plc (LON:AAL) also suffered a credit rating downgrade by Moody’s Corporation (NYSE:MCO) in mid-August, partly over cash flow.

UBS noted that the three major companies made and have pledged significant cost cuts, a key reason for their confidence in their ability to weather coming years.