Facing massive headwinds in 2011, the financial sector was the market’s worst performer, falling more than 17% as shares of many of the largest banks dropped more than 40%.   

But so far this year, the momentum is changing, and last year’s losers are looking like this year’s winners, at least so far.

ETFs that offer investors exposure to banks, insurance firms and real estate companies are in the green, showing a significant shift from last year’s poor performance. The Financial Select Sector SPDR ETF [XLF] is up 11.31% and iShares Dow Jones U.S. Financial Sector [IYF] is up 10.34% year-to-date, as of February 15. Both funds took a beating in 2011, down approximately 17% and 13%, respectively.

So what’s behind the rally?  Large banks’ better-than-expected fourth-quarter earnings are giving investor’s confidence. Bank of America (BAC) is leading the way as shares have soared more than 40% over the first six weeks of the year. And BofA isn’t the only financial institution in the green this year; shares of Goldman Sachs (GS), Citigroup (C) and Morgan Stanley (MS) are each up more than 20%.  

Vanguard Financials ETF [VFH], which tracks more than 400 companies, is up 10.25% year-to-date, after dropping nearly 16% in 2011. But despite this year’s strong start, the long-term outlook of the financial sector is hazy, and some banks posting the highest gains may be facing trouble later this year.  

“The long-term profitability of financials faces many obstacles,” says Yu-Dee Chang, chief trader of Ace Investment Strategists.  “The total implication of the Dodd-Frank bill, including the open ended regulatory authority of the Consumer Financial Protection Bureau, is not yet clear.”

The unknown extent of credit default swap exposure may also place a burden on the insurance segment of financials, according to Chang, adding risk to the volatile sector. 

“It may be several months or years before these hidden costs can be evaluated,” said Chang.  “This cloud of uncertainty makes it difficult to calculate a fair value for these financial companies over both the short-term and long-term.”

Banks could also be facing more hurdles overseas as Europe struggles to contain its debt crisis. Moody’s is warning of possible credit downgrades to 114 European financial institutions and 17 global banks, including Bank of America, Morgan Stanley and Goldman Sachs.  

European Finance Ministers are expected to make a decision on a second bailout for Greece early next week.