Stocks rose on Friday after two days of declines as strong earnings General Electric and Google boosted investor optimism.

General Electric Co was the top gainer on the Dow index, up 4.5 percent at $19.28. The world's biggest maker of electric turbines and jet engines, reported better-than-expected earnings, helped by the recovery of its finance arm and a rise in revenue at its industrial units, including a sharp pickup in sales of locomotives.

Google Inc shares rose 1.4 percent at $635.80 after the company reported better-than-expected net revenue for its fourth quarter, after markets closed on Thursday.

There is still a lot of liquidity going into the market, especially after pulling back for a day or two, said Doug Roberts, chief market strategist for Channel Capital Research in New Jersey.

The Dow Jones industrial average <.DJI> was up 53.81 points, or 0.46 percent, at 11,876.61. The Standard & Poor's 500 Index <.SPX> was up 6.78 points, or 0.53 percent, at 1,287.04. The Nasdaq Composite Index <.IXIC> was up 10.90 points, or 0.40 percent, at 2,715.19.

Shares of Bank of America Corp fell 1.4 percent to $14.33 after the largest U.S. bank by assets reported a second straight quarterly loss, driven by a $2 billion write-down in its mortgage business.

(Editing by Padraic Cassidy)