Write-downs and losses on overleveraged bets may be over for the largest U.S. banks, Goldman Sachs said Thursday, upgrading its rating on large bank stocks to "neutral" from "cautious."

After about $100 billion in capital raises prompted by the government stress tests of the 19 largest U.S. banks, Goldman said large banks look like more attractive investments after reducing leverage.

Recent improvement in the credit markets may also signal that write-downs may be nearing an end, the firm said, and profits from mortgage activity and capital markets will help fund banks' loan loss reserves.

However, large bank shares declined in premarket trading, with Regions Financial Corp. (RF) among the largest declines following its $1.85 billion capital raise Wednesday; shares fell 18.6% to $3.98.

The upgrade of the whole sector follows Goldman's upgrade of Bank of America Corp. (BAC) on Monday on increased confidence that banks can earn their way out of credit losses. Goldman has been among the leading proponents of the "green shoots" idea driving the markets higher in recent weeks - the firm's economists see signs of a potential inflection in several economic indicators, including jobless claims, retail sales, industrial production and housing prices.

Goldman also upgraded to "attractive" its view of the trust banks sector, which includes Bank of New York Mellon Corp. (BK), Northern Trust Corp. (NTRS), and State Street Corp. (STT), where it believes revenue declines may have bottomed last quarter as the stock market gained and securities lending and currency trading stabilized.

The firm also upgraded the credit card sector to neutral, which includes Capital One Financial Corp. (COF), Discover Financial Services (DFS) and American Express Corp. (AXP), saying that an improvement in seasonal delinquency trends will give the stocks relief from the pressures of rising unemployment and changes to federal laws regulating the credit card industry.

However, the firm kept a cautious rating on the regional banking sector, saying small banks are behind the capital-raising trend started by the larger banks following the stress test, and that they have a greater exposure to the potential for growing weakness in commercial loans than the large banks.

-By Ed Welsch, Dow Jones Newswires; 201-938-5244; edward.welsch@dowjones.com