NEW YORK - The U.S. dollar was rose on Friday and was set for a small weekly gain as the threat of a second wave of coronavirus infections rattled investors as did a slew of bleak U.S. economic data.

Safe-haven assets including the U.S. dollar index were bid on Friday morning after U.S. retail sales endured a second straight month of record declines in April as the novel coronavirus pandemic kept Americans at home, putting the economy on track for its biggest contraction in the second quarter since the Great Depression.

The dollar index was up 0.07% in mid-morning trade to 100.34 and was roughly flat against the Japanese yen, another primary safe-haven currency. Further evidence of investors moving out of risk assets could be seen in the major U.S. stock indexes, with the S&P 500 index and the Dow Jones Industrial Average both down about 0.6%.

The collapse in retail sales reported by the Commerce Department on Friday added to the historic loss of 20.5 million jobs last month in underscoring the deepening economic slump that analysts warn could take years to recover from. Federal Reserve Chair Jerome Powell on Wednesday warned of an "extended period" of weak growth and stagnant incomes. 

"The USD looks set to cap the week on a high note. It's also the best performing asset over the past month, which is also interesting since it parallels with a good showing of the MSCI China index," said Mark McCormick, global head of foreign exchange strategy at TD Securities, noting that setup was likely unsustainable.

New COVID-19 infections have been recorded in countries that have eased lockdown restrictions, denting earlier investor optimism that economies could get back to close to normal soon. Total cases in Germany increased by 913 to 173,152 on Thursday and the death toll rose by 101 to 7,824 after the country eased a nationwide lockdown.

"On a worldwide level, we think markets may be finally coming around to the belief that there's no V-shaped recovery in the offing," said McCormick.

"Of the countries we track, 100% of them have seen their GDP forecasts downgraded for the coming year."

The euro was last 0.16% stronger against the dollar at $1.082. Elsewhere, the British pound remained under pressure, falling 0.85% to $1.212, its lowest since March 26, after the European Union's Brexit negotiator Michel Barnier said on Friday that the third round of talks with Britain on a new partnership was "disappointing". 

(Reporting by Kate Duguid in New York and Olga Cotaga in London; Editing by David Gregorio) ((kate.duguid@thomsonreuters.com; +646-223-6118; Reuters Messaging: kate.duguid@thomsonreuters.com@thomsonreuters.net))