Ally Financial (ALLY 0.13%) made headlines earlier this year when Warren Buffett, the chairman and chief executive office of Berkshire Hathaway, added it to his company's portfolio of investments. It is obviously a big deal when one of the world's greatest investors decides to put money in a stock and it attracts a lot of attention from regular investors wondering if they should do the same.

Is it one you should consider adding to your portfolio?

Shrinking net interest margin

Ally Financial was one of the first banks to offer entirely online services after it spun out of General Motor Acceptance, the auto financing arm of General Motors, back in 2010. Ally is a full-service online bank, but true to its roots, it specializes in automobile loans and is in fact one of the leading auto lenders in the U.S. As of the end of the third quarter, it had $178 billion in assets, making it the 22nd-largest bank in the U.S.

The bank has endured a difficult year, hit harder than most banks, with its stock price down 50% year to date as of Dec. 21. Ally saw net income decline 60% year over year in the third quarter, to $272 million.

Ally suffered a slight drop in its auto financing business as net financing revenue fell by about $26 million year over year to $1.3 billion, but pretax income in auto financing was down about 41% to $488 million. This was mainly due to a $328 million provision for credit losses, up from $45 million a year ago. The higher reserve allocation reflected both robust auto loan originations, $12.3 billion, the same as a year ago, and an increase in net charge-offs for loans that are unlikely to be repaid.

While loan volumes were up and originations were strong, Ally was hurt by higher funding costs, which ate into its net interest margin (NIM). The NIM is the difference between what a company receives in interest payments on loans and what it pays in interest on deposits and other funding sources. With interest rates rising, it must pay out higher rates to depositors, yet with fixed rates on loans already on the books, the interest income stays largely the same -- thus the narrowing margin. In the third quarter, the NIM was 3.8%, down from 4.04% in the second quarter, but up from 3.66% in the third quarter of 2021.

Looking ahead

The NIM is expected to narrow more, with management projecting it to be about 3.5% in the fourth quarter. Also, used car prices are dropping and that could reduce loan volumes in the near term. In addition, many economists foresee a mild recession in 2023, as rising interest rates continue to slow the economy and potentially the pace of lending -- and raising the number of delinquencies.

So, the next few quarters could be difficult for Ally coming up in 2023, but long term there is still a lot to like. One, the stock is dirt cheap right now with a price-to-book ratio of just 0.71, which means it is trading below the value of its assets minus liabilities. Also, it is trading at a price-to-earnings ratio of just 3.9.

In addition, the bank is putting a lot of new loans on its books, at higher rates, so gradually its loan portfolio will get repriced at those higher rates, which should boost the NIM. And once the economy emerges from recession and the auto industry recovers, the stock should start to take off.

Overall, it's a good long-term stock, with an excellent dividend of almost 5%, but there could still be rocky times ahead in the near term. If you own it, definitely hold it, but if you are considering a buy, it might be a good idea to hold off a few quarters to see where things go.