Bank stocks have crushed it since the beginning of 2021, beating the S&P 500's overall returns. During this time, the SPDR S&P Regional Banking ETF has gained 44% while the Financial Select Sector SPDR Fund has gained 43.6%, compared to the SPDR S&P 500 ETF Trust, which gained 27%.

Not only that, but banks have gotten off to a hot start in the new year, with the regional banking ETF gaining 8.8% through Tuesday's close while the financial sector ETF is up 2.2%, compared to the S&P 500, which is down 4%.

While the banking sector isn't as sexy as technology or the hot new fintechs, certain economic factors will work in its favor this year. Here's what you should know going into 2022.

How banks make money

Traditional banks make most of their money by effectively managing interest -- charging customers more for loans than they pay for holding customers' deposits. Some banks make more in fees, and investment banking is another model altogether, but by and large, the amount banks are able to charge in interest makes a big difference to their business.

Over the past decade, banks have faced tighter margins due to the low-interest rate environment we have experienced. Low interest rates mean that banks' net interest margin -- or the difference between the interest they earn from loans and the interest they pay out to account holders -- becomes compressed. As a result, banks have collected less net interest income.

As you can see from the chart below, banks saw net interest margin decrease from the end of the great financial crisis in 2009 through 2015. From 2015 through 2018, the Federal Reserve gradually raised interest rates, and net interest margin improved. Then, following drastic cuts in interest rates in response to the pandemic, net interest margin took a hit once again. 

A chart showing the net interest margin for banks from 2008 through 2020.

Image source: Federal Reserve Economic Data. 

Interest rates will rise -- and banks will benefit

The Federal Reserve has recently said that it was planning on ending many of the emergency programs it put in place in response to the coronavirus pandemic. Federal Reserve Chairman Jerome Powell recently said that tighter monetary policies, including raising interest rates, would be needed to control inflation.  

Banks can earn higher net income and widen net interest margin when rates rise. The Federal Reserve expects to raise rates three times in 2022. Goldman Sachs recently said that it believes the Federal Reserve could raise interest rates four times this year, upping its forecast from three last year.  

Vivek Juneja, an analyst at JPMorgan Chase Securities, told Barron's that the first few rate hikes benefit banks the most as loans are repriced faster than deposit costs rise.  

A banker meets with a young couple.

Image source: Getty Images.

What you can do

There are a few things investors can do to take advantage of this. Diversification is an excellent strategy to grow your wealth over time. One key tenet of investing the Motley Fool way is buying 25 or more stocks over time to build diversified wealth.

Bank stocks can be great to add to your diversified portfolio, especially given the current inflationary environment. There are some banks you could add to your portfolio today. Warren Buffett's favorite bank stock is Bank of America (BAC -0.13%), which made up 14.6% of Berkshire Hathaway's total portfolio through the third quarter last year. What Buffett likes is the bank's management, its profitability, and its technology investments. Another solid bank to add to your portfolio is U.S. Bancorp (USB 1.56%). This bank does well by focusing on risk management and maintaining strong credit quality.

Despite the run-up in bank stocks in the past year, I believe they still have room to run. While bank stocks may not have the impressive growth stories that other companies do, they can be a great option for investors to add to as part of a diversified portfolio, especially given the inflationary backdrop that we are currently experiencing.