Commodities were buoyed this week by news of a breakthrough US budget deal to avert default, but some prices fell as traders questioned whether problems would soon resurface.
Sugar was meanwhile the star performer, striking a one-year peak in New York after a fire at a terminal in top producer Brazil late on Friday.
Markets breathed a sigh of relief on Wednesday when US lawmakers agreed a deal to reopen the government and avoid a debt default, which would have ravaged the global economy and demand for raw materials, analysts said.
The bill restarts government operations until January 15 and raises the debt ceiling until February 7.
Sentiment was lifted somewhat by news that China's economy -- a major consumer of commodities -- expanded by 7.8 percent year-on-year in July-September. That snapped two quarters of slowing growth.
OIL: Crude oil prices experienced sharp swings as traders tracked the US debt deal negotiations, the weak dollar and strong Chinese data.
"This week, there were quite volatile and nervous trading conditions in the oil market, as investors were watching closely the US negotiations, remaining cautious to lock in fresh positions," Sucden analyst Myrto Sokou told AFP.
"Brent retreated within the $108-$110 per barrel range, while the weaker US dollar and the robust Chinese economic data failed to provide some support to the market.
"It seems that the Congress has put together a short-term budget and debt deal which will possibly cause further uncertainty and renewed discussions over the next three months."
Crude futures wavered on Monday as Senate Democratic and Republican leaders appeared to get close to a deal to reopen the government and avoid a default.
The market sank on Tuesday as US lawmakers remained deadlocked over a budget and debt ceiling deal, and as negotiations began on Iran's nuclear program in Geneva
Oil rallied on Wednesday, mirroring a turnaround for equities, after US lawmakers finally struck a deal aimed at avoiding a default.
Enthusiasm was dampened by fears that the agreement -- which extends the US Treasury's borrowing authority until February 7 -- was only a temporary measure.
The market also declined Thursday after trade group the American Petroleum Institute (API) reported an increase in US crude supplies.
The API reported a sharp increase of 5.9 million barrels in US crude inventories in the week ending October 11, signalling weaker demand in the world's biggest oil consumer.
The US government shutdown meanwhile prevented the publication of official weekly crude inventories data on Wednesday. The Energy Information Administration resumes its weekly report next week.
By Friday on London's Intercontinental Exchange, Brent North Sea crude for delivery in December slid to $109.60 per barrel from $111.39 for the November contract a week earlier.
On the New York Mercantile Exchange, West Texas Intermediate or light sweet crude for November slid to $101.02 a barrel from $102.94 a week earlier.
Gold faces rollercoaster ride
PRECIOUS METALS: Gold dived on Tuesday to a three-month low at $1,251.84 per ounce, as expectations of a US deal hit the precious metal's safe-haven status.
However, gold then rebounded back above $1,300 after Wednesday's agreement, as the dollar dived to 8.5-month lows against the European single currency.
"The temporary budget deal was seen as a positive ... as it would keep the Federal Reserve from withdrawing monetary stimulus at least until the beginning of next year," said Capital Spreads dealer Jonathan Sudaria.
"With the dollar considerably weakened, gold soared as traders view the metal as an attractive hedge."
The weaker greenback makes dollar-priced commodities like gold cheaper for buyers using stronger currencies. That tends to lift demand.
By late Friday on the London Bullion Market, the price of gold rallied to $1,316.50 an ounce from $1,265.50 a week earlier.
Silver edged up to $21.87 an ounce from $21.52.
On the London Platinum and Palladium Market, platinum gained to $1,438 an ounce from $1,369.
Palladium rose to $737 an ounce from $712.
BASE METALS: Base or industrial metals won only modest support from strong Chinese economic growth data.
"Chinese GDP data has given copper prices a small boost," noted CMC Markets analyst Michael Hewson.
By Friday on the London Metal Exchange, copper for delivery in three months rose to $7,273 a tonne from $7,167.75 a week earlier.
Three-month aluminium eased to $1,855 a tonne from $1,886.
Three-month lead increased to $2,185 a tonne from $2,097.25.
Three-month tin reversed to $23,000 a tonne from $23,345.
Three-month nickel rallied to $14,195 a tonne from $13,840.
Three-month zinc climbed to $1,945.50 a tonne from $1,912.50.
Sugar strikes one-year peak on Brazil fire
SUGAR: New York prices surged to a one-year high point on reports of a major fire at a terminal in Brazil.
According to media reports, a fire has badly damaged the Copersucar terminal at Brazil's port of Santos in Sao Paulo state.
In Friday deals on New York's NYBOT-ICE exchange, sugar soared to $20.16 US cents a pound -- the highest level since October 22, 2012.
On LIFFE, London's futures exchange, sugar prices vaulted as high as $529.40 per tonne, reaching a level last witnessed on March 22, 2013.
"It is much more a logistical issue than something that changes the overall world balance sheets," Price Futures Group analyst Jack Scoville told AFP.
"There might be 90,000 or 100,000 tons of sugar located there, that seems to be the average for what was held there. So, in the overall scheme of things that can be managed.
"But, the loss of the warehouse space in ports will make shipping much more difficult. So, we saw a short term spike in prices."
The news has sent prices rocketing because Brazil is the world's biggest sugar producer.
"It will hurt world availability for the short term, though, and probably help India and Thailand sell sugar at slightly better prices than they might have been able to do otherwise," added Scoville.
COCOA: Prices leapt to new two-year pinnacles on the back of output jitters and keen global demand.
London cocoa on Tuesday hit £1,787 per tonne -- the highest level since late September 2011.
And in New York, cocoa surged on Thursday to a similar peak at $2,776 per tonne.
By Friday on LIFFE, cocoa for delivery in December eased to £1,763 a tonne from £1,773 a week earlier.
On NYBOT-ICE, cocoa for December jumped to $2,759 a tonne from $2,734 a week earlier.
COFFEE: Prices receded as traders eyed expectations of abundant output from leading producer Vietnam.
By Friday on NYBOT-ICE, Arabica for delivery in December decreased to 114.60 US cents a pound from 114.90 cents a week earlier.
On LIFFE, Robusta for January dipped to $1,638 a tonne from $1,723 for the November contract a week earlier.
RUBBER: Prices inched higher, lifted partly by the US budget deal, dealers said.
The Malaysian Rubber Board's benchmark SMR20 rose to 236.50 US cents a kilo from 235.65 cents the previous week.