U.S. stocks climbed on Friday, with Wall Street derailing a four-week slide with its best week this year, as quarterly results from companies including Microsoft and Procter & Gamble inspired investor enthusiasm.

"It's largely about the better-than-expected earnings today; P&G and Microsoft were both reassuring to investors. And falling gasoline prices mean the consumer has more spending money, so domestically, consumer spending is likely to pick up," said Kate Warne, investment strategist at Edward Jones.