Crude futures settled higher Thursday in a volatile trading session, as commodity and currency markets attempted to find footing amid massive price swings this week.

Light, sweet crude for June delivery recently rose as high as $100.49 a barrel before settling 76 cents, or 0.8%, higher at $98.97 a barrel on the New York Mercantile Exchange. Brent crude on the ICE futures exchange ended 41 cents higher at $112.98 a barrel.

Oil prices wavered between gains and losses after a 5.5% drop Wednesday, when trading was halted on the Nymex for the first time in more than two years due to a 25-cent plunge in gasoline futures. After trading near two-and-a-half month lows early in Thursday's session, prices rose above $100 a barrel at one point amid a retreat of the dollar against the euro.

"The market is extraordinarily choppy, and it's choppy because traders are still trying to ascertain whether we're in the throes of a downtrend," said Andy Lebow, a trader and broker with MF Global. "The focus has been on the dollar, and on the macro plays."

The ties between commodity and currency markets have been especially strong in recent months, leading to wild price swings since early May when traders began unwinding long-held bets that the dollar would weaken and oil prices would continue to rise. Market watchers say more volatility is ahead for oil until both commodity and foreign-exchange markets recalibrate these long-term positions.

"These big routs are coming when we hike margins and the smaller investors jump out, but the big funds buy at the deflated prices" said Zachary Oxman, managing director at TrendMax Futures. He said the time horizon for investments has shrunk from weeks or months to days or hours.

"They are day trading this thing," said Oxman. "The market is manic."

Exchange operator CME Group Inc. (CME) raised the margin requirements to trade gasoline futures beginning Thursday, after Wednesday's massive gasoline decline that halted trading on the exchange for the first time in more than two years.

Wednesday's drop was the second of two major sell-offs in oil this month. The first was sparked by comments last week by European Central Bank President Jean-Claude Trichet, who signaled interest rates wouldn't be raised in the near future, fanning concerns that the euro-zone recovery remains tenuous.

Both drops sent investors fleeing from large positions in commodities while also backing away from bets against the dollar. Oil tends to fall when the dollar rises, as it makes crude more expensive for buyers in other currencies.

"Who would have thought Trichet would be responsible for gas prices falling a quarter," said Matt Zeman, chief market strategist at Kingsview Financial, adding that currencies are playing a big role in the sell-off in oil and commodities.

"Eventually, when everybody is on one side of the boat, it capsizes," Zeman said.

Before Thursday, crude futures were down 14%, or nearly $16, in May.

Meanwhile, falling fuel consumption in recent weeks due to high prices offered traders another reason to sell. Early Thursday, the Paris-based International Energy Agency, which represents the interests of the world's big oil consumers, cut its forecast for 2011 oil demand growth.

U.S. retail prices for regular gasoline averaged $3.984 a gallon on Thursday, up slightly on the day, according to the AAA Daily Fuel Gauge Report. It usually takes several weeks for changes to futures, or wholesale prices, to be reflected at the pump.

Front-month June reformulated gasoline blendstock, or RBOB, settled 5.89 cents, or 1.9%, lower at $3.0639 a gallon. June heating oil settled 1.54 cents lower at $2.9137 a gallon.