When it comes to bank stocks, I've long been a proponent of buying the best and then holding on to them for years if not decades to come. In my opinion, there is no other feasible way to generate a reward that compensates one for the risk of investing in financial institutions that are leveraged 10 to one.

But even though I continue to believe that this is the best way to invest in banks, I recently ran some numbers that led me to wonder if there isn't another piece to the puzzle. More specifically, I'm starting to think that the only time one should invest in bank stocks is in the depth of an economic downturn.

U.S. Bancorp (USB -1.06%) and M&T Bank (MTB -2.52%) serve as cases in point. If you've read many of my columns on banking, then you likely know that I believe these are two of the best-run lenders in the country. This is largely because these firms have mastered the two indispensable traits of exceptional banking -- namely, thrifty operations and prudent risk management.

It should come as no surprise, in turn, that M&T Bank and U.S. Bancorp have generated some of the best shareholder returns in not only the financial industry but also the market at large. In the three decades between 1983 and 2013, they produced compound annual growth rates of 15.8% and 12.9%, respectively, blowing away every other traditional lender with the exception of Wells Fargo.

But -- and this is a critical point -- this doesn't mean you can always feel comfortable buying shares of these banks. I say that because the price that you pay matters. A lot. In fact, if you look over the past two decades, the only two times you could have bought these stocks and subsequently beaten the market by a healthy margin were following the bursting of the Internet and housing bubbles.

Not to overstate the point, but this is a critical insight. Investors buy and sell bank stocks everyday. But doing so now -- after all of the good ones have long-since recovered from the financial crisis -- may lock you into a position that has little hope of beating the broader market.

My point is this: Buying bank stocks that are likely to outperform the market is a function of three variables. First, you have to buy the best. Second, you have to hold onto them for a long time. And third, by the looks of it at least, you should probably limit your actual purchases to those instances in which everyone else is frantically running for the exits.