With the three remaining too-big-to-fail banks set to report earnings this week, analysts are busy trying to predict how each of the lenders performed in the fourth quarter of last year. In at least one case, however, we already know the answer.

At the beginning of last week, the nation's second largest bank by assets, Bank of America (BAC 0.77%) made two ground-breaking announcements. The first was that it's settled an ongoing, multibillion-dollar dispute with Fannie Mae over souring mortgages that Countrywide Financial, now a subsidiary of B of A, sold to the government-sponsored agency prior to the financial crisis. The agreement will result in a $2.7 billion charge against the bank's fourth-quarter profit.

The second announcement, included in the same press release, was that it's joined with nine other mortgage-servicing companies to settle claims brought by banking regulators related to industrywide faulty foreclosure practices. For this, B of A will record a $2.5 billion hit in the fourth quarter.

Added to this, moreover, is a further $700 million charge-off related to a so-called "negative debit valuation adjustment" that's related paradoxically to the continued improvement in B of A's credit spreads.

When you add these three numbers together, you get a seemingly insurmountable $5.9 billion offset to the bank's fourth-quarter net income. By means of comparison, in the middle of last week, Wells Fargo (WFC -0.00%), the nation's fourth largest bank by assets, reported a record $5.1 billion in earnings for the same quarter -- click here to see why Wells Fargo's earnings were better than the market gave them credit for.

So, how could B of A's earnings be good?
At this point, you're probably wondering why I believe that B of A's earnings could in any way be good. And the answer to this is simple: It's already told us so.

In the same press release cited above, B of A concluded by saying (emphasis added): "Taking into account the effects of all the items above, Bank of America expects earnings per share to be modestly positive for the fourth quarter of 2012."

Now, while I can appreciate that this may at first not seem like anything to write home about, I urge you to think about it for a second longer. Despite nearly $6 billion in charge-offs, B of A expects its earnings to be positive. And not barely positive, but modestly positive.

This is huge, as it's indicative of how profitable B of A will be once all its legacy issues related to the financial crisis are behind it -- which will happen. On an annualized basis, that's between $2 and $3 per share in earnings, suggesting there's significant upside to both its quarterly dividend payout and underlying share price.

In addition, though of equal significance, B of A updated its range of possible losses related to its biggest outstanding liability -- that is, repurchase obligations for residential mortgages sold to public and private investors prior to the housing crash. According to the statement: "[T]he company expects to reduce the range of possible loss above existing accruals for both GSE and non-GSE representations and warranties exposures to up to $4.0 billion at December 31, 2012, compared to up to $6.0 billion at September 30, 2012."

As I've discussed before, this was the biggest question mark weighing on B of A's shares. Previous high-end estimates of the total exposure even called into question the bank's continued viability. Consequently, while $4 billion in additional non-reserved liability certainly isn't insignificant, as we appear likely to learn on Thursday, it's well within B of A's ability to expunge in a single quarter.

So, is Bank of America a buy?
Whether this makes it a buy is another question altogether. I, for one, haven't been shy about my optimism for the bank going forward. At the beginning of November, I noted that it was time to buy shares in the lender. And while they've since returned over 20%, I still think it provides an attractive investment going forward.

At the same time, however, as today's performance shows, this remains both a risky and highly volatile stock. Consequently, any purchasing decision should be made with this in mind.