A trio of top European banks showed bad debts are ratcheting up as economies worsen and unemployment rises, although investor optimism ahead of U.S. bank stress test results drove shares to year highs.

Results from the stress tests due later on Thursday are expected to show Bank of America , Citigroup and others need to find billions of dollars. But the prospect that banks are building cushions to prepare for more bad times has helped drive bank stocks higher around the world.

However, part-nationalized UK lender Lloyds Banking Group sent its shares plunging after warning that bad debts on corporate loans were rising significantly and reiterating it expected a loss in 2009. Analysts at UBS predicted a loss of about 6.6 billion pounds ($10 billion).

France's Societe Generale slumped to a surprise loss in the first quarter as higher-than-expected writedowns and provisions hit earnings.

And Britain's Barclays reported a 79 percent rise in first-quarter impairments, taking the shine off a record start to the year for its investment bank arm.

By 1030 GMT, Lloyds shares had fallen 8.2 percent, SocGen was 3.8 percent weaker and Barclays stood 1.2 percent higher. The DJ Stoxx European bank sector index <.SX7P> traded just off a new 2009 high at 186.43. The index has doubled in two months.

A sharp surge by U.S. bank stocks on Wednesday underpinned shares.

After stress tests on the top 19 U.S. banks, designed to ensure they will have enough capital to protect them from deep economic downturns, regulators have told Bank of America it needs $34 billion and Citigroup that it needs $5 billion, according to people familiar with the matter.

Those capital shortfalls are larger than analysts had expected, but bank shares soared as investors welcomed clarity over how well the industry will cope with a deepening recession.

British Treasury Minister Paul Myners said the banking system had been stabilized and the flow of credit was now starting to expand in financial markets.

CORPORATE TROUBLE

Lloyds has suffered billions of pounds of losses from the portfolio of HBOS, the troubled lender it bought earlier this year. It said it expected further corporate defaults in 2009, notably in commercial real estate portfolios in Britain and Ireland.

As a result, it expects corporate impairments in 2009 to be more than 50 percent higher than in 2008, when combined Lloyds/HBOS corporate loans were between 9 billion and 10 billion pounds. The group also continues to expect retail impairment levels to rise significantly this year.

Its problem corporate loan book showed the merits of a UK asset protection scheme (APS), analysts said, as the government-backed scheme will limit the bank's loss. Lloyds plans to insure 260 billion pounds of assets, but is still discussing details with the government.

This highlights quite how bad underwriting standards were within HBOS, said Alex Potter, analyst at Collins Stewart, adding that some experts were worrying the government could insist on renegotiating the terms of the APS.

Barclays said impairment charges and other credit provisions jumped to 2.3 billion pounds from 1.3 billion. About half was due to a worsening economy and maturing loans.

That took the shine off buoyant results from its investment bank arm, where profits more than trebled to 907 million pounds and income excluding writedowns more than doubled to over 5 billion pounds.

U.S. growth spearheaded BarCap's rise after last year's acquisition of Lehman Brothers' U.S. operations, which accounted for about one-third of the income growth.

SocGen fell to a quarterly loss of 278 million euros ($370 million) from a profit of 1.1 billion last year.

Non-recurring items, including the impact of writedowns at its investment banking unit, had a negative impact of 1.9 billion euros on its earnings.

Its performance contrasted with BNP Paribas , which posted strong results on Wednesday.

The level of writedowns at SocGen is surprising, and their French retail bank is less resilient than at BNP, said West LB analyst Christoph Bossmann.

(Editing by Jason Neely)