The Dow Jones industrial average closed at 13,895.98, up 70.65 points. The Nasdaq composite gained 19.33 points to 3,149.71.
The rising market is being fed by generally positive economic and political news.
"People are jumping on the bandwagon," said Wayne Lin, a fund manager at Baltimore-based Legg Mason Inc. "The earnings are better. Economic figures are trending the right way. The legislators and the administration have gotten the message that they need to work together and investors are seeing that as a positive sign."
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 average is up 6 percent on the year.
Deutsche Bank analysts raised their year-end target for the S&P 500 to 1,600 from 1,575.
Procter & Gamble, the 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.
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 Deutsche Bank analysts said.
"The trend favors the march of the bulls," said Brian Jacobsen, who helps oversee $212 billion as chief portfolio strategist at Wells Fargo Advantage Funds. "If we continue to see economic improvement and financial conditions thaw, we'll see markets marching higher."
This article includes information from Bloomberg News.