Bank and commodity shares led the benchmark Standard & Poor's 500 Index to a fresh five-year closing high on Tuesday on hopes that the global economy continues to mend.
Travelers' shares climbed after the insurer's results and lifted the Dow Jones industrial average to a new five-year closing high.
On Friday, both the Dow and the S&P 500 ended at five-year highs after the quarterly earnings season got off to a solid start. On Monday, the US stock market was closed in observance of the Martin Luther King, Jr holiday.
In Tuesday's session, the market also gained on signals that Republican leaders in the US House of Representatives aim on Wednesday to pass a bill to extend the US debt limit by nearly four months to May 19. The White House welcomed the move, saying it would remove uncertainty about the issue.
Investors, however, were cautious ahead of an increase in earnings reports and as the S&P 500 rose for a fifth straight session.
Jack de Gan, chief investment officer of Harbor Advisory Corp, in Portsmouth, New Hampshire, said better economic numbers in the United States and China, as well as more stabilisation in Europe, were driving buyers into sectors associated with economic growth.
More From This Section
"Any (bearish) news could turn us down for a day or so," he said, referring to the recent string of gains.
Freeport-McMoRan Copper & Gold led gains in the materials sector after it reported a 16% rise in fourth-quarter profit on higher production. Shares gained 4.6% to $35.19.
The Dow Jones industrial average rose 62.51 points, or 0.46%, to 13,712.21 at the close. The S&P 500 gained 6.58 points, or 0.44%, to 1,492.56. The Nasdaq Composite added 8.47 points or 0.27%, to 3,143.18.
Tuesday's session marked the highest closes for both the Dow and the S&P 500 since December 2007.
Technology shares underperformed as concerns about Apple's ability to continue to grow at hyper speed and a weak outlook from Intel Corp diminished optimism about the sector's prospects. The S&P technology index added 0.16% for the day. In comparison, the S&P energy sector index, the S&P financials index and the S&P basic materials index each gained 0.9%.
But Google shares rose 4.8% to above $736 in extended-hours trading after the world's No 1 search engine reported a jump in fourth-quarter revenue. Shares of IBM added more than 4% to trade above $204 after the world's largest technology services company reported earnings and revenue that beat estimates.
"We expected Q4 for many tech vendors would be weak because we were expecting a lot of companies sitting on their wallets until it became clear what was going to become of the fiscal cliff," Forrester analyst Andrew Bartels said about IBM.
"Given the fact it's Q4 and the cloud of fiscal cliff within it, it's a positive indication that especially tech software will be doing better in the next couple of months."
During the regular session, shares of blue chips Travelers, DuPont, and Verizon Communications rose following earnings.
Travelers rose 2.2% to $77.95, a closing high. DuPont's shares gained 1.8% to $47.82. Verizon's stock rose 0.9% to $42.94.
Thomson Reuters data through Tuesday morning showed that of the 74 S&P 500 companies that have reported earnings so far, 62.2% have topped expectations, roughly even with the 62% average since 1994, but below the 65% average over the past four quarters.
Overall, S&P 500 fourth-quarter earnings are forecast to have risen 2.6%. That estimate is above the 1.9% forecast from the start of earnings season, but well below the 9.9% fourth-quarter earnings forecast from October 1, the data showed.
US-listed shares of Research in Motion rallied 13% to $17.90 a day after its chief executive said the Canadian company may consider strategic alliances with other companies after the launch of devices powered by RIM's new BlackBerry 10 operating system.
About 6.2 billion shares changed hands on the New York Stock Exchange, the Nasdaq and NYSE MKT, below last year's daily average of about 6.45 billion shares.
On the NYSE, advancers outnumbered decliners by a ratio of roughly 9 to 4. On the Nasdaq, five stocks rose for every three that fell.
Signs of improved sentiment toward world growth were also seen in European bond markets. The yield on Portugal's benchmark 10-year note fell below 6% for the first time since late 2010 on news that the country was set to tap the bond market this week for the first time since it was bailed out in 2011.