By Barani Krishnan
NEW YORK (Reuters) - Crude futures erased early gains on Thursday after bullish sentiment from a drawdown in U.S. stockpiles was checked by a rally in the dollar.
Position squaring ahead of the expiry of the front-month contracts in gasoline and diesel also diverted some investor attention from crude, brokers said.
Oil has lost more than $10 a barrel over the past month, with global benchmark Brent nearing a six-month trough earlier this week and U.S. futures near four-month lows, amid a global glut, resurgent dollar and recent stock market tumble in China.
Wednesday's U.S. government data showing an unexpectedly large weekly draw of more than 4 million barrels of crude, or at least 20 times what analysts expected, had brought the selloff to a grinding halt.
The market continued to ride the positive wave from the data on Thursday, advancing by up to a 1 percent before the gains unravelled in afternoon trade.
More From This Section
Brent
U.S. crude
"You have a stronger dollar to deal with," said David Thompson, executive vice president at Powerhouse, an energy-specialized commodities broker in Washington.
The dollar <.DXY> rose as data showing a pickup in U.S. economic growth in the second quarter bolstered the chances for a U.S. interest rate hike as soon as September. [USD/]
A robust dollar often weighs on commodities as raw materials such as oil, traded in the U.S. currency, become less affordable for users of the euro.
On the oil products front, gasoline pared early gains while diesel turned negative, weighing further on the sentiment in crude.
The front-month contracts in gasoline and diesel futures, set to expire on Friday, dominated activity on the petroleum complex, traders and brokers said.
Gasoline
"With the products expiration tomorrow, the cash markets around the Gulf Coast and New York Harbor are well supplied," causing gasoline and diesel to come off their highs, said Donald Morton, trader at Connecticut-based Herbert J. Sims & Co.
(Additional reporting by Christopher Johnson in London and Keith Wallis in Singapore; Editing by Dale Hudson and Meredith Mazzilli)