* U.S. optimism over fiscal deal boosts markets
* European shares climb, U.S. stocks gain
* Euro gains vs dollar; oil prices edge up
NEW YORK, Nov 29 A benchmark world stock index rallied to a three-week high and the euro and commodities gained on Thursday amid optimism that U.S. political leaders were progressing toward a deal to avoid a fiscal crisis that could derail growth in the world's biggest economy.
The "fiscal cliff" - automatic spending cuts and tax increases that come into effect in 2013 unless Congress agrees on an alternative - is the biggest risk facing global markets in the final weeks of the year, following an agreement earlier this week on fresh aid for Greece.
U.S. benchmark indexes followed European markets higher, with an added boost after data on Thursday showed weekly initial jobless claims fell for a second consecutive week, and that the economy grew faster than initially thought in the third quarter.
The reports suggested that the world's largest economy was on a stable path to recovery. A separate report showed the National Association of Realtors monthly index of pending sales of existing U.S. homes rose 5.2 percent in October.
"There will be a deal before December 31 to avert the economy facing disaster," said Peter Cardillo, chief market economist at Rockwell Global Capital in New York.
"We're back on track for a year-end rally to continue," he said.
The growing optimism spread across world share markets, sending the MSCI global equities index up 0.8 percent to its highest since Nov. 7.
The Dow Jones industrial average was up 36.64 points, or 0.28 percent, at 13,021.75. The Standard & Poor's 500 Index was up 5.81 points, or 0.41 percent, at 1,415.74. The Nasdaq Composite Index was up 18.44 points, or 0.62 percent, at 3,010.22.
The FTSE Eurofirst 300 index rose 1 percent. Good demand at a bond sale by Italy, where yields fell to their lowest level in two years, added to signs the crisis in the euro area had begun to ease and helped further bolster optimism.
However, traders said until a deal was done in Washington, share markets were likely to remain nervous.
"One minute the portents for a deal on the fiscal cliff are negative, the next minute they are positive. This is likely to be the pattern all the way up to the deadline on Jan. 1," said Mike Mason, a senior trader at Sucden Financial Private Clients.
"Equities are sure to remain volatile and trading subdued until there is any concrete outcome to these negotiations," Mason said.
RISK FLOWS CHANGE
As investors returned to riskier assets, the other side of the coin was a retreat from safe-haven German government bonds, pushing benchmark 10-year debt yields up to 1.371 percent .
But the better tone allowed Italy to auction successfully six billion euros ($7.75 billion) of new 5- and 10- year debt, which was expected to complete its funding needs for the year. The yield on the 10-year bond was around the lowest since November 2010.
Spain also took the opportunity to announce it would sell some more bonds at an auction on Dec. 5, although it has completed raising all the money it needs for this year.
Italian and Spanish debt have benefited in recent months from the European Central Bank's pledge to buy sovereign debt if countries ask for aid first.
Even though that has not happened yet, the prospect of a central bank backstop has made investors reluctant to sell and has pushed them back into those markets.
A fall in Italian and Spanish yields helped lift the euro against the dollar by 0.2 percent to $1.2974, with the hopes for a U.S. fiscal deal adding to support for the common currency.
Commodity markets also got some support from the U.S. fiscal deal hopes, while mounting tension in the Middle East bolstered oil prices on supply concerns. Crude oil futures rose $2.02 to $88.53 a barrel, and Brent climbed $1.66 to $111.17 a barrel.
Spot gold was up 0.4 percent at $1,725.75 an ounce although this followed a 1.3 percent tumble on Wednesday, its biggest daily decline in nearly four weeks.
"Gold is being pulled higher on this prevailing optimism over the fiscal cliff," said Ross Norman, chief executive of bullion dealer Sharps Pixley.