US stocks gained on Thursday as financial shares erased earlier steep losses after a major credit rating agency said the end to subprime-related write-downs is in sight.
Standard & Poor's said write-downs for large financial institutions are likely past the halfway mark, soothing investors' anxiety about the latest credit market fallout and increasing the allure of riskier assets. Standouts in the financial sector included shares of US home finance companies Fannie Mae, up more than 8 percent, and Freddie Mac, up more than 5 percent.
A Dow Jones index of home builders' shares gained 4.7 percent after Rep. Barney Frank, the chairman of US House of Representatives Financial Services Committee, unveiled new legislation to expand the role of the Federal Housing Administration in dealing with the nation's growing mortgage foreclosure crisis.
The Dow Jones industrial average added 35.09 points, or 0.29 percent, to 12,145.33. The Standard & Poor's 500 Index gained 5.12 points, or 0.39 percent, to 1,313.89. The Nasdaq Composite Index rose 13.55 points, or 0.60 percent, to 2,257.42.