NEW YORK (Reuters) - Oil prices slid 4% on Wednesday on higher U.S. crude inventories and a bleaker demand outlook, while uncertainty over the U.S.-China trade war and U.S. economic data weighed on stocks.

FILE PHOTO: Crude oil storage tanks are seen from above at the Cushing oil hub, in Cushing, Oklahoma, March 24, 2016. REUTERS/Nick Oxford

The dollar index rose as trade tensions and U.S. interest rate policy remained in focus after President Donald Trump expressed optimism about the prospects for a trade deal with China but continued to threaten tariff increases in the absence of a deal.

Earlier in the day, May data showed moderate inflation as U.S. consumer prices barely rose. That, with a slowing economy, could build a case for the U.S. Federal Reserve to cut interest rates.

Weak economic data such as Wednesday’s has investors hoping the Fed would give hints about a rate cut after its June 18-19 meeting.

But Michael James, managing director of equity trading at Wedbush Securities in Los Angeles, said: “People don’t want to be too far over their skis going into next week.”

Hopes for a rate cut were not enough to outweigh worries about the economic impact of escalating trade tensions.

With under three weeks to go before proposed talks between Trump and Chinese President Xi Jinping at the June 28-29 G20 summit in Osaka, Trump said on Wednesday he had a “feeling” a U.S.-China trade deal could be reached. But he again threatened to increase tariffs on Chinese goods if there is no agreement.

The Dow Jones Industrial Average fell 43.68 points, or 0.17%, to 26,004.83, the S&P 500 lost 5.88 points, or 0.20%, to 2,879.84 and the Nasdaq Composite dropped 29.85 points, or 0.38%, to 7,792.72.

The pan-European STOXX 600 index lost 0.30% and MSCI’s gauge of stocks across the globe shed 0.28%.

OIL FALLS, TREASURY YIELD CURVE STEEPENS

The U.S. Treasury yield curve was steeper after soft inflation data pulled short-dated yields lower.

Looking ahead, “focus will continue to turn to headlines surrounding trade. Also in focus the remainder of the week will be the $16 billion 30-year auction tomorrow (Thursday) and retail sales on Friday,” wrote Justin Lederer, Treasury analyst and trader at Cantor Fitzgerald.

Benchmark 10-year notes last rose 6/32 in price to yield 2.1205%, from 2.14% late on Tuesday.

In currency markets, the dollar index, tracking the currency against six major peers, rose 0.33%, with the euro down 0.35% to $1.1289.

The euro dropped as Trump said he was considering sanctions over Russia’s Nord Stream 2 natural gas pipeline project and warned Germany against being dependent on Russia for energy.

Oil futures extended their losses as the day wore on and ended the session with their lowest settlements in nearly five months, weakened by an unexpected rise in U.S. crude inventories and a dimming outlook for global oil demand.

“The fact that this surplus has been mounting during the past couple of months despite a near-record pace of exports in recent weeks is not only suggesting weak demand from the refiners but also a much stronger pace of imports than we had anticipated,” Jim Ritterbusch of Ritterbusch and Associates said in a note.

U.S. crude settled down 4% or $2.13 to $51.14 per barrel while Brent crude futures settled down 3.7% or $2.32 at $59.97.

(GRAPHIC-Asia stock markets link: tmsnrt.rs/2zpUAr4).

(GRAPHIC-Asia-Pacific valuations link: tmsnrt.rs/2Dr2BQA).

(GRAPHIC-Past trade spats have caused dollar depreciation link: tmsnrt.rs/2WR0HkT).