The S&P 500 rose 8.14 points to 1,502.96. It was the eighth straight gain, the longest winning streak since November 2004.
The Dow Jones industrial average closed at 13,825.33, up 46 points. The Nasdaq composite gained 19.33 points to 3,149.71.
Procter & Gamble, world's largest consumer products maker, gained $2.83 to $73.25 after reporting that its quarterly income more than doubled. P&G also raised its profit forecast for its full fiscal year. Starbucks rose $2.24 to $56.81 after reporting a 13 percent increase in profits.
"Earnings are growing," said Joe Tanious, a global market strategist at JPMorgan. "The bottom line is that corporate America is doing exceptionally well."
Tanious expects corporate earnings to grow at about 5 percent over the "next year or two," and stock valuations to rise. Currently, the S&P 500 is trading at an average price-to-earnings ratio of 14, below an average of 15.1 for the last decade, according to FactSet data.
Apple continued to decline, allowing Exxon Mobil to once again surpass the electronics giant as the world's most valuable publicly traded company. Apple fell 2.4 percent to $439.88, following a 12 percent drop on Thursday, the biggest one-day percentage drop for the company since 2008, after Apple forecast slower sales. The stock is now 37 percent below the record high of $702.10 it reached Sept. 19.
Apple first surpassed Exxon in market value in the summer of 2011, grabbing a title Exxon had held since 2005. The two traded places through that fall, until Apple surpassed Exxon in early 2012.
Stocks have surged this month, with the S&P 500 advancing 5.4 percent. It jumped at the start of the year when lawmakers reached a last-minute deal to avoid the "fiscal cliff." Stocks built on those gains on optimism that the housing market is recovering and the labor market is healing. The Dow Jones is up 5.5 percent on the year.
Deutsche Bank analysts raised their year-end target for the index to 1,600 from 1,575.
Companies will be able to maintain their earnings even if lawmakers in Washington decide to implement wide-ranging spending cuts to narrow the budget deficit, the analysts said in a note sent to clients late Thursday.
The yield on the 10-year Treasury note, which moves inversely to its price, climbed 11 basis points to 1.95 percent.
Among other stocks making big moves.
-- Halliburton gained $1.91 to $39.72 after posting a loss that was smaller than analysts had expected. The oilfield services company said fourth-quarter profits declined 26 percent to $669 million on increasing pricing pressure in the North American market and one-time charges from the Deepwater Horizon disaster. Wall Street had expected worse.
--Hasbro fell $1.14 to $37.31 after the toy maker said its fourth-quarter revenue failed to meet expectations because of poor demand over the holidays. The company plans to cut about 10 percent of its workforce and consolidate facilities to cut expenses.
-- Green Mountain Coffee Roasters rose $2.53 to $46.31 after an analyst noted that sales of a competing coffee brewer introduced by Starbucks were getting off to a weak start.
MORE HBJ HEADLINES
Our new comment system is not supported in IE 7. Please upgrade your browser here.