US stocks have shown signs of stabilising but gains were kept in check by conflicting comments on trade talks from President Donald Trump and Beijing, which reinforced concerns about a potentially lengthy battle harming global growth.

Trump said talks with China were going well but his comments were countered by a senior Chinese diplomat who said provoking trade disputes is “naked economic terrorism”.

The lack of clarity around the trade battle has rattled investors of late, after the S&P 500 had risen more than 17 per cent through the first four months of the year on optimism a trade deal between the two countries could be reached.

That optimism has faded, however, as the escalating dispute between the two countries has weighed heavily on Wall Street in May, with each of the three main indexes declining at least 5 per cent for the month. Thursday’s gains marked the first advance for major US indexes this week.

Ben Phillips, chief investment officer at Eventshares in Newport Beach, California, said a period of stability often followed multiple days of losses.

“After multiple days of down, down, down the market usually takes a collective breath for some stability and a re-evaluation of risk,” he said.

“The market is coming to the realisation that we are not getting really clean or clear information and it is going to be a lot of noise and just prepare for that.”

A government report on Thursday showed US inflation was much weaker than initially thought in the first quarter on a sharp slowdown in domestic demand, while growth was also slightly lower than estimated in April.

The Dow Jones Industrial Average rose 43.47 points on Thursday, or 0.17 per cent, to 25,169.88, the S&P 500 gained 5.85 points, or 0.21 per cent, to 2788.87 and the Nasdaq Composite added 20.41 points, or 0.27 per cent, to 7567.72.

Trade jitters helped sustain demand for safe haven debt, as US Treasury yields held near 20-month lows. The yield curve between three-month bills and 10-year notes remained inverted, the inversion the widest in nearly 12 years.

That, in turn, weighed on interest-rate sensitive bank stocks, which dropped 1.2 per cent and were on track for a third straight day of declines, while the broader financial sector declined 0.5 per cent.

The energy sector fell 1.2 per cent, as oil prices settled down nearly 4 per cent in part due to a smaller-than-expected decline in US crude inventories. The sector has fallen more than 10 per cent this month.

Among stocks, Dollar General jumped 7.2 per cent after the discount retailer’s same-store sales and profit topped expectations.

PVH Corp plunged 14.9 per cent as the worst performer on the S&P 500, after the Calvin Klein owner cut its annual profit forecast as it grapples with tariffs and slowing retail growth.

Declining issues outnumbered advancing ones on the NYSE by a 1.11-to-1 ratio; on the Nasdaq, a 1.38-to-1 ratio favoured decliners.

The S&P 500 had one new 52-week high and 25 new lows; the Nasdaq Composite 25 new highs and 119 new lows.

About 6.25 billion shares changed hands in US exchanges, compared with the 6.99 billion daily average over the last 20 sessions.