Some stocks have defied the market's gains this year, particularly in the banking industry. The March banking failures rattled the entire industry, dragging down pretty much all bank shares, at least for the time being.

Although there is continuing concerns for many banks, especially for smaller regional banks, the larger, sturdier banks appear adequately fortified to cope. Two big banks, in particular, are dirt cheap right now and worth a look as long-term investments -- Bank of America (BAC 3.35%) and Truist Financial (TFC 3.05%).

Screaming values

Bank of America is the second-largest bank in the country, with about $2.4 trillion in assets as of Dec. 31, while Truist is the seventh-largest bank in the U.S. and has about $546 billion in assets. Both took major hits during the banking crisis, with Bank of America's stock down about 10% year to date and Truist's roughly 21%.

While many investors sold bank stocks after the collapse of SVB Financial's Silicon Valley Bank and Signature Bank, the larger banks, particularly those with more than $250 billion in assets, were not in any real danger of deposit runs. That is because, unlike smaller banks below that asset threshold, bigger institutions are subject to stress testing and must meet liquidity requirements to withstand a shock.

Not only were they not in any danger of deposit runs, but also, in fact, were the recipient of deposit inflows as banking customers fled to the relative safety of larger banks during the turmoil.

Both of these banks report first-quarter earnings this week, so tune in to see how their deposits fared in the quarter and how the crisis affected them.

But last quarter, both saw net income gains despite higher provisions for credit losses. Truist's net income climbed 5.6% year over year, with revenue increasing 12%. Bank of America's net income rose 1.5% in the fourth quarter, while revenue climbed 11% from a year earlier.

What is striking about both of these banks is how cheap they are. Both are trading below book value, with price-to-book (P/B) ratios below 1. That means the book value of their assets is higher than their share price, suggesting the stock may be undervalued. Further, their price-to-earnings (P/E) ratios are absurdly low. Truist has a P/E ratio of 7.7, down from 9.9 at the start of the year and 12.7 a year ago. Bank of America has a P/E ratio of 9.5, down from 10.5 at the start of the year and 11.6 a year ago.

Low stock prices

Not only are their valuations attractive, as measured by their P/E and P/B ratios, but their stock prices are also low, giving investors a relatively affordable entry point. Truist is trading at about $34 per share, while Bank of America is trading at around $29 per share. That means if you had $500 to invest, you could buy about 15 shares of Truist and roughly 17 shares of Bank of America.

Both of these stocks are trading near 52-week lows, and analysts are bullish on their prospects for growth. Analysts on average have a price target of about $36 for Bank of America, about 20% more than recent prices. Truist has an analyst price target of $41, which would represent a 21% gain.

These estimates take into account that we could see an economic slowdown, if not a recession, in 2023. A slowing or shrinking economy could mean a reduction in loans, a drop-off in investment banking, and deteriorating credit quality with higher provisions for credit losses. But on the other hand, higher interest rates should continue to generate high interest income. Investors should pay attention to these two banks' coming earnings reports for any insight into how they might navigate an economic slowdown.

But short-term volatility aside, these are two solid, high-performing banks that are dirt cheap right now due largely to the March sell-off. Long-term, they look like good investments.