Total deposits were $2.71 billion at September 30, 2021, which reflects a $177.3 million increase from total deposits of $2.54 billion at December 31, 2020, and an increase of $235.1 million from total deposits of $2.48 billion at September 30, 2020. The increase in deposits at September 30, 2021, compared to both December 31, 2020 and September 30, 2020, was due to increases in noninterest bearing demand, savings, NOW, and money market accounts, with decreases noted in all maturity categories of certificates of deposit. These total deposit increases in the linked quarter as well as the year over year periods were primarily due to federal stimulus funds received by certain depositors due to the COVID-19 pandemic.
In addition to deposits, we obtained funding from other sources in all periods presented. Securities sold under repurchase agreements totaled $43.0 million at September 30, 2021, a $24.0 million, or 35.9%, decrease from $67.0 million at December 31, 2020. Our notes payable and other borrowings is comprised of one remaining $6.2 million long-term FHLBC advance, which matures on February 2, 2026, and $14.0 million outstanding on a $20.0 million term note originated with a correspondent bank in the first quarter of 2020, to facilitate the redemption of our Old Second Capital Trust I trust preferred securities and related junior subordinated debentures, completed on March 2, 2020. Notes payable and other borrowings of $20.1 million as of September 30, 2021, decreased $3.2 million from December 31, 2020, and decreased $4.3 million from September 30, 2020.
In the second quarter of 2021, we entered into Subordinated Note Purchase Agreements with certain qualified institutional buyers pursuant to which we sold and issued $60.0 million in aggregate principal amount of our 3.50% Fixed-to-Floating Rate Subordinated Notes due April 15, 2031 (the “Notes”). We sold the Notes to eligible purchasers in a private offering, and the proceeds of this issuance are intended to be used for general corporate purposes, which may include, without limitation, the redemption of existing senior debt, common stock repurchases and strategic acquisitions. The Notes bear interest at a fixed annual rate of 3.50% through April 14, 2026, payable semi-annually in arrears. As of April 15, 2026 forward, the interest rate on the Notes will generally reset quarterly to a rate equal to Three-Month Term SOFR (as defined by the Note) plus 273 basis points, payable quarterly in arrears. The Notes have a stated maturity of April 15, 2031, and are redeemable, in whole are in part, on April 15, 2026, or any interest payment date thereafter, and at any time upon the occurrence of certain events.
The Company is indebted on senior notes originated in December 2016, totaling $44.5 million, net of deferred issuance costs, as of September 30, 2021. These notes mature in December 2026, and include interest payable semi-annually at 5.75% for five years. Beginning December 2021, the interest becomes payable quarterly at three month LIBOR plus 385 basis points. The Company is also indebted on $25.8 million, net of deferred issuance costs, of junior subordinated debentures, which are related to the trust preferred securities issued by its statutory trust subsidiary, Old Second Capital Trust II (“Trust II”). The Trust II issuance converted from fixed to floating rate at three month LIBOR plus 150 basis points on June 15, 2017. Upon conversion to a floating rate, we initiated a cash flow hedge which resulted in the total interest rate paid on this debt of 4.41% as of September 30, 2021, as compared to 6.77%, which was the rate paid during the period prior to the June 15, 2017, rate reset.
Capital
As of September 30, 2021, total stockholders’ equity was $321.2 million, which was an increase of $14.1 million from $307.1 million as of December 31, 2020. This increase is attributable to an increase in retained earnings of $25.9 million, comprised of net income year to date of $29.1 million, less a reduction to retained earnings of $3.2 million for payment of dividends to our common stockholders in the first nine months of 2021. In addition, a decrease to accumulated other comprehensive income of $2.5 million was recorded due to a net decrease in unrealized gains on available-for-sale securities, net of unrealized losses on swaps. Total stockholders’ equity was reduced by an increase of $8.1 million to our treasury stock in the first nine months of 2021, primarily due to repurchases of our common shares pursuant to our stock repurchase program.
In the third quarter of 2019, our Board of Directors authorized a stock repurchase program, under which we were authorized to repurchase up to approximately 1.5 million shares (or approximately 5%) of our outstanding common stock through open market purchases, trading plans established in accordance with U.S. Securities and Exchange Commission rules, privately negotiated transactions, or by other means. The stock repurchase program expired on September 19, 2020; however, we received a notice of non-objection from the Federal Reserve Bank of Chicago to extend the previously authorized stock repurchase program through October 20, 2021. The actual means and timing of any repurchases, quantity of purchased shares and prices will be, subject to certain limitations, at the discretion of management and will depend on a number of factors, including, without limitation, market prices of our common stock, general market and economic condition, and applicable legal and regulatory requirements. These share purchases were funded by our cash on hand. During the third quarter of 2021, we did not repurchase any shares pursuant to our stock repurchase program. For the nine months ended September 30, 2021, we repurchased 766,034 shares at a weighted average share price of $12.81 per share. To date, we have repurchased 1,485,307 shares of our common stock at a weighted average price of $10.31 per share, under our stock repurchase program. As of September 30, 2021, we had substantially completed the stock repurchase program, which expired on October 21, 2021.