The 2022 market downturn has affected nearly all sectors of the stock market, and bank stocks certainly haven't been an exception. Recession fears have led to investor concerns that loan demand could fall and defaults could tick upward.

While these are certainly legitimate concerns, there are also some very attractive opportunities in the banking industry right now. Two in particular that look interesting are Bank of America (BAC -3.34%) and Ally Financial (ALLY -1.39%), both of which are trading at cheap valuations and could grow their profits significantly over the next few years.

Bank of America could see its income rise by billions

The largest bank in the United States by deposits, Bank of America is a massive institution. It has $3.24 trillion in total assets, $2.07 trillion in deposits, and $978 billion in loans. Recent growth has been impressive, with the loan portfolio increasing 10% year over year in the first quarter and deposits up by 13% over the same period.

To be sure, Bank of America isn't immune to inflation and recessions. But with the stock down by nearly 35% from its recent high and trading for less than 1.1 times book value, the negative effects of the current economic climate are likely priced in at this point.

What's more, Bank of America is positioned better than most of its peers to benefit from a rising-rate environment. The bank has about $800 billion in deposits that are not interest-bearing, so as the rates that it can charge on loans increase, profit margins get wider. In fact, management has estimated that an upward move of 1 percentage point in interest rates could result in $5.4 billion in additional net interest income annually.

Ally is a cheap and profitable bank stock with lots of room to grow

Ally Financial isn't as much of a household name as Bank of America, but it's one of the more interesting bank stocks from a value perspective.

If you aren't familiar, Ally was formerly General Motors' (GM 0.19%) GMAC financing division and was spun out in the wake of the financial crisis. So it shouldn't come as too much of a surprise that the largest part of Ally's lending operation is in the automotive space.

In the first quarter, Ally originated $11.6 billion in auto loans. The bank also operates an auto insurance business and offers mortgage loans, credit cards, and corporate loans.

On the deposit side, the bank has 2.5 million retail customers with a total of $136 billion in deposits, as well as an investment platform that offers both robo-advisory and traditional brokerage services. And it does all of this without any banking branches.

Because Ally doesn't have a costly branch network to worry about, and because it focuses on auto loans (which have an average interest rate of more than 7%), it is a very profitable bank. It has a net interest margin of nearly 4%, while most banks sit in the range of 2% to 3% range, and its return on equity is significantly higher than the industry average.

The company has been aggressively buying back shares and paying dividends with its profits. Ally trades for just five times trailing-12-month earnings and for just over its book value, a remarkably cheap price given its profitability.

Buy for the long term

It's important to emphasize that the stock market continues to have a very volatile 2022, and many experts are projecting a recession within the next year. So it's fair to say that there's quite a bit of near-term uncertainty in the market, and that both of these bank stocks could be volatile. These are two well-run banks with attractive valuations and lots of room to grow profits, but it's wise to expect a bit of a roller coaster ride while the current economic issues play out.