The banking industry has just come through a significant period of volatility, spurred on by the failures of three major banks in March and April. While those bank failures were due primarily to issues related specifically to those banks, brought on by difficult market conditions, they had a much broader effect on bank stocks.

As a result, bank stocks, as measured by the KBW Bank Index, are down about 18% year to date. That's in contrast to the S&P 500, which is up about 15%.

The good news is that bank stocks have bounced off those post-crisis lows, as the KBW Bank Index is up about 11% over the past month. However, some bank stocks are still struggling, and a potential economic slowdown or recession could lead to more volatility. Volatility in the banking industry is not something you can control, but you can control what you do about it. Here are a couple of recommendations.

1. Don't panic sell

If you own bank stocks and have seen them plummet in value while the rest of the market is up, there may be an urge to dump the stock, but that's probably not a good idea for a few reasons. First, when you sell when the stock price is down, you are just locking in your losses. If you hold and ride out this period of volatility, the stock will likely rebound.

If you go back to the start of the pandemic in 2020, stocks like Goldman Sachs (GS 1.79%) got hammered. Goldman Sachs fell some 46% in a few months' time, dropping to about $135 per share in March 2020. By November 2021, it was trading at over $400 per share. Of course, the market crashed in 2022, and Goldman Sachs was down about 8% for the year, but even with that drop, it is still trading at $338 per share -- and that's up about 150% from the pandemic lows and 37% from pre-pandemic highs in January 2020.

Many large banks are well capitalized, stress tested, and navigated the recent bank failures pretty successfully, as there was a flight to stability. However, if you hold smaller or regional banks, you should be a little more cautious and do your research to make sure the bank is still healthy. Banks could be facing additional regulations, and there could be some consolidation coming out of this period of volatility, so take those factors into consideration as well.

2. Look for good values

The question of whether to sell is not the only one facing investors; they should also be looking for good buying opportunities in the banking space. The volatility that occurred in March and April, and into early May, brought down the valuations of a lot of good bank stocks, and bolstered some of the strongest and sturdiest large banks.

For example, JPMorgan Chase (JPM 0.06%), the largest U.S. bank, actually saw an increase in deposits in the first quarter, as many customers of smaller banks moved their money to the safety of this large, well-capitalized bank. JPMorgan Chase also saw revenue rise 25% and net income jump 52% in the first quarter, year over year, and it acquired one of the failed banks, First Republic Bank. 

Then there is Bank of America (BAC -0.21%), which has seen its stock price drop 12% YTD. This is an excellent bank that is trading at a dirt cheap valuation, with a price-to-earnings ratio of 8.7 -- the lowest since the start of the pandemic. It is also trading below its book value, with a price-to-book ratio of 0.92. For one of the best, and largest, banks in the U.S., Bank of America is a great buy at this valuation.

Ultimately, what happens in the banking industry is out of your control, but you can take advantage of the volatility by thinking strategically and looking for bargains.