Optimism trumped pessimism for B of A investors this week. Despite mixed news, and on top of a lackluster previous week, Bank of America (NYSE:BAC) stock roared ahead over the last five days, up 4.47% for the week midday on the last day of trading.

We're in the money
Before we dive into that, though, lets take a quick look at the markets and B of A's peers to see what they were up to over the past five days:

  • Shares in Citigroup rose 3.04%.
  • Shares in the country's biggest bank, JPMorgan Chase, were up 2.53%.
  • And shares in Wells Fargo rose 0.37%.

In the markets:

  • The broader S&P 500 was up 0.60%.
  • The narrower Dow Jones Industrial Average was up 0.58%.
  • And the Nasdaq Composite rose 1.04%.

Don't worry; be happy
We know B of A investors are optimists at heart. How else could the stock of a bank so badly damaged in the financial crisis -- and still so much in need of repair -- perform as well as it has over the last year? That optimism showed itself in abundance this week.

First, good news broke on Tuesday that B of A settled a long-running legal dispute with MBIA (NYSE:MBI), which got B of A off the hook for a potential $3 billion to $5 billion payout to the bond insurer over bad securities claims.

But that good news on Tuesday was followed by not-so-good news on Wednesday, with a California judge clearing the way for insurance giant American International Group (NYSE:AIG) to sue B of A over more than $7 billion in securities fraud. More bad news broke that same day, with a judge ruling that the federal government is allowed to move forward in parts of a lawsuit against B of A over bad mortgages it sold to Freddie Mac and Fannie Mae.  

Yet with the net weight of news arguing against a good week for B of A, hope won out. Maybe investors are just happy that their bank isn't named JPMorgan, and that their CEO isn't named Jamie Dimon. With the country's biggest bank drawing all of the fire for mismanagement and misdeeds, no one's focused on B of A: a superbank that actually has problems.

It was also an up week for all of the Big Four banks and the markets in general. As such, B of A might just be going along for the ride. That happens sometimes, for good or for bad, which is why The Motley Fool stresses a long-term approach to investing.

In the short term, your favorite stocks may be drastically up or drastically down. But in the long term, that jagged line will end up looking like a smooth, straight line. So focus on the fundamentals of the companies you're invested in, and check in on your stocks once a month, or even once a quarter. Your portfolio will thank you, even if your broker won't.