London — Oil rose for a third day on Thursday to reach its highest so far this year as financial markets drew support from investor optimism that the US and China can resolve their trade dispute.

The price of crude has risen 20% this year, driven primarily by the prospect of a decline in oil supply from oil cartel Opec and other top exporters, such as Russia.

“This rally over the past two to three days is completely justified when you put the predicted Opec production cuts into your global oil supply and demand equation,” Tamas Varga of PVM Oil Associates said.

Brent crude futures were up 95c at $64.56 a barrel by 10.07am  GMT, down from a session high of $64.81, while US crude futures rose 56c to $54.46 a barrel.

Opec and allies such as Russia and Oman have agreed to cut crude output by a joint 1.2-million barrels per day (bpd), 800,000 bpd of which will come from Opec.

Adding to the positive backdrop was data showing a surprise increase in China’s exports in January, as well as a sharp rise in imports of crude oil ahead of the Lunar New Year holidays in early February.

European stock markets rallied following a flurry of upbeat earnings reports and after US President Donald Trump said talks between Washington and Beijing over trade were going “very well”.

This week’s positive tone in oil futures, however, has masked a dislocation in the physical markets. The steep rise in availability of US shale oil is leading not only to a build in domestic inventories of crude, but also in refined products.

The US Energy Information Administration (EIA) said on Wednesday that US crude stocks rose to their highest since November 2017 as refiners cut runs to the lowest since October 2017 to combat tumbling margins, particularly for petrol.

Prices for physical barrels of light, sweet crude that yield large quantities of petrol have come under pressure. Heavier, sour grades that yield higher-value middle distillates such as diesel, such as Russian Urals, have benefited from Opec’s output cuts and US sanctions on competing grades, such as Iran’s.

Crude inventories rose for a fourth week in a row, by 3.6-million barrels, compared with forecasts for a gain of 2.7-million barrels. Stocks of petrol increased by 408,000 barrels to a near-record 258.3-million.