The ratings agencies are making Bank of America sit in the corner. Image source: iStock/Thinkstock.

When it comes to debt ratings, Bank of America (NYSE:BAC) isn't a star pupil. Its long-term debt rating, which influences a bank's cost of funds, is lower than many of its competitors, including JPMorgan Chase, Wells Fargo, and U.S. Bancorp.

I can't emphasize enough how much this matters. In the same way that your credit score influences the interest rate on your mortgage, a bank's debt rating bears on the rate it pays to borrow money -- especially on long-term debt. And keep in mind that borrowing money goes to the heart of a bank's business model: Buying money cheap from depositors and selling it dear to people and businesses that need loans.

Data source: Moody's. Chart by author.

In the second quarter of this year, Bank of America and Wells Fargo borrowed essentially the same amount of money -- around $1.3 trillion each from depositors and wholesale lenders -- but Wells Fargo paid $1 billion less to do so. This is the same as Wal-Mart buying produce for less than Target. Wal-Mart could then undercut Target's prices, clearing the way for Walmart to gain share in the grocery market.

These same dynamics are active in banking. U.S. Bancorp's chairman and CEO Richard Davis has said in the past that his bank uses its cost advantages (it's one of the most efficient banks in the country) to grow market share. And it's reasonable to think that Wells Fargo (which is also very efficient) does the same thing, particularly in the mortgage market. Thus, in the consumer and commercial banking spaces, this means that Bank of America is probably either ceding existing share or foregoing new share.

This begs the question: Why is Bank of America's debt rating lower than many of its peers? For this, we turn to the latest credit update for Bank of America from Moody's, one of the three major ratings agencies. Moody's points to multiple things that influenced its rating for Bank of America, but it singled out two that had the biggest impact.

The first is that Bank of America's earnings since the financial crisis have been especially volatile. Thanks to a slew of substantial legal settlements, it has been all but impossible over the last eight years to accurately forecast how much Bank of America will earn in any given quarter.

Fortunately, this is getting better. Last year was the first time since the crisis that Bank of America earned at least a marginally respectable profit in four consecutive calendar quarters. And despite a challenging macroeconomic environment, it's carried this through the first two quarters of 2016.

The second, by contrast, will act as more of a long-term thorn in Bank of America's side. The issue here is that the North Carolina-based bank operates a large trading (or capital markets) business. At the end of the second quarter, its global markets segment accounted for $581 billion worth of assets, or 26% of the bank's total.

Data source: Bank of America's 2Q16 financial supplement, page 15.

Moody's doesn't like this one bit:

[Bank of America's baseline credit assessment] incorporates the risks posed to creditors by the inherent volatility, risk opacity, and more confidence-sensitive customer base of the bank's sizable capital markets business.

You don't have to dig deep into the annals of financial history to see why ratings agencies would look askance at large trading operations. In 2012, JPMorgan Chase lost $6 billion from a trader's wrong-way bet on derivatives tied to the health of American corporations. The year before that, UBS' CEO resigned after the Swiss bank suffered a $2 billion trading loss. And in 1995, a single trader caused the 233-year-old Barings Bank to fail.

The point is that there's a good reason for Moody's, and presumably the other ratings agencies, to downgrade Bank of America because of its trading units. What's less clear is whether the benefits from trading outweigh the costs -- which, in addition to a lower credit rating, includes higher capital and liquidity requirements that reduce profitability. The bank's chairman and CEO, Brian Moynihan, has made the case that they do (though I'd characterize it as a half-hearted and unconvincing case), but it remains to be seen if he's right.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.