Bank of America (NYSE:BAC) recently agreed to pay about $9.3 billion to settle claims alleging it sold faulty mortgage bonds to Fannie Mae and Freddie Mac. While this puts an end to Bank of America's biggest legal drama still lingering from the financial crisis, the company's profits could take a substantial hit in the short-term. Why is this settlement so big, and where is the money going? Also, exactly what can we expect the effects of this settlement to be, both long- and short-term, and how can we benefit from them?

The settlement and who gets paid
Under the terms of the settlement, Bank of America will pay $6.3 billion in cash directly to the Federal Housing Finance Agency (FHFA) and will buy back more than $3 billion in securities from Fannie and Freddie. The settlement is so large because it resolves lawsuits filed against B of A itself, as well as Merrill Lynch and Countrywide, which the bank acquired during the financial crisis. It was not only alleged that the mortgage bonds were of poor quality, but that the bank misrepresented the quality of the loans when they were sold to the two mortgage finance companies.

Short-term effects could create a buying opportunity
Bank of America said that the settlement would reduce its first-quarter income by around $3.7 billion, or about $0.21 per share. Almost immediately after the announcement, some analysts began cutting their earnings estimates for the bank; however the consensus still reflects the pre-settlement estimates. So, when the company reports its earnings, there is likely to be a brief period of initial "shock" while the market digests the numbers.

The news of the settlement combined with the disappointing results of the recent stress test has resulted Bank of America's stock trending sideways over the past couple of weeks while the rest of the market has been on a tear. In fact, since mid-March the S&P has gained more than 2.3% and Bank of America is dead even.

These short-term effects could just be the calm before a huge long-lasting rally in banks. According to analyst Dick Bove, the strong economic growth over the next few years will cause banks to operate closer to their potential, and will ultimately result in much higher interest rates, producing even more income for the banks.

Long-term, it just adds to the health of the bank
Although Bank of America's legal headaches are not quite over just yet; this deal goes a long way toward putting the financial crisis in the past. According to the bank, it has now resolved about 88% of its exposure to the securities which have been the subject of litigation. Still pending is a lawsuit from the U.S. Justice Department and a few smaller investigations, but it looks like the worst is behind them.

The bottom line is that with every lawsuit that is settled, Bank of America becomes stronger. The company has spent more than $50 billion so far to resolve claims related to bad mortgages, mostly related to the bank's ill-fated acquisition of Countrywide. The strength that is being added is apparent in the recently approved dividend hike as well as the $4 billion buyback plan approved by the board after the stress tests. Bank of America's tangible book value has climbed significantly in the past couple of years, as has the valuation it trades for relative to the TBV, so the market clearly agrees that the bank continues to strengthen.

When the bank reports its earnings on April 16, the numbers themselves are not the most important thing to pay attention to. Rather, listen to the tone of the conference call, particularly when discussing any pending litigation. Now that this settlement is over and done with, it gives the bank much more ability to plan for its future rather than worrying about its past.