Although Ally Financial (ALLY -1.56%) shares are up 7% in 2023, they are down about 11% (as of this writing) since March 8, when the news broke of SVB Financial's ailing Silicon Valley Bank trying to raise additional capital. This is a clear sign that even financial institutions with no direct exposure to the banking fiasco have been getting punished. But to be clear, Ally isn't exactly immune to the broader macroeconomic picture, either. 

Down 53% from its all-time high, is this mid-cap bank stock a buy? Here's what investors need to know about this all-digital financial-services business. 

The impact of rising interest rates 

Inflation became a serious problem toward the end of 2021 when the Federal Reserve finally admitted that rapidly rising prices weren't transitory after all. This prefaced the beginning of rapid interest rate hikes throughout 2022 and into this year to curb inflation. In fact, this has been the fastest period of rate increases in U.S. history. Many growth stocks saw their prices plummet as a result. 

Besides looking purely from a valuation perspective, banks are more directly impacted by changing interest rates on a day-to-day operational level. That's because this affects both sides of the equation for them, from rates paid to depositors to interest charged on loans. In Ally's case, in the first three months of 2023, its net interest margin -- which measures the difference between a bank's interest income and its interest expense -- was 3.51%, down from 3.65% in the fourth quarter of 2022 and 3.93% in the year-ago period. The main culprit is that funding costs for deposits have soared. 

Unsurprisingly, when interest rates are much higher than they were just a year ago, it becomes more difficult for borrowers to pay back their obligations. Ally's net charge-offs have more than tripled over the past year. And in this type of situation, when credit markets are getting tighter, demand from borrowers should be under pressure. To Ally's credit, its bread-and-butter retail auto loan portfolio balance increased 6.9% year over year, as used car prices have come down, leading to increasing sales and demand for credit. But delinquencies are up considerably. Shareholders will need to pay close attention to how management balances growth with minimizing losses. 

Ally is preparing for tougher times ahead. Provision for credit losses totaled $446 million in the last quarter, up from just $167 million in the 2022 first quarter. "Looking ahead, we are positioned to navigate this dynamic environment, demonstrate the strength of the franchises we've built, and deliver results for all stakeholders," Chief Executive Officer Jeffrey Brown said in the press release.  

There were some positives, though. Ally saw the highest net customer growth of any quarter in its history, with retail deposit customers up 12% year over year. With 91% of the company's retail deposits insured by the Federal Deposit Insurance Corp., it looks like the bank is being viewed as a safe place to park cash in these trying times. 

Warren Buffett's stamp of approval 

When looking at certain stocks to consider adding to your portfolio, it's always a good idea to see if any prominent investors own those businesses in question. Those looking closely at Ally Financial would be happy to know that Berkshire Hathaway, the conglomerate headed by legendary capital allocator Warren Buffett, owned 9.9% of Ally's outstanding shares as of Dec. 31. Now, when Berkshire's next 13-F is filed in mid-May, it'll be very interesting to see if this position changed at all as a result of the regional banking crisis in March. Nonetheless, having someone like Buffett, who clearly knows how to analyze banks, invested in a stock is an encouraging stamp of approval. 

To say that Ally's shares haven't performed well in recent years would be a huge understatement. Over the past five years, the stock has declined 5%. The S&P 500, by comparison, is up 55% during the same time.  

This decline in price has pushed the valuation down. The current price-to-earnings ratio of 5.2 is well below Ally's trailing-five-year average. And it represents a discount relative to peers like KeyCorp, Huntington, and Fifth Third. 

Even more relevant to analyzing a bank's valuation is to look at the price-to-book multiple. Ally's is currently at 0.78. Anything below 1 is sometime considered undervalued. Add to this a 4.6% dividend yield, and this could be compelling enough for some investors to consider buying Ally's stock today.