Stocks rose Thursday, erasing the day's earlier losses after Standard & Poor's rating agency reported that an end to subprime mortgage declared losses-write-downs-is in sight. The report gave investors a reason to buy shares hit in the recent market sell-off. The three major indexes had fallen through the early afternoon, as investors considered a series of signs suggesting slowing U.S. economic growth and rising inflationary pressures. But Wall Street stabilized as the afternoon progressed, with financial shares reducing losses and technology, healthcare, and homebuilding shares leading an advance. Helping to spark the rebound was the S&P report saying that banks are about halfway through to a forecasted $285 billion in write-downs. The report offered reassurance to investors who have been concerned by the lack of a timeline for the potential end for mortgage write-downs. Stocks were sharply lower in the morning as investors considered record-high oil, gasoline, and gold prices, the dollar at a record low versus the euro, weak U.S. retail sales, and the potential collapse of mortgage bond fund Carlyle Capital. In economic news, U.S. retail sales plunged 0.6 percent in February, more than three times steeper than expected. The number of Americans collecting unemployment benefits rose to the highest level in two-and-a-half years, business inventories jumped for a second consecutive month, and import prices continued to rise, largely reflecting soaring oil costs. Light sweet crude oil for April delivery rose 41 cents to $110.33 a barrel on the New York Mercantile Exchange after earlier hitting a record $111 in electronic trading. COMEX gold for April delivery rose $13.30 to $993.80 an ounce after earlier reaching a record high of $1,001 an ounce. The Dow Jones industrial average rose 35.50, or 0.3 percent, to 12,145.74. The broader S&P 500 rose 6.71, or 0.5 percent, to 1,315.48. The technology-heavy Nasdaq composite index rose 19.74, or 0.9 percent, to 2,263.61. The New York Stock Exchange composite index rose 45.93 to 8,827.16. The American Stock Exchange composite index rose 32.69 to 2,339.09. And the Russell 2000 index rose 12.43 to 679.74.