With unemployment falling, the housing market picking up steam, and the U.S. economy moving in the right direction, it's not a question of if, but when, the Federal Reserve will start raising interest rates again. While the stock market is generally wary of what rising rates might mean for investors and equities, there is a small group of small companies that may benefit enormously from a steady increase in interest rates: community banks.

Here's why
Banks pay depositors for capital, lend that capital to creditworthy borrowers at higher rates, and pocket the difference between what it pays depositors in interest and what borrowers pay the bank in interest. That spread is a bank's net interest margin, and the higher, the better. A rising net interest margin means a bank is getting more profitable.

Core net interest margins will generally rise when interest rates fall. That's because deposits -- think about a CD with a typical maturity of one month to one year -- will reprice faster than loans, like a home mortgage with a typical 10- to 30-year duration. When interest rates rise, the opposite will happen, so banks should generally be less profitable in a rising rate environment. This is also the crux of the recent bear case that several hedge funds presented for Bank of Internet (AX 2.21%), an online financial institution whose price-sensitive deposits should reprice fastest of all.

But I suspect the opposite will be true for small banks such as New York's Suffolk Bancorp (SCNB), because banks like this are closely tied to the communities in which they operate and therefore don't compete for deposits on price. Rather, they have gathered deposits on the basis of relationships and high levels of service. These deposits are not only loyal, but if history is any guide, they're also nearly yield-agnostic.

Now that's loyalty
For example, despite loan quality issues that caused the bank to swing to a loss in 2010 and 2011 and may have sparked a run at another institution, Suffolk Bancorp essentially held on to all of its deposits during that timeframe, despite their yielding well less than 1%. Fast-forward to today, and Suffolk Bank's cost of funds is less than 20 basis points. That's among the lowest of any bank I track anywhere -- a group that includes the very captive market served by the Bank of Greenland!

So as interest rates rise, Suffolk Bancorp's loan portfolio should reprice a lot faster than those yield-agnostic deposits, making the bank more profitable. What's more, given that Suffolk's loan-to-deposit ratio stands at just 70% today, the bank could additionally benefit from increased loan activity at higher rates.

But Suffolk Bank is not the only community bank positioned to benefit from rising rates. Motley Fool Asset Management has consistently been looking at community banks most investors have never heard of with similarly loyal deposit bases, loan-to-deposit ratio expansion opportunities, or both.

Bank

Recent Cost of Funds

Recent Loan-to-Deposit Ratio

Access National (ANCX)

0.55%

118%

Carter Bank & Trust (CARE)

1.14%

47%

Cascade Bancorp (CACB)

0.15%

83%

Monarch Financial (MNRK)

0.53%

91%

New Hampshire Thrift (NHTB)

0.58%

104%

Sources: Motley Fool Asset Management estimates and company filings.

The reason to build a basket of these banks is simple: diversification. Because each one is so closely tied to the economy of its community, we may want to spread our exposure believing that an economic contagion in New Hampshire is unlikely to spread to central Oregon (though it could happen, particularly if that contagion is caused by the zombie apocalypse).

Interest rates won't rise overnight, but it's only a matter of time until they do. And while most banks are not looking forward to rising rates, the market is overlooking the fact that these small banks should be more profitable as a result.