A surprise jump in US housing starts in June helped reduce concern that the US economy may be slipping into a recession.
Crude oil prices as the optimism on the economy underpinned the outlook for energy demand, and the weaker dollar also supported prices. Prices of both Brent crude and US oil rose more than 1 percent.
"So far earnings have been showing us a better picture of the economy than some macroeconomic issues suggest, which is encouraging, especially with housing starts surprising to the upside," said Michelle Gibley, senior market analyst at Schwab Center for Financial Research in Denver.
In Europe equities, banking shares bounced back from two-year lows ahead of Thursday's euro zone summit in Brussels, hoping it will complete a second bailout for Greece in an attempt to contain the sovereign debt crisis.
The FTSEurofirst 300 provisionally closed up 0.8 percent at 1,076.59 points.
Italian and Spanish bonds, which were pummeled by fears that a possible Greek default could damage the third and fourth largest economies in the euro zone, firmed slightly after 10-year yields jumped to 6 percent on Monday.
But even as bank shares rose in Europe, there were concerns that the gains might not be sustained.
"We're not in a banking crisis, we're in a political crisis," Robert Quinn, chief European strategist at Standard & Poor's equity research said, adding he was bearish heading into Thursday's meeting and saw the potential for further banking sector losses.
Gold continued to attract safe-haven investment flows, although it retreated below $1,600 an ounce after touching an all-time high near $1,610.
The euro rose as high as $1.42172 on electronic trading platform EBS before retreating to $1.41722, still up 0.4 percent on the day.
"There is some lightening of short positions ahead of (the summit) on the risk there could be some sort of agreement reached," said Omer Esiner, chief market analyst at Commonwealth Foreign Exchange in Washington.
"But an agreement on Thursday could include some form of Greek default, which to me is not necessarily a positive outcome for the euro."
The single currency also gained against the yen and the Swiss franc, which have been the safe havens in the foreign exchange market due to anxiety about debt troubles in Europe and the United States.
Still, risk aversion among investors remained high also because of the US government's Aug. 2 deadline for raising the debt ceiling. Failure to do so would push the world's biggest economy into default and endanger its top-notch credit rating.
The US White House and Congress are still at an impasse over raising the $14.3 trillion statutory debt limit.
Investors for the most part appear to be assuming that the US debt ceiling will be lifted and a default averted, with the 10-year Treasury yield hovering near 3.0 percent.
The stock market, however, found focused on strong earnings, including results of IBM and Coca-Cola, and the data showing that housing starts in June hit a six-month high and permits for future construction unexpectedly increased.
The Dow Jones industrial average was up 113.03 points, or 0.91 percent, at 12,498.19. The Standard & Poor's 500 was up 11.66 points, or 0.89 percent, at 1,317.10. The Nasdaq Composite Index was up 42.87 points, or 1.55 percent, at 2,807.98.
Dow component International Business Machines Corp added 4.2 percent to $182.63 after it reported late Monday that new business at its services division was up more than expected, raising hopes for the technology sector.
The S&P information technology sector gained 1.5 percent, the top gainer among S&P sectors. Shares of Apple hit a 52-week high ahead of its report due after the closing bell.
World stocks as measured by MSCI were up 1.0 percent after losing 1.2 percent on Monday.
In the precious metals market, spot gold hovered at $1,600 an ounce after reaching an all-time peak of $1,609.51 earlier. The metal is up 13 percent so far this year.
COPYRIGHT REUTERS, 2011