J.P. Morgan has agreed to sell its commodities trading business to Swiss energy trading company Mercuria Energy Group for $3.5 billion, the New York Times reports.