New York - US and European stocks were higher late Friday, recovering from a rout the previous day caused by rising coronavirus cases in the United States and data denting hopes for a strong recovery from the pandemic’s devastation.

The scale of the damage was highlighted by news that the British economy shrank 20.4 percent month-on-month in April, a sharp reality check after markets rallied significantly from their March lows.

Analysts said the figures were awful but unsurprising and will hopefully represent the bottom as far as economic activity.

On that score, US consumer confidence figures were surprisingly good, bolstered as states moved to begin easing coronavirus restrictions.

The University of Michigan consumer sentiment index jumped to 78.9 from 72.3 in May, much better than economists had expected.

“Consumer sentiment posted its second monthly gain in early June, paced by gains in the outlook for personal finances and more favorable prospects for the national economy due to the reopening,” said Richard Curtin, chief economist of the Survey of Consumers.

Curtin cautioned, however, that while consumers are expecting things to get better, few anticipate a return to normalcy “anytime soon.”

Wall Street stocks finished a topsy-turvy session solidly higher, but lower for the week overall.

Art Hogan, chief market strategist at National Securities, said the trend in coronavirus cases added to worries about excess stock valuations and still-weak economic data.

“We thought we had peaked” on coronavirus, Hogan said, adding that higher cases numbers will slow the phased reopening of the economy following shutdowns to contain the virus.

“Going from phase two to phase three is going to take longer if we’re seeing an increase in cases,” he said.

In Europe, markets finished well off their highs and Frankfurt closed in the red, shedding 0.2 percent to 11,949.28.

London’s FTSE 100 index finished up 0.5 percent at 6,105.18 points while in Paris, the CAC 40 added 0.5 percent to 4,839.26 points.

“As if it was not already clear that we are living through extraordinary times, investors are piling back into stock on Friday after a sharp sell-off a day earlier,” Craig Erlam, analyst at trading group OANDA, said earlier in the European trading day.

Asian markets fell but losses were relatively modest by the close.