The U.S. megabanks are still taking megabarbs in the media and elsewhere, but you wouldn't know it by looking at their stocks over the past year. Bank of America (NYSE: BAC) is up 58%, Wells Fargo (NYSE: WFC) has climbed 46%, and even the London-Whale-throttled JPMorgan has gained 36%.

What gives?

A lot of it has to do with valuation. Bank of America, for instance, is trading at just 0.46 times its book value even after the big run-up. That compares to an average book-value multiple of 1.8 in 2006. It would seem that investors just thought it was a deal too good to pass up.

Despite the big gains over the past 12 months, I think there's still good reason for investors to consider the big banks. Even so, there are still some big challenges ahead for the banks -- big and small alike -- and investors better have these in mind when considering taking the plunge on a bank stock.

1. Litigation
We've gotten some good reminders lately that the legal risk hasn't disappeared for the big banks. Late last month, Bank of America agreed to shell out $2.4 billion to settle a shareholder lawsuit over the acquisition of Merrill Lynch. More recently, JPMorgan was slapped with a suit from the New York attorney general and the Residential Mortgage Backed Securities Working Group over purported wrongs committed by its acquired Bear Stearns arm.

On the bright side, there could be an end in sight for the legal fallout from the financial crisis. The statute of limitations for fraud cases is typically five years, and since most of the mortgage-market craziness took place in 2006 and 2007, we're bumping up against the end of that timeframe. Civil statutes of limitation can vary somewhat, but they're generally similar.

The downside? With the deadline looming, litigators may be burning the midnight oil trying to bring cases before the "deadline" passes.

2. Regulations
Take your pick as to what we're talking about here: the Volker Rule, the Consumer Financial Protection Bureau, Basel III -- the list goes on. In the wake of the financial meltdown, regulators have stepped in with new regimes to try to make the financial world a safer place. Though many of these regulations have been watered down, they are nonetheless something that bank investors need to keep an eye on.

To illustrate, if we look back at Citigroup's (NYSE: C) balance sheet circa 2007, we can find that the bank had just one dollar of equity for every $19 of assets. That's a heck of a lot of leverage, and it meant that even a small mistake by Citi would be magnified into a loss much larger. At the same time, the nature of Citi's business was changing. In 2006, the bank's total net income from consumer banking around the world was $12 billion. Meanwhile, the bank brought in more than $7 billion from its Markets & Banking segment, which was primarily from investment banking and trading.

We remember the ugly side of that all too well -- billions of dollars of losses and a huge slug of government bailout money to plug the gaping holes. The flip side, though, was that prior to the sick game of mortgage musical chairs ending, Citi was producing huge equity returns (on paper at least) for its investors.

Fast-forward to today. The regulations that seek to make banks safer are also regulations that will prevent banks from achieving the same risk- and leverage-fueled heights that they did previously. This obviously impacts the banking big boys, but even smaller, less diversified banks like Regions Financial (NYSE: RF) and New York Community Bancorp (NYSE: NYB) will have to grapple with new regulations that will create internal monitoring costs and require larger capital buffers.

3. The economy
It's the economy, stupid!

Of course the economy is going to hurt banks. But we need to be clear on the hows and whys, here. In their chief business, banks are suppliers of a commodity product: capital. In order for banks to make money, they need to gather deposits from lenders and lend them back out effectively at a higher rate. But just like any other product, when customers aren't buying, the business suffers.

Right now, for a variety of reasons -- key among them the lack of confidence in the economy -- consumers and businesses just aren't all that interested in borrowing money. If you take a peek at the direction of banks' loan books and the income that they're generating from their loans, this becomes pretty obvious. There are some signs that the tide is turning -- and the U.S. Federal Reserve is doing everything it can to spur borrowing -- but progress is sluggish at best.

One big bank to keep an eye on
In the midst of all of these headwinds, the one big bank that may stand out as more controversial than just about any other is Bank of America. While there are still potential bumps in the road, I happen to think the bank is on a better path now that Brian Moynihan is at the helm. However, if you're thinking about investing in B of A, you should definitely tune in to the special report by my Foolish colleague Anand Chokkavelu. In this report, Anand breaks down the situation at B of A, including giving you "three areas that you MUST watch." Click here now to check it out.