When it comes to online banks, Ally Financial (NYSE:ALLY) and BofI Holding (NASDAQ:BOFI) are two of the biggest. And while their business models may be similar -- both use a branchless model to reduce overhead at the expense of costlier deposits -- their valuations couldn't be more different.

Ally Financial trades at roughly 0.8 times adjusted tangible book value. BofI Holding trades at an incredible premium to most banks, currently going for a multiple of 3 times tangible book, despite a recent sell-off in its shares. But there's more than meets the eye, so let's get to breaking these banks down.

Ally Bank: Cheap, or cheap for a reason?
The thesis for Ally Bank has always been that it's a cheap bank because of its less-than-impressive funding profile. For years, Ally has relied more heavily on high-cost Internet deposits and long-term debt to fund its balance sheet, resulting in a need to take more risk in its loan book.

Notably, Ally has made strides in reducing its funding costs. Unfortunately, yields on its loans have also come down. The company's most recent presentation shows that over the last year, its funding costs fell 32 basis points, but yields on its earning assets fell by 36 basis points. What it saves on funding costs it's given up in yields.

There may be room for Ally Financial to improve its net interest margins going forward, though. The company announced it intends to implement rate tiers for its customers starting in November, which should help it reduce interest and overhead expenses on smaller accounts. It's also a sign that Ally is confident in its ability to attract and retain deposits without leading its competition with beefier rates on deposits. Earlier in the year, Ally reigned in ATM fee reimbursements. Taken together, it's becoming clear that Ally is starting to gain some traction in securing deposits without giving away the farm.

The bank is a leader in automotive finance, a corner of the banking world that has attracted criticism for loosening credit terms. Ally has recently dedicated more of its balance sheet to subprime borrowers in an effort to juice its loan yields.

While auto loan credit metrics look excellent today, it's hard to believe this is a "new normal," but instead the result of a recovery that has gone on for six years. When the credit cycle turns, investors may find that putting car loans on the books at 4% per year isn't exactly the high-quality business it appears to be on the way out of a financial crisis, though I'm hopeful that falling funding costs should help it paper over credit losses in due time.

BofI Holding is expensive, but is it worth it?
There may be no more controversial bank than BofI Holding. In recent weeks, it's dealt with a bevy of accusations of questionable business practices and disclosure with regulators. The result is a stock price that's off by a third from its October highs.

Despite its falling share price, it's hard to make the case that BofI Holding is cheap. After all, the company now trades at about 3 times tangible book value per share. 

The story for BofI Holding is obviously growth. It retains all of its earnings and issues new shares, using the extra capital to grow its balance sheet at an incredible clip. BofI Holding has done well to find high-yielding loans and maximize the use of its funding. Notably, BofI Holding's interest income as a percentage of assets puts it in the top 4% of its peer group, which, in my mind, is a sure sign of a riskier portfolio.

BofI Holding contends that working with complicated borrowers can help it generate outsize yields on real estate loans, even while demanding ultra-low loan-to-value ratios. I don't disagree with that claim; the truth is, any borrower who doesn't have nearly perfect financials will find it a challenge to get a mortgage.

However, it's also important to recognize that one of the fastest-growing pieces of its loan book is commercial and industrial loans, which currently yield an average of 10.8% on cost. Any loan yielding more than 10% when a 10-year U.S. Treasury yields about 2% is a risky loan indeed. Notably, its loan yields from C&I loans have only gone up in recent years, rising from about 7.5% in 2012 to 10.8% as of June 2015. This could be a potential problem area in an economic downturn.

Which is the better buy?
I'll have to hold my nose, but at the end of the day, I like Ally Financial at a discount to tangible book value compared to BofI Holding at a multiple of 3 times tangible book. Ultimately, paying one of the largest multiples in the industry for an online bank like BofI Holding seems like a very difficult way to get market-beating returns.

There are, of course, plenty of intelligent people invested in either company, and plenty more who would disagree with my preference for Ally Financial. At the end of the day, it's all about the risk-reward ratio, and I think the balance is better for Ally than it is for BofI Holding, given the prices at which both banks trade. 

Jordan Wathen has no position in any stocks mentioned. The Motley Fool owns shares of and recommends BofI Holding. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.