The S&P 500 gave up an early gain and ended slightly lower, ending a three-day winning streak.

The benchmark index fell 0.4% after a wobbly day of trading. Like other markets worldwide, Wall Street took a pause following some recent gains.

Treasury yields held steady, and oil prices ended lower.

The index has climbed back within 8% of its record set in February, but analysts still say more volatility may be ahead.

Even with its three days of recent gains, the index still hasn’t clawed back the ground it lost in a 6% drop last Thursday.

Stocks were slightly higher in early trading on Wall Street on Wednesday.

The S&P 500 rose less than 0.1% in the first few minutes of trading, led once again by technology companies.

World markets turned higher, although analysts warned the gains are likely bigger and faster than justified by the uncertain economic outlook.

London and Frankfurt opened higher. Benchmarks in Shanghai, Hong Kong and Seoul rose after early losses. Tokyo retreated after Japan reported its exports sank in May.

Global share prices have regained most of this year’s losses as investors count on a rebound from the coronavirus pandemic despite rising infections in the United States, Brazil and some other major countries.

Data showed U.S. retail spending was stronger than expected.

U.S. retail figures showing an 18% gain over the previous month are encouraging but still $50 billion below what might have been expected without the coronavirus, said Rob Carnell of ING in a report.

“We don’t imagine markets will share this nuanced view,” said Carnell. “They will likely make the most of any good news and continue to be dismissive of any bad news.”

Wire coverage

We pay for the right to publish content from The Associated Press because we think it’s important to help you stay up to date on national and world news. Our staff typically compiles these reports, adding supplementary information from other news sources to emphasize angles that are important to our readers.

On Wednesday in London, the FTSE 100 opened up 0.7% at 6,287.31, and Frankfurt’s DAX added 0.5% to 12,379.94. The CAC 40 in France advanced 0.5% to 4,979.13.

In Asia, the Shanghai Composite Index edged 0.1% higher to 2,935.87, while the Hang Seng in Hong Kong added 0.6% to 24,481.41.

The Nikkei 225 in Tokyo shed 0.6% to 22,455.76 after the government reported May exports fell 28.3% from a year earlier in their biggest decline since the 2008 global crisis.

In Seoul, the Kospi closed up 0.1% at 2,141.05. India's Sensex lost 0.4% to 33,453.82.

Sydney’s S&P-ASX 200 gained 0.8% to 5,991.80. New Zealand and Southeast Asia markets advanced.

Also Wednesday, Singapore reported May exports fell 25% from a year earlier.

Financial markets have been underpinned by promises from the Fed and other central banks to inject more money into economies through bond purchases and other steps.

However, analysts are skeptical about the U.S. stock market’s run since it began climbing after hitting a bottom in late March, down 34% from its record.

Investors have been pushing up shares of companies that would benefit from a reopening economy.

In energy markets, benchmark U.S. crude oil for July delivery lost 29 cents to $38.11 per barrel in electronic trading on the New York Mercantile Exchange. The contract gained $1.26 on Tuesday to settle at $38.38. Brent crude, the benchmark for international prices, shed 16 cents to $40,80 per barrel in London. It rose $1.24 the previous session to $40.96 a barrel.

The dollar gained to 107.39 yen from Tuesday’s 107.33 yen. The euro declined to $1.1230 from $1.1266.