
    Albert F. DURHAM, Trustee in Bankruptcy for Continental Commodities, Inc., Plaintiff-Appellee, v. SMI INDUSTRIES CORPORATION, d/b/a Kasle Recycling, Inc., d/b/a Schuchman Metals, Inc.; SMI Industries, Inc., d/b/a Kasle Recycling, Inc., d/b/a Schuchman Metals, Inc., Defendants-Appellants.
    No. 88-2929.
    United States Court of Appeals, Fourth Circuit.
    Argued April 13, 1989.
    Decided Aug. 17, 1989.
    Joseph William Murphy (Klineman, Rose, Wolf and Wallack, Indianapolis, Ind., and Edward P. Hausle, Tucker, Hicks, Hodge and Cranford, P.A., Charlotte, N.C., on brief), for defendants-appellants.
    James Craig Whitley (Albert F. Durham, Leonard, McNeely, MacMillan & Durham, Charlotte, N.C., on brief), for plaintiff-ap-pellee.
    Before ERVIN, Chief Judge, and HALL and WILKINS, Circuit Judges.
   WILKINS, Circuit Judge:

SMI Industries, Inc., a creditor of Continental Commodities, Inc., appeals from the district court judgment affirming a bankruptcy court ruling that its receipt of a check as part of a check exchange by the two companies constituted an avoidable preferential transfer under the Bankruptcy Code, 11 U.S.C.A. § 547(b) (West 1979). We reverse and remand.

I.

SMI and Continental are scrap metal dealers that until November 1983 engaged in a substantial amount of business with each other, selling each other materials on open account. Although the total dollar figures of the open account invoices often grew quite large, the net balance due either party at any one time was relatively small. Periodically, in order to reduce these account debts, SMI and Continental would either make mutual accounting entries cancelling corresponding debts and credits, or they would exchange checks for the outstanding balances. The check exchanges were carefully coordinated to allow simultaneous deposits in their respective bank accounts to ensure that the checks would clear.

In late August 1983 SMI and Continental made such a check exchange. Continental sent SMI 17 checks totalling $273,137.62 from August 25 to August 26, representing amounts it owed SMI for invoiced deliveries from September 3, 1982 to June 28, 1983. On August 29 SMI sent Continental its check for $271,967.20 for invoiced deliveries by Continental from February 22, 1983 through August 16, 1983. Both parties deposited the checks into their bank accounts on August 30.

On November 18, 1983, less than 90 days later, Continental filed a petition in bankruptcy under Chapter 7. See 11 U.S.C.A. §§ 701, et seq. (West 1979 & Supp.1989). In November 1985 Continental’s Trustee filed an adversary action against SMI seeking to recover $273,137.62, which represented the total amount of the checks Continental had sent SMI as part of the check exchange. The bankruptcy court held in favor of the Trustee, finding that Continental’s remittance of the checks to SMI constituted avoidable preferential transfers, 11 U.S.C.A. § 547(b) (West 1979), that were not part of a valid setoff under 11 U.S.C.A. § 553 (West 1979). The bankruptcy court ruled in the alternative that since 11 U.S. C.A. § 502(d) (West 1979) prohibits a creditor who refuses to disgorge a preference, from asserting a claim against the estate, and since the Trustee had brought other preference actions against SMI, SMI was precluded from asserting that it had exercised a valid right of setoff.

The district court affirmed, finding that SMI’s payment constituted a transfer under the Code, which defines “transfer” very broadly in 11 U.S.C.A. § 101(50) (West Supp.1989) (formerly § 101(40) (West 1979)), and was a preference under section 547. Durham v. SMI Indus., Inc., 90 B.R. 162 (W.D.N.C.1988). The district court refused to consider whether the check exchange was a valid setoff since it found that SMI had failed to appeal the bankruptcy court’s alternative holding that section 502(d) barred SMI from asserting that the transfer was part of a valid setoff.

II.

Section 547(b) provides that a trustee may avoid, and proceed to seek recovery of, any transfer made by a debtor to a creditor within 90 days prior to filing for bankruptcy that has the effect of enabling that creditor to receive more than it would in the bankruptcy proceeding had the transfer not been made. However, under section 553(b), a valid setoff executed within 90 days of the date of the filing of a bankruptcy petition is nonetheless protected from avoidance under section 547, except for any insufficiency. Where a pre-petition setoff is asserted in defense to a proceeding brought by a trustee the court must first determine whether the setoff is valid under section 553. Only if the court finds the setoff invalid, and further concludes that no right of setoff exists in bankruptcy, is section 547 applied. See In re Hinson, 65 B.R. 675, 677 (Bankr.W.D.Tenn.1986). We hold that the lower courts erred by attempting to resolve this case under section 547 after SMI asserted that it and Continental had completed a pre-petition setoff of their mutual debts.

A.

Before we can determine whether the setoff was effective, we must address whether SMI is barred from asserting a setoff pursuant to section 502(d). Section 502(d) provides, in pertinent part, that “the court shall disallow any claim of any entity from which property is recoverable under section ... 550 [providing for recovery of avoided transfers] ..., unless such entity ... has paid the amount ... for which such entity or transferee is liable.” Since a court can only disallow a claim after one has been filed under 11 U.S.C.A. § 501(a) (West 1979), “claim” in section 502(d) includes only one for which a proof has been filed. Setoff, however, “is an affirmative defense which must be pled and proven by the party asserting it.” First Nat’l Bank v. Hurricane Elkhorn Coal Corp. II, 763 F.2d 188, 190 (6th Cir.1985). SMI, in asserting that the check exchange constituted a setoff of mutual debts, was not seeking to assert a “claim” against the bankruptcy estate. To the contrary, SMI was asserting that because the check exchange was a valid setoff under section 553(b), the corresponding debts were cancelled.

Section 502(d), therefore, does not preclude a defendant in an adversary proceeding from asserting the affirmative defense of pre-petition setoff merely because the trustee has asserted that the defendant has failed to disgorge an unrelated preference. Having concluded that SMI’s designation of issues presented on appeal to the district court challenged the bankruptcy court holding that section 502(d) bars SMI from asserting the affirmative defense of pre-pe-tition setoff, we reverse and hold that SMI was entitled to assert setoff against the Trustee’s adversary action. The central issue thus becomes whether the check exchange constituted a valid setoff.

B.

Section 553(b)(1) provides, in pertinent part, that except as to circumstances not relevant here:

[I]f a creditor offsets a mutual debt owing to the debtor against a claim against the debtor on or within 90 days before the date of the filing of the petition, then the trustee may recover from such creditor the amount so offset to the extent [of] any insufficiency on the date of such setoff....

11 U.S.C.A. § 553(b)(1). “Insufficiency” is defined in section 553(b)(2) as the amount by which a party’s credit against the debtor exceeded its mutual debt to the debtor at the time the setoff was effected. Where there is no improvement in position found, a setoff within 90 days of the filing of a bankruptcy petition as to mutual debts incurred more than 90 days prior to the filing of the petition is effective as between the impending bankrupt debtor and a creditor except to the extent that the creditor receives more in the setoff than it pays.

Section 553 does not create a right of setoff or prescribe the means by which a setoff must be executed in order to be effective. It merely preserves any right of setoff accorded by state law, subject to certain limitations. In re Balducci Oil, 33 B.R. at 850. North Carolina has long recognized the right of setoff where mutual debts exist between parties. Old Southern Life Ins. Co. v. Bank of North Carolina, 36 N.C.App. 18, 30-31, 244 S.E.2d 264, 271 (1978) (quoting Coburn v. Carstarphen, 194 N.C. 368, 370, 139 S.E. 596, 597 (1927)). See N.C.Gen.Stat. § 25-9-306(4)(d)(i) (1988). North Carolina has not, however, prescribed any method by which a setoff must be executed to be valid.

The United States Supreme Court, applying the former Bankruptcy Act, recognized that a pre-petition setoff may be effected where parties with mutual debts have “themselves given checks, charged notes, made book entries, or stated an account whereby the smaller obligation is applied on the larger.” Studley v. Boylston Nat’l Bank, 229 U.S. 523, 528, 33 S.Ct. 806, 808, 57 L.Ed. 1313 (1913). The Trustee concedes that had the parties executed this setoff by corresponding accounting entries it would have been valid, but he argues that a setoff may not be effected by exchanging checks. We see no reason to distinguish between the two practices. Indeed, the exchange of checks, with the resulting endorsements each made on the other’s checks before depositing them, provided better documentation of satisfaction of the debt than mere book entries. We hold that the check exchange constituted an effective exercise of setoff pursuant to North Carolina law and section 553(b).

The lower courts used “hypothetical facts” to ignore the intent of the parties at the time of the check exchange and to view each party’s act of sending a check as the independent payment of a valid debt. Durham, 90 B.R. at 166. Under these “facts,” the Trustee argues, SMI should be seen as merely having decided to pay a valid debt without a cognizable expectation that its corresponding debt from Continental would be paid. If SMI and Continental’s payments of their unrelated debts could be seen as unrelated occurrences that just happened to coincide, then Continental’s payment could be found to be a preference avoidable under section 547.

However, the clear intent of the parties, as expressed through their overt acts, may not be so readily ignored. As part of their general and longstanding business practice SMI and Continental customarily accrued and then set off, sometimes by accounting entries and sometimes by check exchange, debts to the other. In the check exchange in question SMI and Continental took every step possible to ensure that their checks would cross in the collection process since neither had funds sufficient to cover their checks. As neither intended a substantial amount of money to change hands, there was no need to have sufficient funds on hand, apart from the coordinated deposits of the other’s check, to ensure that their own check would clear. Although checks were used, in essence the exchange constituted an accounting exercise to clear their books of mutual debts.

SMI would have been entitled to assert its right of setoff under section 553(a) post-petition if the check exchange had not been executed before Continental’s petition was filed since both debts were incurred pre-pe-tition. Braniff Airways, Inc. v. Exxon Co., 814 F.2d 1030, 1039-40 (5th Cir.1987). Where a creditor fails “to exercise its right of setoff prior to the filing of the petition” it does not lose the right, but must “proceed in the bankruptcy court by means of a complaint to lift the automatic stay so as to be allowed to exercise its already existing right to offset.” In re Compton Corp., 22 B.R. 276, 278 (Bankr.N.D.Tex.1982). And, as the Trustee concedes, there is no evidence that the debt SMI extinguished in the setoff was incurred either fraudulently or ‘for the purpose of obtaining a right of setoff against the debtor.’ ” In re Southern Indus. Banking Corp., 809 F.2d 329, 332 (6th Cir.1987) (quoting 11 U.S.C.A. § 553(a)(3)(C)). It would be inequitable to construe section 553(b) to prevent “the parties from voluntarily doing, before the petition is filed, what the law itself requires to be done after proceedings in bankruptcy are instituted.” Studley, 229 U.S. at 528-29, 33 S.Ct. at 808-09.

III.

Since the debts the two parties eliminated with the setoff were not exactly the same, the resulting checks were not equal. The check exchange was a proper setoff only up to the amount that SMI and Continental owed each other equivalent amounts. Since SMI sent Continental $271,967.20 while receiving from Continental $273,137.62, an insufficiency of $1,170.42, recoverable from SMI, was created pursuant to sections 553(b)(1) and (b)(2). SMI must return this insufficiency to Continental’s estate. The district court judgment is reversed, and the case is remanded for entry of an appropriate judgment in favor of the estate consistent with this opinion.

REVERSED AND REMANDED. 
      
      . Appellee’s motion to include an addendum to his brief is granted.
     
      
      . Two of these other actions were reduced to judgments on the same day the bankruptcy court ruled in this case. Those two judgments total $11,286.67. A third judgment was later entered against SMI in the amount of $40,-000.00. Counsel for SMI stated at argument that SMI is currently unable to satisfy these judgments, totalling $51,286.67.
     
      
      . To the contrary, according to the briefs filed by the parties in the district court, this issue was adequately raised and argued. Since resolution of this legal issue involves no factfinding, we shall address it on the merits.
     
      
      . The right of pre-petition setoff is further limited by the "improvement-in-position" test designed to ensure that a creditor will not improve its position during the 90-day period before bankruptcy and then protect its position by completing a setoff prior to the debtor’s filing of a petition. See 4 Collier on Bankruptcy ¶¶ 553.-01 [4], .08(3] (15th ed. 1989). This improvement-in-position test is "in essence, a miniature preference provision akin to § 547(d)(5).” In re Balducci Oil Co., 33 B.R. 847, 852 (Bankr.D. Colo.1983).
      Since the mutual debts Continental and SMI extinguished by the check swap represented only shipments delivered more than 90 days before Continental filed its petition, and there has been no allegation that SMI improved its position as to these debts prior to completing the setoff, the improvement-in-position test does not limit this setoff.
     