With the broader market trading in bear market territory in 2022, it's not surprising to see plenty of stocks trading a long way down from previous highs. Some of these stocks raced to untenable valuations in 2020 and 2021, and a decline was inevitable once economic conditions tightened.

Unfortunately, plenty of solid, profitable companies with sensible valuations saw their share prices plummet as well in 2022, caught up in the broad sell-off. Fortunately, these are the stocks that smart long-term investors should focus on accumulating while their prices are temporarily discounted.

One solid company that got caught up in the sell-off is Ally Financial (ALLY -1.75%), a top online bank with a leading presence in auto loans. The fintech stock has something to offer for all types of smart investors: a market-beating dividend, a mammoth share-repurchase program, an attractive valuation, and an excellent return on equity (18%, near the highest in its eight-year history). It also has one of the smartest (and most successful) investors of all time -- Warren Buffett -- buying shares.

Car keys sitting on an auto loan approval form

Image source: Getty Images

Buying Ally is like buying a $100 bill for $80    

Shares of Ally are cheap after falling nearly 50% from 52-week highs mostly based on concerns about a looming recession and rising interest rates that could cool the market for auto loans and put some customers more at risk of default. The stock now trades at a price-to-earnings multiple of just 4, which is well below the overall market average even after 2022's market sell-off, as well as below that of many peers in the banking sector.

An evaluation of the price-to-book-value (P/B) ratio offers further proof of what a bargain Ally stock is right now. Ally trades at a P/B ratio of just 0.8. Book value is simply the sum of a company's assets minus its liabilities, and P/B is one of the top metrics used for evaluating banking stocks. A P/B of 1.0 means that a stock trades on par with the value of its assets, with no further value given for growth prospects. A P/B of less than 1 means that the stock is going for less than the company's assets. This suggests the market currently values Ally at less than what shares would be worth if the company were to liquidate itself.

The low P/B ratio gives investors a considerable margin of safety with Ally today. One can think of buying shares at 0.8 times book value as similar to buying a $100 bill for $80, and that is a winning trade that most people would make every time. 

Ally Financial is a monster in shareholder return

There's a lot more to like about the stock than just its compelling valuation. The bank keeps increasing its dividend, and it now yields over 4%. It raised its quarterly payout from $0.25 per share to $0.30 this year, and the annual dividend of $1.20 per share is now more than double what it was in 2018 when the stock paid out $0.56 for the year. A low dividend payout ratio means that this $1.20 figure looks sustainable and that Ally should be able to increase it incrementally over time, with earnings per share of $6.93.

This growing and sustainable dividend is a compelling reason to own Ally, but its massive share buybacks are perhaps an even bigger reason. Management has a $2 billion share repurchase program in place. It bought back $584 million worth of shares during the first quarter and $600 million during the second quarter this year. That's a significant amount of shares taken off the market for a company with a market cap of just over $9 billion.

Stock buybacks are a boon to shareholders. They increase earnings per share, improve return on equity, and even increase dividends per share because there are fewer shares outstanding. 

Buffett is buying

Back to Warren Buffett. Public filings show that Buffett's Berkshire Hathaway (BRK.A -1.12%) (BRK.B -0.86%) initiated a position in Ally Financial during the first quarter of 2022. Berkshire then increased its position by 234% during the second quarter and now owns 30 million shares.

Public filings for the third quarter will trickle out over the next few weeks, and with the stock now trading below where Buffett added to it during the second quarter, it wouldn't surprise me to see that he increased his position again in the third quarter now that the stock looks like even more of a bargain.   

Is it time to buy the dip on Ally?

Ally Financial looks like a smart stock to buy on the dip right now. It is trading at a significant discount to book value, which gives investors a margin of safety. The bank is consistently buying back shares and raising its dividend payout, which now yields over 4%.

Add to this the fact that it has caught the eye of a shrewd investor like Warren Buffett, who is known for his expertise in bank stocks, and Ally looks like a good long-term buy.