Privately-held Swiss trading house Mercuria Energy Group has agreed to buy JPMorgan Chase’s physical commodities trading unit in a deal worth $3.5 billion.

The transaction—which is expected to close in the third quarter, pending regulatory approval—has been in the works since JPMorgan announced last summer that it was exploring strategic options for the unit, which trades in such commodities as metals and oil. The bank’s need to shed the unit stems from the recently passed Volcker rule’s restrictions that limit banks’ commodities trading activities, according to The New York Times. JPMorgan said in its announcement of the sale that it does not expect the deal to affect earnings.