These days, there is perhaps no company people love to hate more than Bank of America (BAC -0.13%). But despite all of the ill will, the first six months of 2013 have been far kinder to those who hold Bank of America stock that you might expect.

Though we Fools know that six months doesn't make or break an investing thesis, it's always good to periodically check in on your holdings. 

BAC Total Return Price Chart

BAC Total Return Price data by YCharts.

With Bank of America eeking out a small advantage over the S&P 500 so far this year, I think three major themes have dominated the storylines for Bank of America stock.

A healthy balance sheet

Source: YCharts.

One of the key effects of the Great Recession was that banks had to undergo stress tests to make sure they had healthy enough balance sheets to survive trying times within the industry. On March 7th, it was revealed that Bank of America, along with 16 of the nation's 18 other largest banks, fared quite well in the stress test.

One week later, the bank heard back from the Federal Reserve on its second round of major announcements: the Comprehensive Capital Analysis and Review. In plain English, this is when the Fed tells Bank of America whether or not it can return excess capital to shareholders.

While shareholders may have been disappointed that it was revealed there would be no dividend bump on commons shares of Bank of America stock, they had to gain some solace from the bank's massive $10.5 billion share buyback.

Earnings releases

Source: YCharts.

Though the stress test and CCAR releases certainly helped buoy Bank of America stock, the same cannot be said for the company's earnings releases so far this year.

In mid-January, the bank announced results for the fourth quarter of 2012 that showed earnings of $0.03 per share on revenue of $21.7 billion.

Though some investors were discouraged by the release, there were some golden nuggets: the company's mortgage business was booming as it started to catch up to peers JPMorgan Chase (JPM 0.49%) and Wells Fargo (WFC -0.56%), Merrill Lynch was finally starting to show some strength, and its capital position was more than healthy.

But when the time came to announce earnings once again in mid-April, these nuggets weren't enough to meet expectations. The company reported earnings of $0.10 -- analysts were expecting $0.22 -- on revenue of $23.5 billion. From the report, it was clear that the mortgage business wasn't bringing in as much profit as hoped for, that margins were shrinking and -- most notably -- that legal troubles wouldn't be going away anytime soon.

Speaking of legal troubles...

Source: YCharts.

In 2011, Bank of America came to an agreement with AIG (AIG 0.05%), as well as a host of others, to payout $8.5 billion over soured mortgages from Countrywide. Recently, however, AIG has challenged that settlement and wants to see a bigger payout from Bank of America.

The issue went to trial in June, and while its too early to tell how that might play out, a loss could mean that the payout settlement could balloon to much more than the previous $8.5 billion. Given that information, its clear why the stock may have suffered when the trial started.

Rosier times ahead?
Last week, JPMorgan Chase and Wells Fargo both announced earnings figures for the second quarter that were a pleasant surprise to investors. Adding to the optimism was the fact that the CEOs for each bank were bullish on the economy's continued recovery