Source: Wikimedia Commons

Bank of America's (BAC -0.13%) shares have experienced sort of a roller-coaster ride in 2014. After a strong start at the beginning of year, Bank of America quickly reached a new 52-week high in March of $18.03, but shares fell back over the summer months as investors started to expect an expensive landmark settlement with the Department of Justice over soured mortgages.

Since Bank of America announced the settlement on Aug. 21 its share price has increased approximately 9%, which equals Bank of America's year-to-date performance. Bank of America now trades at around $17 -- about the same level it traded at in the first quarter of 2010.

Sentiment change drives share performance
The biggest driver of Bank of America's 9% year-to-date gain has been the resolution of its mortgage mess. Bank of America had negotiated for many months with the Justice Department over its mortgage practices in order to avoid a lawsuit. After the settlement announcement, Bank of America's share gains accelerated.

Source: Wikimedia Commons, Brian Moynihan

While Bank of America continued to offer settlement amounts of around $12 billion, the Department of Justice played hardball. Eric Holder, U.S. Attorney General, actually refused to even meet with Brian Moynihan, chief executive officer of Bank of America, to negotiate over shoddy mortgages. This already indicated to shareholders that Bank of America will very likely have to pay up -- big time.

As it became increasingly clear that the Department of Justice wasn't going to budge in negotiations, investors started to fear a settlement significantly higher than the $12 billion that Bank of America offered to resolve the mortgage probe.

And rightly so: News outlets like the Wall Street Journal soon reported that the DOJ was seeking up to $17 billion  to punish Bank of America for selling substandard mortgages during the financial crisis.

Settlement in the interest of Bank of America and investors
On Aug. 21, Bank of America finally announced that it had reached a settlement, and that it would shell out a whopping $16.65 billion in penalties and consumer relief to end the DOJ's probe. This settlement comes after Citigroup (C -0.32%) settled with the Justice Department for $7 billion in July and J.P. Morgan (JPM 0.49%) for $13 billion over the same substandard mortgage allegations at the end of last year.

Improving credit quality
Contrary to the mortgage settlement drama and associated headline risk, Bank of America has made substantial progress over the last couple of years in improving its asset quality, which has been a drag on earnings and has contributed to investors staying away from the bank.

The purchase of Merrill Lynch and Countrywide during the financial crisis brought a lot of undesirable credit risk onto Bank of America's balance sheet, and certainly hasn't helped the bank -- defaults and charge-offs skyrocketed soon after.

However, Bank of America has steadily tackled those credit quality issues by writing loans off, modifying them and, more importantly, by increasing its underwriting standards to ensure higher-quality loan origination. As a result, Bank of America's allowances and net charge-offs have declined substantially.

For instance, in the second quarter of 2012, just two years ago, Bank of America reported allowances for loans and leases of a whopping $30 billion. In Q2 2013, those allowances have come down to $21 billion, and they have since further contracted to $16 billion in Q2 2014.

The trend in Bank of America's net charge-off ratio, a strong indicator of improving credit quality, has also materially improved lately. Net charge-offs, for instance, have declined 69% over the last two years to $1.1 billion, and they seem now much more manageable.

Lower net charge-offs immediately translate into higher earnings for Bank of America and signal to the market, that the bank succeeds in getting a handle on its credit quality issues.

Slow, painful recovery
After these major companies paid hefty prices for their mortgage practices, and settled with the DOJ for various amounts, investors as well as the bank could begin to look forward.

Large-cap banks are still in the recovery process and investors can be optimistic that Bank of America, Citigroup, and J.P. Morgan have much more potential to grow their valuations with their mortgage troubles in the rear view mirror.

Compared to their historical valuations, all banks are cheap, but Bank of America still remains an extraordinary bargain at a 20% discount to book value.

The historical price to book valuations depicted below indicate that large banking enterprises could see substantial multiple expansion in the coming years. As valuations normalize in an economic expansion, a book value multiple of 1.5 times for Bank of America wouldn't be out of the ordinary.

The Foolish bottom line
The multibillion mortgage settlement clears the way for Bank of America and will allow the bank to finally concentrate on its actual consumer and commercial banking business without being distracted by expensive and time-consuming litigation.

Improvements in Bank of America's underlying credit quality have also led the way for higher quality earnings, which could justify higher valuations in the future.

With a nasty litigation and settlement chapter finally closed, investors can now look forward to higher earnings and higher valuation multiples for Bank of America.