After living through a bear market for more than a year, opportunistic investors know some bargain stocks are out there just waiting to be found. Unfortunately, there isn't any surefire way to tell apart those destined to climb higher from those that will underperform.

For more than five decades, paying attention to the stocks Warren Buffett and his lieutenants buy for Berkshire Hathaway's (NYSE: BRK.A) (NYSE: BRK.B) equity portfolio has been a winning strategy for generating long-term gains. Shares of the holding company have risen at a rate of 19.6% annually since Buffett took the helm in 1965.

The recent implosion of Silicon Valley Bank (a subsidiary of SVB Financial) and Signature Bank caused banking stocks to fall across the board in March. Now, shares of Ally Financial (ALLY 0.13%) and Citigroup (C -0.32%) are trading at bargain prices that are too good to ignore.

Ally Financial

Buffett famously loves banks because he knows people will always need a safe place to put their money. One bank that caught his eye last year was Ally Financial. This is an all-digital bank charging into the future, but it isn't an uncertain start-up. Ally began as the financial arm of General Motors more than a century ago.

At recent prices, the stock offers a 4.7% yield, and it could climb much higher. A lean, all-digital operating model allowed Ally Financial to raise its dividend payout by a whopping 131% over the past five years.

Despite rapidly cranking up its quarterly payout, Ally needed less than 15% of the free cash flow it generated last year to meet its commitment. That means there's plenty of room for new dividend raises even if earnings dip in response to an economic slowdown.

So far, Ally is weathering the storm. Fourth-quarter consumer auto originations fell about 16% year over year to $9.2 billion. Before reading too much into this decline, though, it's important to remember that stimulus checks caused auto sales to spike in 2021.

A recession could limit new loan originations, but each loan Ally originates now is earning significantly more. The estimated yield on new auto loans rose 2.6% year over year to 9.57% in the fourth quarter of 2022.

Last year, Ally Financial reported a healthy 14.4% return on equity. Despite impressive earnings power, it's trading for the low price of just 0.8 times its tangible book value. Buying the stock at this bargain valuation gives you a great chance to realize market-beating gains over the long run.

Citigroup

If you think Ally's trading at a low valuation for a bank stock, just wait until you hear about Citigroup. The stock sold off last month even though it's a "too big to fail" bank that's subject to strict capital requirements. Those capital requirements are designed to prevent the sort of bank runs that felled SVB Financial and Signature Bank.

Now you can buy shares of this systemically important bank for less than 0.6 times its tangible book value. Citigroup's trading at a low valuation because it's in the middle of a long transition following years of underperformance. In a nutshell, it's selling off its international consumer banking operations to streamline operations and focus on profits.

In the fourth quarter of 2022, Citigroup raised its tier 1 capital ratio to 13%, which is more than enough to satisfy regulators. Most systemically important banks distribute capital that exceeds regulatory requirements, but this bank is behaving extra-cautiously.

Citigroup is holding off on buybacks and dividend raises while it's in the middle of uncertain asset sales. Investors want to keep a close eye on the potential sale of its consumer bank in Mexico, Banco Nacional de México (Citibanamex), in a deal valued between $6 billion and $8 billion.

Completing the complicated Citibanamex sale could unleash a torrent of share buybacks. Adding some shares to your portfolio now looks like a reasonably safe way to generate market-beating returns over the long run.