
127 B.R. 206 (1991)
In re MADCAT TWO, INC.
MADCAT TWO, INC., Plaintiff,
v.
COMMERCIAL NATIONAL BANK OF SHREVEPORT, Defendant.
Bankruptcy No. 90-40522 S, Adv. No. 90-4055.
United States Bankruptcy Court, E.D. Arkansas, Little Rock Division.
February 25, 1991.
*207 Jack Sims, Little Rock, Ark., for debtor.
W. Michael Reif, Little Rock, Ark., for Commercial Nat. Bank of Shreveport, La.

MEMORANDUM OPINION
MARY D. SCOTT, Bankruptcy Judge.
Now before the Court is a Complaint to set aside a preferential transfer filed by the debtor-in-possession, Madcat Two, Inc. ("Madcat"), in this Chapter 11 proceeding. The Complaint was set for trial November 15, 1990. On that date the debtor appeared by counsel, Jack Sims, Esq., and the Defendant, Commercial National Bank of Shreveport, Louisiana ("Bank"), appeared by counsel, Michael Reif, Esq. The parties advised the Court that the only remaining issue raised in the Complaint could be decided on a joint stipulation of facts and briefs. The Court gave the parties until December 6, 1990 to submit their stipulations and briefs. The matter was taken under submission December 10, 1990.
This Court has subject matter jurisdiction pursuant to 28 U.S.C. § 1334(a) and § 157(a). Moreover, the Court finds that this is a "core proceeding" within the meaning of 28 U.S.C. § 157(b)(1), as exemplified in § 157(b)(2)(F) and (K). Accordingly, this Court may enter a final judgment. 28 U.S.C. § 157(b)(1).

I. FACTS
The following joint stipulations of fact were submitted by the parties:

*208 1. The Debtor established a general operating bank account with Commercial National Bank of Shreveport, Louisiana (Commercial National) on April 1, 1988. The name of the checks issued with respect to account was Carolyn's Hallmark Cards and Gifts.
2. On March 26, 1988 the Debtor executed a promissory note in the original principal amount of $87,302.85.
3. The promissory note contained the following provision with respect to the right of set-off:
The makers, endorsers, guarantors and sureties hereby severally authorize payee to pay this note at maturity or at any time thereafter by charging the amount first to the account of the maker and in the event the maker's account is insufficient, then to the account of any co-maker, endorser, guarantor or surety being expressly understood and agreed that payee is to have the option of paying or not paying this note at its discretion and without liability on its part to the makers, endorsers sureties and guarantors for non-payment when the option to pay is not exercised. When this note matures for any reason provided in this note any money, stocks, bonds or other property of any nature whatsoever on deposit with, whether general or special, or held by or in possession of payee as collateral or otherwise to the credit of or for the account of the makers, endorsers, guarantors or sureties or any of them may be at the option of the payee by applied or sold and the proceeds applied to the payment of this or any other indebtedness due payee by said parties or any of them.
4. On December 5, 1989, ninety (90) days prior to the Debtor's filing for bankruptcy protection, the Debtor owed principal and interest in the amount of $72,008.17 to Commercial National. The Debtor's checking account had a balance of $9,945.17 on this date as well. The difference between the principal and interest owed to Commercial National and the balance held in the checking account was $62,063.
5. On January 19, 1990, Commercial National set-off the amount of $12,400 from the Debtor's checking account and applied it to the balance due and owing on the promissory note. On this date the Debtor owed principal and interest in the amount of $73,054.66 to Commercial National. The difference between the principal and interest and the balance held in the Debtor's checking account was $60,654.66.
6. At the time Commercial National executed the set-off of Debtor's account, there was in existence a Louisiana statute, LSA R.S. 6:316 which dealt with the security interest created by a bank account and a subsequent right of set-off. A copy of the statute is attached hereto as Exhibit B.
7. The Debtor filed a petition for relief under Title 11, Chapter 11 of the United States Code on March 6, 1990.
In addition, the parties attached to their stipulation as exhibit A, a copy of their loan agreement, and as exhibit B, a copy of Louisiana Revised Statute 6:316.

II. DISCUSSION
Madcat filed this action against the Bank for recovery of funds that were in Madcat's checking account with the Bank, and which the Bank applied to the balance due on a promissory note. Madcat asserts that the Bank's pre-petition setoff of its checking account balance against the balance due on the Bank's note amounted to an avoidable preferential transfer. Debtor seeks to avoid the entire transaction pursuant to 11 U.S.C. § 547(b). In the alternative, Madcat contends that as a result of the setoff, the Bank bettered its position at the expense of the bankruptcy estate and other creditors, and, under 11 U.S.C. § 553(b) the Bank must return the amount of the betterment to the debtor.[1]
*209 The Bank asserts that it is a banking institution carrying on business in the State of Louisiana, and, as such, its activities are governed by Louisiana law governing Louisiana financial institutions. The Bank contends that Louisiana Revised Statutes section 6:316 grants it a perfected statutory lien upon the deposit accounts of persons who also owe a debt to the Bank. The Bank further contends that under section 6:316 it has a right to setoff deposit accounts against debts which are past due, and that, in the case of Madcat, it properly exercised its rights.
It is difficult to pin down the statutory authority on which Plaintiff relies due to the inconsistencies of the Complaint, the stipulation of facts, and the trial brief. Plaintiff's Complaint alleges that the Bank has been the beneficiary of an avoidable preferential transfer. However, both the stipulation, and the trial brief concern themselves with the Bankruptcy Code's limitations on the right of setoff. 11 U.S.C. § 553(b).[2] After examining the record and the documents before the Court, the Court concludes that for all practical purposes Madcat proceeds solely under section 553(b), arguing that the Bank's alleged setoff of debtor's account within ninety (90) days before bankruptcy resulted in a transfer of debtor's property which is recoverable under the "betterment of position" test. See 11 U.S.C. § 553(b).
The Bank contends that it possesses a statutory lien on Madcat's checking account pursuant to Louisiana Revised Statute section 6:316. La.Rev.Stat.Ann. § 6:316 (West Supp.1991). The Bank argues that the statutory lien attached on the effective date of the statute, September 1, 1989, which was more than ninety (90) days before Madcat filed its Chapter 11 petition. Consequently, the Bank states that under 11 U.S.C. § 547(c)(6), Madcat may not set aside the fixing of the lien as a preferential transfer. The Bank further contends that if the Court does not find that Louisiana law creates a statutory lien, then the maximum amount the Bank can recover is the amount the Bank improved its position.
Both parties in this matter have confused the distinction between the avoidance of the fixing of a statutory lien upon property of the bankruptcy estate as a preferential transfer, and the exercise of a valid right to setoff when such a right exists.[3]Compare 11 U.S.C. § 547(c)(6) with 11 U.S.C. § 553.
A. Statutory Liens: 11 U.S.C. § 547(c)(6)
Section 547(b) of the Bankruptcy Code permits a Trustee under certain circumstances to avoid payments to creditors, or "preferences" made prior to the commencement of the case under Title 11.[4] This section also contains requirements which, if met, qualify the transaction as one which may be avoided as a preferential transfer. Subsection (c) further qualifies this section by identifying exceptions even though all the requirements of section 547(b) may be present. Relevant to the matter before the Court, subsection (c)(6) specifically provides that "[t]he trustee may not avoid under *210 this section a transfer  that is the fixing of a statutory lien that is not avoidable under section 545 of this title . . ." 11 U.S.C. § 547(c)(6).
A statutory lien is one created by statute, which arises automatically, and is not based upon an agreement to give a lien or as a result of a judicial action 4 Collier on Bankruptcy, ¶ 545.01 (15th ed.1990). Examples include: materialmen's, warehousemen's and tax liens. Id. Under section 545, a debtor may avoid the fixing of a statutory lien to the extent that it:
(1) first becomes effective against the debtor [upon financial distress];[5]
(2) is not perfected or enforceable at the time of the commencement of the case against a bona fide purchaser that purchases such property at the time of the commencement of the case, whether or not such a purchaser exists;
(3) is for rent; or
(4) is a lien of distress for rent.
In the present case, relevant section 545(2) provides that the enforceability of the statutory lien depends upon whether it was properly perfected as of the date of the filing of the bankruptcy petition. See In re Pierce, 809 F.2d 1356, 1361 (8th Cir.1987).
The Louisiana banking law cited by the parties became effective September 1, 1989. La.Rev.Stat.Ann. § 6:316. Paragraph (A) creates a lien on deposit accounts in favor of the depository bank whenever the depositor is also indebted to the Bank. Paragraph (B) provides that this lien arises by operation of law, and is deemed to operate as a statutory security interest. Paragraph (C) further provides the Bank with a statutory right to exercise setoff of deposit funds against indebtedness upon which the depositor has defaulted.[6]Id. Thus, after September 1, 1989, every deposit account in a Louisiana banking institution to which the depositor also owed an indebtedness, became, by operation of law, a pledge or security for all outstanding debt owed to the same banking institution.
Further, although the statute is silent as to specific steps necessary for perfection of this security interest, it does provide that the pledge need not comply with the requirements of Civil Code Article 3158,[7] or Revised Statute section 9:4321.[8] In addition, section 6:316 refers to the security interest it creates as a "pledge," which traditionally refers to a transaction *211 in which the secured party's interest is perfected when that party has possession of the collateral. Thus, section 6:316 automatically creates a valid statutory lien upon deposit accounts in banking institutions to which the depositors are also indebted. The joint stipulations submitted by the parties support a conclusion that under Louisiana law, the Bank had a perfected statutory lien on Madcat's checking account.[9]
Accordingly, under the Code, Madcat can only avoid this statutory lien if it can show that the Bank's lien was not properly perfected in a timely manner. 11 U.S.C. §§ 547(c)(6) and 545(2). Madcat, however, does not adequately address the statutory lien and perfection issues in its brief. Rather, Madcat argues that Louisiana Revised Statutes section 6:316 grants the statutory setoff right only in the event of default of the depositor on an indebtedness to the Bank. Whether the Bank established that the debtor was in default in order to exercise setoff, however, is a completely separate issue from when the lien arises and when it becomes perfected. In order to avoid the lien as a preferential transfer, the date of the fixing of the lien is critical. That date, under the agreed facts submitted by the parties, as well as the Louisiana statute, was September 1, 1989.
The creation of a lien is a transfer within the meaning of the Bankruptcy Code, and had the present lien been created during the ninety (90) day preferential period prior to bankruptcy it could have been successfully challenged and avoided. E.g., In re B-Way Construction, 68 B.R. 651 (Bankr. D.Or.1986); In re McCoy, 46 B.R. 9 (Bankr. D.Ariz.1984) (garnishment lien perfected within 90 days of bankruptcy constituted avoidable preference). In the present case, however, a perfected lien came into existence by operation of the Louisiana law on September 1, 1989, well over ninety (90) days prior to Madcat's bankruptcy filing. Since the statutory lien may not be avoided under section 545 of the Code, the Court finds that the fixing of the lien may not be avoided as a preferential transfer under section 547(b) of the Code. See In re Pierce, 809 F.2d at 1361.
B. The Right to Setoff/Foreclosure of a Security Interest
The distinction between setoff and foreclosure of a security interest was clarified in Smith v. Mark Twain Nat'l Bank, 805 F.2d 278 (8th Cir.1986). In Smith, the Eighth Circuit Court of Appeals held that section 553 was not applicable to a valid foreclosure of a security interest in an account. Section 553 applies only when a bank exercises setoff against an account in which it claims no consensual security interest. Id. at 290-91 (emphasis added). Also in Smith, the Eighth Circuit instructed courts not to entirely rely on the terms of transaction documents used to describe the nature of the financing, but to "focus on the economic reality of the situation" in order to determine what the parties intended. Id. at 290, n. 20.
The promissory note signed by the debtor contains two provisions regarding "security," each of which is preceded by a box which may be checked. One choice is titled "Separate Collateral Pledge Agreements," the other is titled "Setoff." The box next to "Separate Pledge Agreements" is blank, while the box next to "Setoff" is marked with an "X". Further, the language under the setoff provision appears to grant the Bank the right to setoff the balance of Madcat's checking account against an outstanding loan balance under the note. If the Bank so desired it could have provided that Madcat provide it with a more traditional form of identifiable commercial collateral, such as a certificate of deposit. See Smith, 805 F.2d at 278; In re 4-S Corp., 69 B.R. 499 (Bankr.W.D.Mo.1987). It did not. Thus, the Court finds that the commercial and economic realities of the present facts and circumstances demonstrate *212 that the Bank under this note agreement has a right to setoff with respect to Madcat's checking account, rather than a right to foreclose a consensual security interest. Thus, section 553 is applicable under the facts in this case.
C. Setoff Under the Bankruptcy Code
Title 11 of the United States Code does not create a right to setoff. The Code merely permits such a right to continue to exist when it arises pursuant to non-bankruptcy law. 11 U.S.C. § 553. This section also limits the continued existence of the right to setoff. In order to setoff under section 553, the debt and credit must not only be mutual, but must have arisen before the commencement of the bankruptcy case. See Bridgeport Co., Inc. v. United States Postal Service, 39 B.R. 118 (Bankr. E.D.Ark.1984); In re Wilson, 29 B.R. 54 (Bankr.W.D.Ark.1982).
The right of setoff in bankruptcy is measured as of the time the bankruptcy petition is filed. In re Howell, 4 B.R. 102, 105 (Bankr.M.D.Tenn.1980). A creditor is entitled to exercise setoff when the debts between the creditor and the debtor are owed and owing at the time of the filing of the petition. In re Lawrence, 19 B.R. 627 (Bankr.E.D.Ark.1981). The right of setoff exists if debt is absolutely owing at time of filing of petition, even though not due or liquidated. Id.
Madcat executed a promissory note to the Bank in the amount of $87,302.85 on March 26, 1988. Madcat then established its deposit account at the Bank on April 1, 1988. Under the stipulated facts, a debt between Madcat and the Bank was owed and owing from April 1, 1988 to the date of the setoff which occurred on January 9, 1990. The requirements for a valid right to setoff were met.
Although the Bank's right to setoff is valid under section 553(a), it nevertheless may be restricted under section 553(b). Section 553(b) limits the right to setoff to the balance of accounts as they stood at the beginning of the 90 day period prior to bankruptcy. Any increase during that time in the secured position of the creditor represents an improvement in the creditor's position, and may be recovered if setoff. The debtor-in-possession may recover the difference between any insufficiency on the date of the pre-petition setoff, and the insufficiency on the first date during the 90 days immediately preceding the date of filing the petition. In the present case, the setoff occurred within the ninety (90) days prior to date of the filing of the Madcat's petition. Consequently, section 553(b) applies.
On January 19, 1990, the amount due and owing on the promissory note (principal and interest) was $73,054.66. The amount offset from Madcat's account was $12,400.00. Thus the amount of the insufficiency on the date of setoff was $60,654.66. On December 5, 1989, 90 days prior to Madcat's filing its petition, the amount due and owing on the promissory note (principal and interest) was $72,008.17. The amount setoff from Madcat's account was $9,945.17. Thus the amount of the insufficiency 90 days prior to bankruptcy was $62,063.00. Under section 553(b), the amount by which the Bank bettered its position was $62,063.00 less $60,654.66, or $1,408.34. Consequently, the Bank has bettered its position by $1,408.34, and must return this amount to Madcat, the debtor-in-possession.
In its brief, Madcat contends that the Bank is not entitled to include interest that accrued on the loan from 90 days prior to bankruptcy up to the date of setoff as part of the amount of the loan due and owing on the date of setoff in the loan insufficiency calculation. Debtor, however, fails to cite any authority for this proposition. Debtor does refer to an example in Collier on Bankruptcy, where the calculations appear to support this proposition. See 4 Collier on Bankruptcy, ¶ 553.15. On closer examination, however, one notes that the example merely makes the assumption that the amount of the debt has remained constant during the 90 days preceding bankruptcy. This appears to be more for the simplification of the mathematics of the example. The Court does not *213 find that the example supports the debtor's contention that a debt cannot accumulate interest during the 90 day period for purposes of the insufficiency and setoff calculations. In fact, "insufficiency" is defined in terms of the creditor's "claim," and "claim" is very broadly defined as a "right to payment."[10] In the present case, the Bank's claim on January 19, 1990 was $73,054.66. The Court finds that the Bank is entitled to include accrued interest in the insufficiency calculation for the purpose of determining the extent of the improvement of the Bank's position.

III. CONCLUSION
Madcat's first claim, that the January 19, 1990 setoff was a preferential transfer is rejected for a failure of proof as to the elements of a preferential transfer under 11 U.S.C. § 547.
Madcat's second claim that the January 19, 1990 setoff is subject to the 11 U.S.C. § 553(b) "betterment of position" test is well taken. Under the March 26, 1988 promissory note, Madcat and the Bank entered into a loan agreement, which among other provisions, granted the Bank the right to setoff any amount in Madcat's checking account against the overdue balance of the loan. On April 1, 1988, Madcat opened a checking account at the Bank. On January 19, 1990, which was less than 90 days prior to the date of Madcat's bankruptcy, the Bank exercised its right to setoff against Madcat's checking account. Under the section 553(b) "betterment of position" test the Bank improved its position by $1,408.34, and therefore must return that amount to the debtor-in-possession.
A separate judgment will be entered in accordance with the foregoing.
IT IS SO ORDERED.
NOTES
[1]  Although Madcat's complaint only alleges that the January 19, 1990 setoff was a preferential transfer, throughout its brief the debtor argues that the setoff should be subjected to section 553(b), and the amount by which the Bank's position was improved should be returned to the debtor. The court will treat the debtor's arguments as if they were pled in the alternative, which appears to be the format of its brief. Furthermore, the court finds that this will work no unfair hardship upon the defendant because it addresses both issues in its brief, and also focuses on the section 553 setoff issue, not the section 547 preference claim.
[2]  Madcat contends that under the terms of the promissory note between itself and the bank, the bank had the right to setoff only upon Madcat's default under the note. Madcat then contends that the bank's setoff was improper because the bank failed to demonstrate that Madcat in any way "defaulted" on the note. Subsequently, however, Madcat appears to abandon this contention when it admits in its brief that, "the set off claimed up to the amount of the betterment [of section 553(b)] would be appropriate[,] [and] [p]laintiff does not seriously argue otherwise."
[3]  The act of setoff is the cancellation of mutual debts. The act of setoff is not preferential because no transfer has taken place. Colliers Lending Institutions & The Bankruptcy Code, ¶ 2.07(5) (1986).
[4]  The Code provides that a Chapter 11 debtor-in-possession shall have all the rights, other than the right to compensation under section 330, and powers, and shall perform all functions and duties, . . . of a trustee serving in a case under this chapter. 11 U.S.C. § 1107.
[5]  (A) when a case under this title concerning the debtor is commenced;

(B) when an insolvency proceeding other than under this title concerning the debtor is commenced;
(C) when a custodian is appointed or authorized to take or takes possession;
(D) when the debtor becomes insolvent;
(E) when the debtor's financial condition fails to meet a specified standard; or
(F) at the time of an execution against property of the debtor levied at the instance of an entity other than the holder of such statutory lien;
11 U.S.C. § 545(1)(A-F).
[6]  

(A) . . . compensation takes place by operation of law between funds held on deposit with a bank organized under this Title or with a national bank domiciled in this state and any loan, extension of credit, or other obligation incurred by the depositor in favor of the bank. [. . .] The funds to which this compensation applies shall be deemed to be pledged by the depositor in favor of the depository bank.
(B) The pledge of such deposit accounts need not be reflected in writing or comply with the requirements of Civil Code Art. 3158 or R.S. 9:4321, et seq. Such a pledge shall instead be deemed for any and all purposes to constitute a statutory security interest arising by operation of law. [. . . ]
(C) In the event that the depositor should default under any loan, extension of credit or other direct or indirect obligation of any nature and kind whatsoever in favor of the depository bank, the bank shall have the right to apply any and all funds that the depositor then has on deposit with the bank . . . towards the payment of the depositor's indebtedness or obligations . . .
(F) Notwithstanding any provisions of Civil Code Articles 1893, et seq., compensation or setoff shall occur by operation of law between any funds held on deposit with the bank and any and all loans, extensions of credit, or other obligations of the depositor incurred in favor of the bank.
La.Rev.Stat.Ann. § 6:316.
[7]  "Formalities and contents of pledge; requirements for pledge of promissory notes and other written obligations." La.Civ.Code Ann.Art. 3158 (West 1952 & Supp.1990).
[8]  "Pledge of incorporeal rights not evidenced in writing." La.Rev.Stat.Ann. § 4321.
[9]  In its discussion of the distinction between a bank's right to setoff, and a bank's right to foreclose upon collateral in which it took a security interest, the court, in Smith v. Mark Twain Nat'l Bank, 805 F.2d 278 (8th Cir.1986), described the right to setoff as "the equivalent of a perfected security interest." Id. at 290 (citing Ahart, Adam M., Bank Setoff Under the Bankruptcy Reform Act of 1978, 53 Am.Bankr.L.J. 205, 227-29.).
[10]  11 U.S.C. § 553(b)(2) defines "insufficiency" as the amount by which a claim against the debtor exceeds a mutual debt owing to the debtor by the holder of such claim. A "claim" is defined broadly as a "right to payment, whether or not such right is reduced to judgment, liquidated, unliquidated, fixed, contingent, matured, unmatured, disputed, undisputed, legal, equitable, secured or unsecured [. . .]. 11 U.S.C. § 101(4).
