Q: My bank stocks have performed tremendously well over the past couple of years. Should I hold on to them or take my profits now?

The stock market has done incredibly well recently, and banks have been among of the best performers. Since a swift drop in early 2016, the sector has risen by more than 77%, with many banks doing even better. For example, Bank of America stock has nearly tripled since then, and JPMorgan Chase shares are up by over 100%.

However, it's important to realize that this isn't just a baseless move. The fundamentals of most banks have improved significantly. Revenue growth has been impressive, and most banks have done a great job of reducing expenses and making their operations more efficient by cutting costs and embracing new banking technologies.

Interior of a Bank of America branch

Bank of America has used technology to make its branches more efficient. Image source: Bank of America.

In addition, there are several catalysts that could propel bank profits even higher. The Federal Reserve is expected to raise interest rates several more times over the next few years, which should translate to higher profit margins. And with most banks' effective tax rates in the ballpark of 30%, the new 21% corporate tax rate could allow them to keep more of the money they make.

There are several areas of the market where I think the gains have been a bit excessive over the past couple of years (such as large-cap tech stocks), but the banking sector isn't one of them. The next few years should be good for the entire banking sector, and I wouldn't be surprised to see the big banks do even better.

Matthew Frankel owns shares of BAC. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.