Updated

U.S. stocks rose Thursday after healthy earnings from Bear Stearns Cos. (BSC) Inc. eased concerns about the subprime problems spreading to other companies and the wider economy.

The Dow Jones industrial average rose 26.28 points, or 0.22 percent, to 12,159.68. The Standard & Poor's 500 Index gained 5.11 points, or 0.37 percent, to at 1,392.28. The Nasdaq Composite Index advanced 6.96 points, or 0.29 percent, to 2,378.70.

Click here to visit FOXBusiness.com's Investing Center.

A spate of mergers, including a surprise offer by the electronic energy marketplace IntercontinentalExchange for CBOT Holdings Inc., the parent of the Chicago Board of Trade. , also fed optimism.

Bear Stearns, Wall Street's leading underwriter of mortgage-backed securities, said quarterly earnings rose, beating analysts' estimates, and noted that problems with risky mortgages were largely contained. Lehman Brothers Holdings Inc. made similar comments a day earlier.

"Everybody was so hopped up with the subprime lending stuff. But the economy is doing OK, and I still think the market in the long run will have a halfway decent year," said Victor Pugliese, director of listed equity trading at First Albany Corp. in San Francisco.

Financial stocks, which were among the hardest hit in Tuesday's sell-off, rose for a second day. Shares of Wells Fargo & Co. (WFC), the No. 5 U.S. bank, gained 1.3 percent, or 45 cents, to $34.10, while shares of Countrywide Financial Corp. (CFC), which like Wells Fargo made mortgages to subprime borrowers, rose 3.1 percent, or $1.08, to $35.47.

The bid by ICE pushed CBOT shares up 17.4 percent, or $28.86, to $194.95 on the New York Stock Exchange. In contrast, shares of IntercontinentalExchange dropped 2.9 percent, or $3.83, to $128.10.

Shares of Bear Stearns shot up 2.2 percent, or $3.21, to $148.50, while shares of Lehman rose 1.8 percent, or $1.31, to $73.03.

Meanwhile former Federal Reserve Chairman Alan Greenspan increased the subprime worries when he warned that problems in the market could spread into other sectors.

On Tuesday, the Mortgage Bankers Association reported that the proportion of mortgages in the initial stages of foreclosure rose to the highest rate on record. Stocks fell about 2 percent that day.

Before the opening, a report showed the U.S. Producer Price Index, a gauge of wholesale inflation, jumped 1.3 percent in February, well above the gain of 0.5 percent that economists were expecting. Excluding food and energy, core PPI rose 0.4 percent. The gains somewhat dimmed hopes for an interest-rate cut by the Federal Reserve any time soon.

Click here to visit FOXBusiness.com's Investing Center.