Commodity exchange traded funds are garnering more attention as investors hedge against swings in bonds and stocks, and play on long-term fundamentals.

Funneling $1.2 billion into commodity exchange traded funds over July, investors have put more money into commodity investments in July than any single month over the past two years, reports Trevor Hunnicutt for InvestmentNews.

Broad commodity ETFs like the PowerShares DB Commodity Index Tracking Fund (NYSEArca: DBC), United States Commodity Index Fund (NYSEArca: USCI) and iShares GSCI Commodity-Indexed Trust (NYSEArca: GSG) attracted over half a billion in assets over July.

The SPDR Gold Shares (NYSEArca: GLD) stood out with $485.4 million in new inflows over July. [Global Tensions Spark Modest Gold ETF Inflows]

Growing more optimistic over improvements in the Chinese economy, investors are returning to commodities. Moreover, many point to the long-term needs of a growing population and rising middle class in the emerging markets.

“The long-term trend is that commodity prices have to go higher — we live in a planet of 7 billion people, it will be 8 billion by the end of the century, and about two billion of those people moved from subsistence to middle class in the last three decades,” David Edwards, president of Heron Financial Group, said in the article.

Traders may also be using commodities as an alternative play in face of volatility in the equity and fixed-income markets of developed countries, notably as tensions escalate between Ukraine and Russia.

“A lot of people released capital from the fixed income space as well as the equity space, so the money has to go somewhere — it might be a hedge,” Eduardo Ramos, founder of Freedom Advisory, said in the article.

Additionally, some argue that the weakness in the commodities market is only temporary and could rebound. [After Sell-Off, Commodity ETFs Could Turn Around]

“For now, however, it appears as if resources could continue their strong performance for at least the near-term and hopefully much longer,” Frank E. Holmes, chief executive of U.S. Global Investors, said in the article.

For more information on the commodities market, visit our commodity ETFs category.

Max Chen contributed to this article.

Full disclosure: Tom Lydon’s clients own shares of GLD.