It was nearly a year ago that the banking industry was rattled by the failures of a few sizable financial institutions. Investors quickly soured on the entire sector, but they appear to be warming up to it once again.

Just look at leading online bank Ally Financial (ALLY -0.34%). Its shares rose by 43% in 2023. And the fact that Warren Buffett-led Berkshire Hathaway owns a 9.6% stake in the lender might be enticing for investors looking to put money to work in this sector.

Let's dive deeper into this digital bank stock to figure out if the shares are worthy of your investment dollars right now.

The latest numbers

Ally reported its fourth-quarter financial results on Jan. 19, and since then, the stock has soared 14%. This implies that the market liked the numbers. Net revenue increased by 5%. And Ally's full-year net interest margin of 3.35% was substantially higher than it was just three years ago.

It was also encouraging to see that Ally's customer base increased by 13% year over year to 3 million, with total deposits of $154.7 billion. This figure demonstrates the trust that consumers have in this bank. If the Federal Reserve cuts interest rates a few times this year, as it expects to, Ally could benefit because deposits are typically sticky, and it would be able to pay lower rates on them, leading to potential net interest margin expansion.

Favorable capital allocation

Over the past 7 1/2 years, Ally has increased its quarterly dividend by 275%, from $0.08 per share in 2016 to the current $0.30 per share. The yield at the current share prices sits at 3.3%, which might be attractive to income investors.

However, I think the company's aggressive share repurchases are what investors should be most interested in. Between the start of 2015 and the end of last year, the company shrunk its share count outstanding by 37%, providing a nice tailwind to its earnings per share.

Why I'm not a buyer of Ally

Based on all this, you might think I'd be rushing to buy Ally stock. But this isn't a company I want to own.

As of Dec. 31, 56% of Ally's total loans and leases are represented by retail auto loans. And a whopping 43% of its originations came from GM and Stellantis dealerships. There is significant credit concentration here, as well as heightened reliance on two distribution partners. Ally is overly exposed to the whims of the auto market. In robust economic times, when interest rates are low, demand for vehicles is strong, and car prices are rising, this is a good position to be in.

But these things are cyclical, which makes those attributes a cause for concern. Consider the current macroeconomic environment. Higher interest rates have resulted in soaring net charge-offs and delinquencies. And used car prices have been on a downward trajectory since autumn 2022.

Also concerning is Ally's track record as an investment. Over the last one-, three-, and five-year periods, the stock has produced total returns (including dividends) that lagged behind the broader S&P 500. This doesn't give me much confidence that things will be different in the years ahead.

The stock also trades at a price-to-earnings ratio of 12.6 right now. That's a 19% premium to what many consider the best bank out there, JPMorgan Chase. Up until late last year, Ally typically traded at a discount. This suggests that its shares are overvalued now, giving investors another reason to pass on the stock.