After years of underperformance, mining stocks and related exchange traded funds are looking like an attractive contrarian play, with analysts from JPMorgan turning bullish on the sector.

“We believe the risk-reward for miners is improving,” Mislav Matejka, a equity strategist for JPMorgan, said in a note, CNBC reports. “We have been structurally cautious on miners for nearly three years, but believe one should be reversing that stance now.”

Supporting the miners group, China is coming out with positive economic data. China’s official factory activity number slightly increased in April, rising to 50.4 from 50.3 in March, which suggests that the world’s second-largest economy is starting to stabilize. [Miners ETF is a Gold Standard for Gold Equities]

JPMorgan analysts argue that the numbers showed a robust figure for commodity imports. A relatively subdued inflation should also help support demand for the coming years.

Moreoever, cost reductions and cuts to capital expenditure could benefit metal producers, and a weaker U.S. dollar would help USD-denominated commodities strengthen.

Citi analysts are also warming up to the basic resources sector.

“Our current view is that diversified miners will outperform single-product producers in the year ahead,” Jon H Bergtheil, an analyst at Citi, said in a note. “The key observation must be that the diversified miners (with their easier access to capital) should have the edge on a sub-sector comparison basis, but that individual single-commodity producers are quite capable of outperforming their big brothers by simply being managed well.”

Investors interested in metal miners can take a look at broad diversified ETFs. For instance, the SPDR S&P Metals & Mining (NYSEArca: XME) follows an equal-weighted index and includes U.S. companies that produce both industrial and precious metals, along with coal and consumable fuels. [Gold Mining ETFs Top Physical Counterparts]

The iShares MSCI Global Metals & Mining Producers ETF (NYSEArca: PICK) tracks global companies involved in the extraction and production of diversified metals, aluminum, steel and precious metals and minerals, except gold and silver.

Those interested in a focus on smaller companies can look at the Global X Junior Miners ETF (NYSEArca: JUNR), which follows global junior miners involved in cola, copper, gold, iron, nickel, silver, titanium and other metals.

For more information on the mining sector, visit our metals & mining category.

Max Chen contributed to this article.