(a) Subject to subsection (b), the exercise of any contractual right, because of a condition of the kind specified in section 365 (e)(1), to cause the termination, liquidation, or acceleration of or to offset or net termination values, payment amounts, or other transfer obligations arising under or in connection with one or more (or the termination, liquidation, or acceleration of one or more)—
(1) securities contracts, as defined in section 741 (7);
(2) commodity contracts, as defined in section 761 (4);
(3) forward contracts;
(4) repurchase agreements;
(5) swap agreements; or
(6) master netting agreements,
shall not be stayed, avoided, or otherwise limited by operation of any provision of this title or by any order of a court or administrative agency in any proceeding under this title.
(b)
(1) A party may exercise a contractual right described in subsection (a) to terminate, liquidate, or accelerate only to the extent that such party could exercise such a right under section 555, 556, 559, or 560 for each individual contract covered by the master netting agreement in issue.
(2) If a debtor is a commodity broker subject to subchapter IV of chapter 7—
(A) a party may not net or offset an obligation to the debtor arising under, or in connection with, a commodity contract traded on or subject to the rules of a contract market designated under the Commodity Exchange Act or a derivatives transaction execution facility registered under the Commodity Exchange Act against any claim arising under, or in connection with, other instruments, contracts, or agreements listed in subsection (a) except to the extent that the party has positive net equity in the commodity accounts at the debtor, as calculated under such subchapter; and
(B) another commodity broker may not net or offset an obligation to the debtor arising under, or in connection with, a commodity contract entered into or held on behalf of a customer of the debtor and traded on or subject to the rules of a contract market designated under the Commodity Exchange Act or a derivatives transaction execution facility registered under the Commodity Exchange Act against any claim arising under, or in connection with, other instruments, contracts, or agreements listed in subsection (a).
(3) No provision of subparagraph (A) or (B) of paragraph (2) shall prohibit the offset of claims and obligations that arise under—
(A) a cross-margining agreement or similar arrangement that has been approved by the Commodity Futures Trading Commission or submitted to the Commodity Futures Trading Commission under paragraph (1) or (2) of section 5c(c) of the Commodity Exchange Act and has not been abrogated or rendered ineffective by the Commodity Futures Trading Commission; or
(B) any other netting agreement between a clearing organization (as defined in section 761) and another entity that has been approved by the Commodity Futures Trading Commission.
(c) As used in this section, the term “contractual right” includes a right set forth in a rule or bylaw of a derivatives clearing organization (as defined in the Commodity Exchange Act), a multilateral clearing organization (as defined in the Federal Deposit Insurance Corporation Improvement Act of 1991), a national securities exchange, a national securities association, a securities clearing agency, a contract market designated under the Commodity Exchange Act, a derivatives transaction execution facility registered under the Commodity Exchange Act, or a board of trade (as defined in the Commodity Exchange Act) or in a resolution of the governing board thereof, and a right, whether or not evidenced in writing, arising under common law, under law merchant, or by reason of normal business practice.
(d) Any provisions of this title relating to securities contracts, commodity contracts, forward contracts, repurchase agreements, swap agreements, or master netting agreements shall apply in a case under chapter 15, so that enforcement of contractual provisions of such contracts and agreements in accordance with their terms will not be stayed or otherwise limited by operation of any provision of this title or by order of a court in any case under this title, and to limit avoidance powers to the same extent as in a proceeding under chapter 7 or 11 of this title (such enforcement not to be limited based on the presence or absence of assets of the debtor in the United States).