Stocks ended sharply higher as the Dow and the S&P 500 hit new multi-year highs, easily erasing losses from Friday's sharp sell-off on turmoil in Egypt as investors focused on upbeat earnings and economic news.
The Dow Jones Industrial Average rose 148.23 points, or 1.25 percent, to close at 12,040.16 in the wake of posting the best January since 1997. The last time the Dow closed above 12,000 was June 19, 2008, while the first time the Dow closed above the benchmark was October 19, 2006.
Most Dow components gained, led by Pfizer, Alcoa and Bank of America .
The S&P 500 rose 21.47 points, or 1.67 percent, to close at 1,307.59. The last time the S&P 500 closed above 1,300 was Aug. 28, 2008, although it came close last Thursday, just before the turmoil in Egypt sent it spiraling down 1.8 percent. Tuesday's close was the highest since June 25, 2008.
The Nasdaq rose 51.11 points, or 1.9 percent, to close at 2,751.19.
The CBOE Volatility Index, widely considered the best gauge of fear in the market, fell more than 9 percent to below 18. The VIX had climbed 24 percent last Friday as the unrest in Egypt escalated.
All key S&P 500 sectors gained, led by materials, financials and health care.
The dollar slipped against a basket of currencies, as the euro hit a 2 1/2-month high against the U.S. currency. The price of gold, meanwhile, gained to close above 1,339 an ounce.
The gains in the market Tuesday follow subsiding fears over the unrest in Egypt, where protests by thousands in Cairowent off peacefully. Citizens have been calling for the resignation of President Hosni Mubarak in demonstrations that started last Tuesday. Mubarak said in a speech that he will step down at the next election, but would stay in office until then, according to Al Arabiya TV.
The market rally was fueled by investors who were buying back positions that had been shed Friday when the protests in Egypt escalated, Brian Battle, vice president of trading at Performance Trust Capital Partners, told CNBC.com. With the future of Egypt uncertain, investors didn't want to be overexposed heading into the weekend, Battle said.
But with the situation in Egypt stabilizing, nobody wanted to get in the way of the market grinding higher, particularly as economic and earnings data continue to be strong, he said.
"The trend certainly is higher, and nobody wants to stand in the way of that," Battle said.
Longer term, there are reasons to be skeptical, however, he added, citing high unemployment, sluggish housing, and emerging food and energy inflation. The prices paid index in a report on nationwide manufacturingrose in January to the highest level since July 2008.
"That’s raw material inputs, so margins will get squeezed," he said.
The sliding dollar, as well upbeat news on manufacturing trends in the U.S., fueled gains in materials stocks, which led the market rally, climbing more than 2.5 percent. The best performers in the sector included FMC , which Bank of America Merrill Lynch raised to "buy" from "neutral," on Tuesday, saying the agricultural and industrial maker of chemicals has strong operating leverage. Cliff's Natural Resources and Freeport McMoran Copper & Gold also soared.
Earnings results also fueled the rally. Companies representing more than half the market cap of the S&P 500 have reported earnings so far, with 71 percent exceeding their estimates, according to UBS Wealth Management Research. But unlike past quarters, UBS Wealth Management said in a report, companies are beating on revenue results as well as earnings.
In earnings news, UPSbeat analyst estimateswith profit of $1.08 a share, sending its shares up more than 4 percent to a new high. Rival FedEx also gained.
Pfizer shares gained after the pharma giant beat Wall Street estimatesand announced plans to cut its research and development spending. Pfizer did, however, also cut its forward guidance.
Egypt is not a major oil producer, but nearly 3 million barrels a day moves through the Suez Canal and the Sumed pipeline. Oil prices, which had gained largely on fears Egypt's woes could spread through the region, fell slightly to under $92 a barrel, although Brent crude rose to just under $102.
Energy stocks continued to rise, with Exxon Mobil, which reported strong earnings on Monday, still among the leading gainers, rising above its 52-week high. Credit Suisse raised the oil giant's price target to $84 a share from $76, while Deutsche Bank raised its to $90 a share from $85.
Anadarko Petroleum , which beat earnings expectations when it reported results after the market closed on Monday, also gained.
BP shares rose slightly even after a court in the U.K. imposed an injunction on a planned planned Arctic exploration joint venture with the Russian state-controlled Rosneft.
Apache , meanwhile, an independent energy company with significant operations in Egypt, traded flat after rising on Monday. Morgan Stanley upgraded the stock to "overweight" from "under-weight."
Earlier in the session, BP reported earnings, increasing its initial $40 billion estimate for the costs of the Gulf of Mexico oil spill by $1 billion. The company also said it would resume paying a dividend, which it had cut after the spill.
Archer Daniels Midland soared after beating quarterly earnings estimates on Tuesday amid rising grain prices and strong global demand. The agricultural processor's fiscal second quarter profits rose to $732 million or $1.14 a share, up from $567 million or 88 cents a share a year ago.
But Cummins rose after delivering better-than-expected profits and sales from overseas markets for its engines.
Baidu shares skyrocketed after the Chinese Internet search provider reported Monday that its quarterly revenue doubled.
In other tech news, Advanced Micro Devices gained more than 4 percent after Sterne Agree boosted its rating on the chipmaker to "buy" from "neutral," citing AMD's new products and improved outlook after weathering several problems.
Intel , meanwhile, traded flat a day after the company announced it would take a $700 million charge to fix a faulty chip.
Retailers traded mostly higher despite concerns sales were hit last month by relentless wintry weatherthat kept customers at home. Retailers will report January sales later this week.
Zumiez, Jos A Bank Clothiers, Gap and Urban Outfitters all rose, although some department stores slumped, including JC Penney and Macy's.
The major automakers reported sales on Monday. Ford Motor fell after saying sales rose 13 percent in January, hurt by falling sales to rental agencies, while Toyota gained after reporting its January U.S. sales rose 17.3 percent.
Volume on the consolidated tape of the New York Stock Exchange was 4.7 billion shares, while 1.1 billion changed hands on the NYSE floor.
In U.S. economic news, the Institute of Supply Management's manufacturing indexrose to 60.8 in January from 58.5 in December, and more than 58, the expected reading from economists surveyed by Reuters. The prices paid component of the index rose to 81.5 from 72.5, the highest level since July 2008.
Construction spending, however, fell 2.5 percent, the Commerce Department reported. Economists surveyed by Reuters did not expect a change in spending.
European shares made their biggest gain in three weeks, buoyed by strong economic news.
On Tap This Week:
TUESDAY: Earnings after-the-bell from Aflac, Broadcom and Electronic Arts.
WEDNESDAY: Weekly mortgage applications, Challenger job-cut report, ADP employment report, oil inventories; earnings from Marathon Oil, Mattel, NewsCorp., Visa and Yum Brands.
THURSDAY: Chain store sales, ECB announcement, jobless claims, productivity and costs, factory orders, ISM non-manufacturing index, Bernanke at National Press Club, Minneapolis Fed President speaks, Verizon begins iPhone pre-orders; earnings from GlaxoSmithKline, Merck, Royal Dutch Shell, Sony, Unilever, MasterCard and Sunoco.
FRIDAY: Nonfarm payrolls; earnings from Aetna.
More From CNBC.com: