The euro was little changed as conflicting reports emerged of a potential new aid deal for debt-laden Greece.

China posted a trade surplus in April that was nearly four times greater than expected, as exports hit a record and imports eased more than anticipated.

The data illustrated the strength of China’s economy even after its efforts to rein in inflation.

Optimism about the pace of economic recovery lifted European and US equities.

World stocks as measured by the MSCI stock index were up 0.7 percent.

“China’s export numbers were very good,” said Burt White, chief investment officer at LPL Financial in Boston.

“That gave a shot in the arm to this market.”

European shares climbed to a one-week closing high as mining stocks rose on the data and investors scooped up banks on hopes they will not suffer an imminent write-down on their Greek debt holdings.

“There is a view that if there is going to be a debt restructuring, it is going to be orderly,” said Bob Parker, senior adviser at Credit Suisse.

The FTSEurofirst 300 index of top European shares ended up 0.8 percent.

US stocks rose for the third day in a row. The Dow Jones industrial average added 55.89 points, or 0.44 percent, to 12,740.57.

The Standard & Poor’s 500 Index rose 8.27 points, or 0.61 percent, to 1,354.56.

The Nasdaq Composite Index gained 19.93 points, or 0.7 percent, to 2,863.18.

But even as the Chinese data helped ease fears about a global slowdown, the utilities sector led gainers on the S&P 500 as investors took more defensive positions on the view that although the recovery was still in place, it is not accelerating as quickly as anticipated.

US data showed import prices rose at a slower pace in April as petroleum and food cost increases moderated, while a jump in wholesale inventories during March suggested a weak first quarter ended on a firmer note.

The ease in prices underscored the Federal Reserve’s general view that the impact of higher food and commodity prices will prove to be temporary.

Crude oil prices traded higher as investors resumed a reversal from last week’s abrupt slide.

While no refineries had been forced to cut operations yet, rising waters along the Mississippi threatened to disrupt plants in Louisiana in the next two weeks.

Prices also got support from the China data that showed strong oil imports for April.

Brent crude jumped $1.73 to $117.63, recovering from a low of $113.58 earlier in the session. US crude settled up $1.33 at $103.88 a barrel in volatile action.

Oil fell earlier in the day after CME Group, the world’s largest commodities exchange, raised the margin call on crude futures for a fourth time since February in an effort to curb volatility.

Oil prices have had a volatile week of trading, falling from over $114 a barrel — the highest level since 2008 — to $94 a barrel.

The euro steadied after falling sharply in recent days and was last at $1.4355, with the session peak at $1.4395 and the low at $1.4267.

“The euro continues to struggle amid a backdrop of renewed debt problems in the bloc’s periphery,” said Omer Esiner, chief market analyst at Commonwealth Foreign Exchange, Inc in Washington.

Greece denied reports it was discussing a new 60 billion euro bailout with international lenders, and its borrowing costs rose amid fears it may have to restructure its debt without further EU help.

Doubts were raised by a German lawmaker whether Greece had met the conditions for getting the next tranche of aid under its existing deal but a source close to EU and IMF inspectors in Athens said it was too early for a decision.

Comments from German Chancellor Angela Merkel — Europe’s reluctant paymaster — on new aid for Greece were guarded.

Merkel said she could only discuss further aid for Greece after EU and IMF officials report on implementation of its existing rescue plan. But she did not rule out additional funding for Athens or a possible fresh easing of terms on its bailout.

Since last Wednesday the euro has fallen from a 15-month high of $1.4939 to a seven-week low around $1.4254 on renewed fears of a Greek debt default.