Once interest rates rise, bank stocks should take flight. Image credit: DigitalVision/Thinkstock.

One of the reasons that shares of Bank of America (BAC 3.35%) and Wells Fargo (WFC 2.74%) are so attractive right now is because their earnings, which impact the value of their stocks, are being weighed down by low interest rates. Once rates rise -- and they will at some point -- both companies will make a lot more money.

If interest rates return to where they've been on average since the year 2000, and holding all else equal, then Bank of America's top line could expand by as much as $11.6 billion a year. Wells Fargo's could grow by twice that, or $23.3 billion.

The mechanics of banking
Banks are retailers of money. They buy funds at wholesale prices from depositors and institutional investors, and then sell them to people and businesses in need of financing. The "cost of funds" is the price they pay. And the "interest on earning assets" is the price they receive for selling it.

For instance, Bank of America paid $10.5 billion to acquire funds in 2015. It then earned $50.7 billion from lending that money (plus some of its own) back out. The difference, its "net interest income," was $40.2 billion. The same figure for Wells Fargo was $46.4 billion last year.

Metric

Bank of America

Wells Fargo

Interest on Earning Assets

$50.7 billion

$50.4 billion

Cost of Funds

$10.5 billion

$4.0 billion

Net Interest Income

$40.2 billion

$46.4 billion

Net Interest Margin*

2.20%

2.95%

*Net interest margin computed by dividing net interest income by average interest-earning assets at Bank of America and Wells Fargo of $1.83 trillion and $1.57 trillion, respectively. Data source: Bank of America's 4Q15 earnings supplement and Wells Fargo's 4Q15 earnings release.

You can then compute the margin that a bank earnings from buying money cheap and selling it dear. This is known as the "net interest margin," and is calculated by dividing a bank's net interest income by the amount of money it lends out -- its "interest-earning assets.

Bank of America's net interest margin in 2015 was 2.19%; Wells Fargo's was 2.95%.

This figure is influenced heavily by interest rates -- and short-term rates in particular. Fifty years ago, a bank's net interest margin was a function of the spread between low short-term rates and high long-term rates. The bigger the spread, the bigger a bank's net interest margin.

But all of this changed in the 1970s. OPEC's oil embargoes in 1973 and 1979 caused energy prices to soar. This triggered double-digit price inflation throughout the broader economy in the late 1970s and early 1980s. The Federal Reserve responded by scaling up short-term rates to combat inflation. The net result was that a bank had to buy money at 18% which it was lending back out at 10% or less.

This triggered the savings and loan crisis, fueled a downturn in commercial real estate, and led to many hundreds of failures in the banking and thrift industries. Most notably, the nation's seventh biggest bank at the time, Continental Illinois, had to be bailed out by the government lest it collapse and take the rest of the industry down with it. This was the first "too big to fail" bank.

Banks responded by changing their business models. As opposed to lending money to homeowners at fixed rates for 30 years, they began securitizing mortgages to get them off their books. This reduced "interest rate risk." Banks then switched their attention to commercial loans, which have shorter maturity schedules and are indexed to short-term rates. This allowed banks to produce a profit from buying and selling money irrespective of the cost of funds. If short-term rates went up, a bank's interest from earning assets would follow suit.

However, banks are now experiencing the corollary of this today. Because short-term interest rates remain unprecedentedly low, so too does the amount of revenue banks earn on their asset portfolios.

The good news is that this won't last forever. It's impossible to say when interest rates will return to more reasonable levels, but it's not impossible to say that they'll eventually do so. The Federal Reserve will push rates higher when the economy picks up more steam, as the latter should translate into higher inflation. This is only a matter of time, as the United States economy has never not recovered from an economic downturn in the past.

This is why I think shares of Bank of America and Wells Fargo are attractively priced right now. Their valuations are based on the current interest rate environment, not on the one that will materialize in the hopefully not-too-distant future. Thus, if you're on the hunt for bargains in the stock market, then banks aren't a bad place to start sniffing around right about now.