Warren Buffett has a saying about the stock market and investing in general: "Be fearful when others are greedy and greedy when others are fearful."

Time and again, the value investor has used this philosophy to pounce on opportunities.

In 2011, when investors were still reeling from the fallout of the subprime mortgage crisis, and Bank of America was struggling with big losses and major legal bills, Buffett's Berkshire Hathaway plunked down $5 billion for preferred shares in the lender. The idea, which Buffett said dawned on him while taking a bath, bought time for Bank of America to bring itself back to health.

Bank of America's stock, trading below $10 when the deal was announced that August, has rebounded to $24.

For its efforts, Berkshire will be sitting on a paper profit of about $12 billion, once it exercises warrants for 700 million common shares at $7.14 a share, a move the company said Friday it would do now that Bank of America plans to raise its dividend 60 percent.

Buffett is bullish on financials, to be sure. Berkshire's portfolio was roughly 30 percent financials, its biggest sector bet, as of the end of March. That's even before the Bank of America common shares are added. Its next two biggest sector holdings are consumer noncyclicals, at 28 percent, and technology stocks, at 19 percent.

But banks had been a mainstay of Berkshire's holdings even before the crisis. It is a longtime holder of Wells Fargo and M&T Bank. It has held American Express shares since the 1990s, and US Bancorp since 2006.

From a long-term perspective, his embrace of bank stocks would seem to signal his bullish view on the U.S. economy. But financial stocks have a more practical purpose for Berkshire. "He's got a lot of cash to put to work and he needs bigger and bigger positions to move the needle," said David Rolfe, chief investment officer at St. Louis-based Wedgewood Partners, which has $6 billion under management, about 9 percent of that in Berkshire B shares.

"He's placing capital in best-of-breed companies he knows our society is going to need for many years to come," Rolfe said.

By his estimation, banks make up about 15 percent of Berkshire's $423 billion market capitalization. Combined, stakes in common shares of Wells Fargo and Bank of America (assuming the warrants are exercised) would be nearly 10 percent, Rolfe said.

A $5 billion investment in Goldman Sachs was another crisis-era coup for Berkshire, which is currently the bank's sixth-biggest holder with 2.8 percent of shares as of the end of March. Berkshire struck that deal in the darkest days of the subprime mortgage meltdown, just days after the collapse of Lehman Brothers and at a time when it wasn't certain how the banking system would work through the crisis.

Goldman's shares dipped below $50 back then. They currently trade around $223.

And Berkshire owns nearly 17 percent of American Express and just under 10 percent of Wells Fargo, an investment it has stuck by despite an embarrassing sales scandal that engulfed the company last fall.

Banks, especially, are exactly the type of company Buffett likes. They have a relatively simple business model — use cheap deposits to make higher-rate loans. They are essential to other companies and they tend to have strong brands in their core markets. "Banking is a very good business unless you do dumb things," Buffett told Fortune magazine in 2009.