Stocks rose slightly on Wednesday after news of government aid for some life insurers and a merger among homebuilders spurred optimism that offset a quarterly loss from Alcoa .

But the market came off its early highs after life insurers cut gains on comments from the U.S. Treasury Department that appeared to throw cold water on some aspects of a story in the Wall Street Journal that said the government planned to extend the Trouble Asset Relief Program to the insurance industry.

Shares of Hartford Financial and Lincoln National were among the top percentage gainers on the New York Stock Exchange, rising more than 24 percent. The Dow Jones U.S. Life Insurance index <.DJUSIL> jumped more than 7 percent for its biggest rise since March 23.

Earlier optimism about a better than expected earnings season also faded after transportation company Ryder System Inc cut its first-quarter earnings per share guidance. Shares slumped 17 percent to $24.42.

Beleaguered homebuilders received a boost after Pulte Homes

said it would buy Texas-based builder Centex for $1.3 billion in stock against the backdrop of a troubled industry.

Everyone has been saying the first market that has to be fixed or stabilized is housing so everyone is looking for signs of that to be able to jump onboard, said Todd Clark, managing director of stock trading at Nollenberger Capital Partners in San Francisco.

Things like this merger in the housing space, that's a good data point and also the rise in the mortgage applications, may be pieces of the puzzle that things are starting to thaw on the housing front.

The Dow Jones industrial average <.DJI> gained 21.66 points, or 0.28 percent, to 7,811.22. The Standard & Poor's 500 Index <.SPX> rose 4.59 points, or 0.56 percent, to 820.14. The Nasdaq Composite Index <.IXIC> climbed 12.42 points, or 0.80 percent, to 1,574.03.

U.S. mortgage applications rose last week, as demand for home purchase loans jumped even as interest rates edged up from recent record lows, data from an industry group showed on Wednesday.

U.S. securities regulators on Wednesday issued recommendations to restrict short selling, a type of investing blamed by some lawmakers and executives for exacerbating the financial crisis and driving down share prices.

Alcoa kicked off earnings season with a first-quarter net loss that was worse than Wall Street estimated as metal prices and the auto industry slumped. Shares slipped 0.3 to $7.76 after initially falling 3.7 percent in premarket trade.

Shares of Centex jumped 24 percent to $9.45 while Pulte shed 9.8 percent to $9.72.

Still, weak earnings announcements from around the globe continued as Intel , the world's largest chipmaker, is unsure of when demand for semiconductors will revive, said Chairman Craig Barrett. Shares of the chipmaker fell 0.7 percent to $15.35.

The S&P 500 has risen nearly 21 percent from the March 9 low.

(Reporting by Chuck Mikolajczak; Editing by Theodore d'Afflisio)