When It Pays to Invest in Commodities