World stocks extend their gains to hit a near-four week high and oil prices rose on Wednesday on optimism that the United States and China may be inching towards a trade deal, soothing fears an all-out trade war could hit a slowing global economy.

Delegations from China and the US ended talks that had lasted longer than expected in Beijing on Wednesday amid signs of progress on issues including purchases of US farm and energy commodities and increased access to China's markets. Officials said details will be released soon.

MSCI's all-country index sailed 0.4 per cent higher in a fourth straight day of gains. Asian bourses saw a strong finish with Japan's Nikkei and China's blue-chip CSI 300 closing up 1 per cent while the tech-heavy South Korean KOSPI jumped nearly 2 per cent.

European bourses took the cue with the pan-European STOXX 600 gaining 0.6 per cent with both German and French benchmarks jumping 1 per cent. US stock futures also firmed, pointing to another strong day on Wall Street after the S&P 500 gained nearly 1 per cent on Tuesday.

“The positive news around the trade talks is giving a boost to risk assets it's what the global economy needs to see, said Chris Scicluna, head of economic research at Daiwa Capital Markets in London. “There are also reports of new initiatives by China to boost spending and that's desirable from the perspective of Chinese and global growth.”

A senior Chinese official said Beijing plans to introduce policies to boost domestic spending on items such as autos and home appliances this year. Meanwhile on the trade talks, sources said the two sides were still far apart from US demands for structural reforms in China.

The rally in riskier assets has accelerated since last Friday, when Federal Reserve Chairman Jerome Powell said he was aware of risks to the economy and would be patient and flexible in policy decisions this year.

Oil prices extended their gains, rising nearly 1 per cent with US West Texas Intermediate (WTI) crude oil futures rising above $50 per barrel overnight for the first time in 2019. US bond yields also climbed, with the benchmark 10-year Treasuries yield rising to 2.7404 percent, compared with its one-year low of 2.543 per cent hit just before Friday's strong payrolls data.

In another sign of subsiding worries about the US economic outlook, Fed funds rate futures show traders are now pricing in a small chance of a rate hike in 2019, a change from late last week when futures markets had priced in a cut by the end of the year.

“Slowly but surely, the numerous headwinds that contributed to the market sell-off in the final quarter of 2018 are becoming less gale force and more strong breeze,” Craig Erlam at OANDA wrote in a note. “There is a clear risk that conditions could deteriorate quickly but at the moment, the storm is passing and investors are seeing opportunities in the wreckage.”

In currency markets, the dollar index softened 0.2 per cent to 95.69 against a basket of currencies, hovering close to a 2-1/2 month low hit on Monday. The euro traded at $1.1464 while the dollar stood at 108.85 yen. China's yuan strengthened in offshore trading by 0.4 per cent to its strongest level in five weeks.

There was little market reaction to Trump's prime-time televised address where he made his case that a U.S.-Mexico border wall is urgently needed, despite opposition from Democrats.

That suggests the dispute on the issue, which has sparked a government shutdown since late December and already caused some delays in the release of key US economic data, is nowhere near a resolution.