By Claudia Assis and Deborah Levine, MarketWatch
SAN FRANCISCO (MarketWatch) -- Oil futures pared some of their earlier gains on Wednesday as U.S. stocks turned lower and as investors awaited U.S. government data on petroleum inventories.
Crude oil for September delivery rose 35 cents, or 0.4%, to $77.93 a barrel on the New York Mercantile Exchange. The contract earlier rose to an intraday high of $78.61 a barrel.
The ground got a little shakier for oil Wednesday after U.S. stocks opened higher but quickly lost some steam ahead of testimony by Federal Reserve Chairman Ben Bernanke later in the day. Read more about stocks here.
There's speculation Bernanke could introduce additional economic stimulus measures in his monetary-policy report to the U.S. Senate Banking Committee.
Petroleum markets were being "purely driven by sentiment," although prospects on the supply side were also positive, said Matt Smith, an analyst at Summit Energy in Louisville, Ky.
Traders keyed in on the week's official inventories report. The Department of Energy's Energy Information Administration reports its official inventories report at 10:30 a.m. Eastern time.
Summit Energy expects a decline of 2.6 million barrels of oil for the past week, and increases for oil products, Smith said.
Analysts polled by Platts were more cautious, expecting a decrease of 1.6 million barrels for oil and increases of 1 million barrels for gasoline stocks. Distillates stocks are expected to rise 1.6 million.
"We remain convinced that not so much the weather or inventory data but rather the events on financial markets, especially on the U.S. equity market, and the macro data will determine what happens on the oil market in the near term," said analysts at Commerzbank AG in a note to clients. "The market is now closely watching the quarterly results of U.S. companies."
Meanwhile, natural-gas futures for September delivery rose 4 cents, or 0.9%, to $4.62 per million British thermal units.
Crude also rose Tuesday, after declining in the prior three sessions. Read about Tuesday's oil trading.