* Commodities set for 4 pct October loss, worst since May
* U.S. gasoline surges; worries about refinery damage
* Wheat jumps on 300,000 tonnes Egypt purchase
LONDON, Oct 31 (Reuters) - Commodities edged higher on Wednesday as investors dipped back into risky assets, but the sector was on track for its worst monthly loss since May as worries resurfaced about demand for raw materials.
U.S. gasoline surged on worries that storm Sandy damaged refineries while U.S. financial markets resumed trading after a two-day closure due to the monster storm that knocked out power for millions and killed at least 50 people in nine states.
Commodities climbed along with equities, buoyed by some good earnings reports, and as the dollar weakened against the euro, making dollar-priced commodities cheaper for Europeans.
The Thomson Reuters-Jefferies CRB index, a bellwether for commodities, rose 0.3 percent by 1705 GMT, but was on track to suffer a 4.3 percent loss in October, the worst performance since May, when the CRB tumbled by nearly 11 percent.
Commodities staged a rally during much of the third quarter, lifted by announcements and anticipation of central bank easing, but since then the focus has returned to sluggish global growth and largely weak demand for commodities.
The fourth quarter is likely to see markets hit by more uncertainty ahead of a potential U.S. ``fiscal cliff'' that could send the world's largest economy into a recession and as new leadership takes over in top raw materials consumer China.
``It's unlikely that you're going to get much more central bank action before the end of this year. And while there's some expectation in the markets of policy announcements out of China by the new leadership, I'd be surprised if something does materialise,'' said Wiktor Bielski, global head of commodities research at VTB Capital in London.
U.S. GASOLINE SURGES
On energy markets, U.S. gasoline futures surged 5 percent as the market braced for potentially long-term fuel supply disruptions at the East Coast's second-biggest refinery after the massive storm that devastated the New Jersey coastline.
``I think you see a lot of funds hedging themselves and speculation there could be a lot of damage'' from Sandy, said Richard Ilczyszyn, chief market strategist and founder of iitrader.com LLC in Chicago.
U.S. crude oil rose 0.6 percent while Brent crude dipped 0.2 percent. Both were on track for monthly losses -- 6.5 percent for U.S. crude and 3.3 percent for Brent.
Grain markets scored gains after Egypt, the world's biggest wheat importer, made a big purchase from Romania, Russia and France.
``We had a reminder the world is still hungry, with Egypt buying 300,000 tonnes of wheat,'' said Rich Feltes, vice president of research for R.J. O'Brien, although he noted that none of the wheat was of U.S. origin.
On the Chicago Board of Trade, December wheat jumped 1.7 percent, December corn also climbed 1.7 percent and January soybeans rose 1.0 percent.
GOLD TOUCHES WEEK HIGH
On metals markets, gold prices rose nearly 1 percent to their highest in a week, but were on track to end a four-month winning streak as October drew to a close.
``It looks like speculators are dipping their toes in again, but probably only to do a bit of window dressing ahead of month end,'' Saxo Bank vice president Ole Hansen said.
``Do not expect any major fireworks unless we close above $1,730 or until after non-farm payrolls on Friday.''
Spot gold rose 0.9 percent to $1,723.60 an ounce, while U.S. gold futures for December rose $11.90 to $1,724.00. The metal remains on course for a monthly drop of nearly 3 percent, its first one-month decline since May.
Among industrial metals, benchmark copper on the London Metal Exchange added 0.4 percent to $7,751 per tonne, but was set for a loss of over 4 percent for the month.
``There is not much conviction in China, with the discount from paper to physical (prices) remaining large. Still, Chinese are reluctant to sell aggressively for now,'' one trader based in Shanghai said.
In the softs markets, Arabica coffee futures slipped, pressured by selling from top grower Brazil, while dry weather was expected to aid the country's sugar harvest, weighing on sugar prices.
(Editing by Keiron Henderson)