NEW YORK (Reuters) - Stocks around the world registered their longest losing streak in eight months on Wednesday as weaker oil prices weighed and the dollar came back from session lows after U.S. data boosted expectations of further Federal Reserve interest rate hikes.

The German share price index, DAX board, is seen at the stock exchange in Frankfurt, Germany, November 13, 2017. REUTERS/Staff/Remote

The dollar clawed back earlier losses against a basket of major currencies after U.S. data showed a rise in retail sales last month and an uptick in underlying inflation, which cemented expectations for further interest rate hikes.

The U.S. Treasury yield curve flattened to a 10-year low as fixed income investors also priced in rate hikes.

“With signs that underlying inflation pressures are starting to pick back up again, we think the Fed will need to step up the pace of tightening next year, raising the Fed funds rate a total of four times in 2018,” said Michael Pearce, U.S. economist at Capital Economics in New York.

The MSCI world equity index, which tracks shares in 47 countries, was set for its fifth straight day of declines, its longest run in the red since March.

While oil pushed down energy sector stocks, declines in defensive sectors such as utilities and gains in the financial sector implied bets on rising rates.

Lifted by steady economic growth, supportive monetary policies and rising corporate earnings, global equities have rallied this year, with indexes in the United States and Europe recently scaling record highs and Japan’s Nikkei climbing to a 26-year peak.

The Dow Jones Industrial Average fell 138.19 points, or 0.59 percent, to 23,271.28, the S&P 500 lost 14.25 points, or 0.55 percent, to 2,564.62 and the Nasdaq Composite dropped 31.66 points, or 0.47 percent, to 6,706.21.

The pan-European FTSEurofirst 300 index lost 0.43 percent and MSCI’s gauge of stocks across the globe shed 0.51 percent.

For Reuters Live Markets blog on European and UK stock markets see reuters://realtime/verb=Open/url=http://emea1.apps.cp.extranet.thomsonreuters.biz/cms/?pageId=livemarkets

Slideshow ( 2 images )

OIL SLIDE CONTINUES

Oil prices fell for a fourth consecutive session after the U.S. government reported an unexpected increase in crude and gasoline stockpiles, but an increase in refining runs and a drawdown in distillates moved prices up from session lows.

Prices also remained under pressure from this week’s International Energy Agency (IEA) outlook for slower growth in global crude demand.

U.S. crude fell 0.77 percent to $55.27 per barrel and Brent was last at $61.82, down 0.63 percent on the day.

The gap between U.S. two-year note and U.S. 10-year note yields contracted to 63.4 basis points, the flattest since November 2007.

Benchmark 10-year notes last rose 16/32 in price to yield 2.3257 percent, from 2.381 percent late on Tuesday.

The 30-year bond last rose 1 and 13/32 in price to yield 2.7685 percent, from 2.839 percent late on Tuesday.

Base metal prices fell as China data stoked fears of a slowdown in the world’s top commodities consumer, and oil and stocks declines indicating broad-based risk aversion.

Spot gold dropped 0.2 percent to $1,278.72 an ounce.

(For a graphic on 'Stocks set for longest losing streak in over half year' click reut.rs/2A0FOIY)

(For a graphic on 'World FX rates in 2017' click tmsnrt.rs/2egbfVh)

(For a graphic on 'Global assets in 2017' click tmsnrt.rs/2yaWht3)

(For a graphic on 'Global market cap' click reut.rs/2mcp7T1)

(For a graphic on 'Emerging markets in 2017' click tmsnrt.rs/2ihRugV)