Wall Street stocks put in a strong performance in the first half of 2021, ending on a mostly upbeat note Wednesday, with the S&P 500 posting its fifth straight record even as the Nasdaq joined European bourses in moving lower.

Investors have cheered as the global economy edges back to life with coronavirus vaccines becoming more widespread, even as new Covid-19 variants continue to pose risks.

The broad-based S&P 500 climbed 0.1 percent to 4,297.50, lifting the gain for the second quarter to more than eight percent. And investor enthusiasm has sent the index up more than 14 percent since the start of the year.

The buoyant market lifted "all sizes, styles, and sectors," said Sam Stovall of CFRA Research, which ranked the S&P 500's gain in the first half of 2021 as the 13th best in the last 76 years.

The latest records have come on the heels of mostly solid economic data in recent weeks that show how widespread availability of coronavirus vaccines has transformed the global outlook compared with a year ago.

Private US firms added 692,000 jobs in June, according to payroll services firm ADP. The figures were a big drop from May, but well above economists' expectations and bode well for the key government employment report Friday.

Other recent reports have shown strong consumer confidence and rising home prices, while corporate earnings have also won cheers, with large banks saying consumers are keeping up with their credit card bills and companies like Nike, General Motors and Target seeing strong sales.

"The macro outlook continues to improve," said Paul Gruenwald, global chief economist at S&P Global Ratings, which raised its 2021 forecast.

But S&P noted that "risks are shifting from those that are pandemic related to those that are rebound and exit related," especially inflation.

Key questions for stocks the rest of the year center on the ability of the Federal Reserve and other central banks to manage a transition away from ultra-accommodative monetary policy.

In Europe, the main markets swerved lower on Wednesday.

The London stock market shed 0.7 percent after data showed the Covid-hit British economy shrank by slightly more than expected in the first quarter before a subsequent easing of lockdown restrictions.

Gross domestic product contracted by 1.6 percent in the three months to March, down from the previous estimate of 1.5 percent.

Frankfurt dived 1.0 percent and Paris dropped 0.9 percent.

European equities still had a decent quarter, with London's FTSE 100 rising 4.8 percent and the CAC 40 in Paris jumping 7.2 percent higher.

The DAX 30 rose 3.4 percent having set new record highs.

Oil prices climbed Wednesday on hopes for upbeat demand as traders await Thursday's meeting of OPEC and other key crude producers.

US consumers are growing more upbeat about the economy and job prospects, with confidence rebounding to the highest point since the start of the pandemic
US consumers are growing more upbeat about the economy and job prospects, with confidence rebounding to the highest point since the start of the pandemic AFP / Angela Weiss

Both main oil contracts are sitting around multi-year highs, helped by fresh data showing lower commercial oil stocks in the United States.

New York - Dow: UP 0.6 percent at 34,502.51 (close)

New York - S&P 500: UP 0.1 percent at 4,297.50 (close)

New York - Nasdaq: DOWN 0.2 percent at 14,503.95 (close)

London - FTSE 100: DOWN 0.7 percent at 7,037.47 (close)

Frankfurt - DAX 30: DOWN 1.0 percent at 15,531.04 (close)

Paris - CAC 40: DOWN 0.9 percent at 6,507.83 (close)

EURO STOXX 50: DOWN 1.1 percent at 4,064.30 (close)

Tokyo - Nikkei 225: DOWN 0.1 percent at 28,791.53 (close)

Hong Kong - Hang Seng Index: DOWN 0.6 percent at 28,827.95 (close)

Shanghai - Composite: UP 0.5 percent at 3,591.20 (close)

Euro/dollar: DOWN at $1.1859 from $1.1897 at 2100 GMT

Pound/dollar: DOWN at $1.3832 from $1.3836

Euro/pound: DOWN at 85.72 pence from 85.98 pence

Dollar/yen: UP at 111.11 yen from 110.53 yen

Brent North Sea crude: UP 0.5 percent at $75.13 per barrel

West Texas Intermediate: UP 0.7 percent at $73.47 per barrel