Global stocks rallied on Tuesday on a wave of optimism over the economy after a bullish outlook from U.S. aluminium maker Alcoa and a surge in China's copper imports, while the euro edged higher.

A well-received Greek debt auction and news that ratings agency Fitch is unlikely to downgrade France, the euro zone's second biggest economy, in 2012 helped support the euro as investors pared short positions.

U.S. stocks hit a five-month high, led by materials stocks, and a key pan-European stock index notched its highest close in a week.

The U.S. equity market showed renewed signs of shrugging off the woes of the euro zone. Recent economic reports and optimism about the U.S. earnings season have pushed stocks higher so far in 2012, with the benchmark S&P 500 rising in five of six sessions.

Investors are still focusing on Europe but not putting as much weight on Europe as they were in November, said Jonathan Corpina, head of NYSE floor operations for Meridian Equity Partners in New York.

Alcoa Inc , the world's second-largest aluminium maker, gave a positive outlook for global demand for the metal. In addition, China, the world's biggest consumer of copper, a key industrial metal, reported that its copper imports rose in December by 12.6 percent from November to a record high.

A gauge of materials companies' shares <.GSPM> was among the leaders of S&P 500 sectors with a gain of 1.8 percent.

European shares were also boosted by comments from U.S. automakers that added to hopes for an improving recovery, while optimism grew that China could take some measures to stimulate its economy.

The Dow Jones industrial average <.DJI> was up 69.78 points, or 0.56 percent, at 12,462.47. The Standard & Poor's 500 Index <.SPX> was up 11.38 points, or 0.89 percent, at 1,292.08. The Nasdaq Composite Index <.IXIC> was up 25.94 points, or 0.97 percent, at 2,702.50.

MSCI's all-country world equity index <.MIWD00000PUS> added nearly 1.4 percent, helped by earlier gains in Asian markets.

The pan-European FTSEurofirst 300 <.FTEU3> stocks index closed up 1.8 percent at 1,027.23 points.

The euro stayed above a recent 16-month low against the dollar as investors pared short positions, but investors remained skittish days before crucial sales of sovereign debt from Spain and Italy, two of the region's larger economies.

Investors stayed focused on the outlook for the euro zone economy, government debt sales and how the region's banks will raise much-needed capital to repair their balance sheets in the wake of poor reception for a rights issue by UniCredit, Italy's biggest bank.

The euro was up 0.1 percent at $1.2773, underpinned by a solid Austrian bond sale, which was little influenced by the country's heavy exposure to debt-ridden Hungary, and by data showing a surprise jump in French industrial output in November.

A well-received Greek bill auction, lower euro zone spreads and news that Fitch is unlikely to downgrade France's top AAA rating in 2012 also boosted sentiment and the euro.

Recent developments seem to suggest that activity in the biggest EMU countries is not on the verge of a full-blown collapse, said Annalisa Piazza, economist at Newedge Strategy.

In Latin America, Brazil's real led the region's currencies up against the dollar as growing pools of investment capital, falling world interest rates and growth in the United States and China boosted the outlook for emerging markets.

The real gained 1.83 percent to 1.7990 to the dollar.

U.S. government debt prices fell as stocks rallied and the more subdued jitters about Europe pared safe-haven demand for bonds.

The pullback in the Treasuries market was modest. Benchmark yields remained stuck in the 2 percent area on expectations that slow growth and low inflation would prevail in the United States and the euro zone debt crisis would continue.

The 'risk-on' sentiment is weighing on bonds and the upcoming supply argues for a steeper yield curve, said Carl Lantz, chief U.S. interest rate strategist at Credit Suisse in New York.

The benchmark 10-year U.S. Treasury note was down 4/32 in price to yield 1.97 percent.

Brent crude oil rose to above $113 a barrel on tension over Iran's nuclear program and unrest in Nigeria, Africa's top oil producer.

Brent crude oil rose 83 cents a barrel to settle at $113.21 a barrel. U.S. crude oil settled up 93 cents at$102.24 a barrel.

U.S. gold futures for February delivery settled up $23.40 an ounce at $1,631.50.

(Additional reporting by Joanne Frearson and Jessica Mortimer; Editing by Leslie Adler)