NEW YORK - The U.S. dollar was down slightly on Monday after hitting a 20-year peak last week, with the global economy in focus after the Chinese yuan came under pressure following weak data.

Creating a risk-off mood on Monday, China's retail and factory activity fell sharply in April as extensive COVID-19 lockdowns confined workers and consumers to their homes. The offshore Chinese yuan was down against the dollar, holding near a September 2020 low of 6.8380 yuan hit last week.

Following the release of China's data, Bipan Rai, North America head of FX Strategy at CIBC Capital Markets, said trading was focused on macro economic data. "It's important to highlight that the risks are towards a stronger dollar and primarily, that's because if you look at the macro economic climate, the fundamentals don't look good. From a risk-off perspective that should still support the dollar against most currencies," Rai said.

But he said the greenback was consolidating after its recent strength and that more range-bound trading sessions were possible: "It makes sense for some period of consolidation before the next leg higher."

The euro was pulled from its earlier lows after European Central Bank policymaker Francois Villeroy de Galhau said the common currency's weakness could threaten the ECB's efforts to steer inflation towards its target.

The Australian dollar, which is highly exposed to the Chinese economy, reversed course as the day wore on and was last up against the dollar after falling as much as 0.9%. The dollar index was last down 0.11%, after having briefly crossed the 105 level on Friday - its highest level since December 2002, after six successive weeks of gains. Weekly positioning data showed investors built their long dollar bets.

The euro was marginally higher at $1.0414, but not far from last week's low of $1.0354, its lowest level since early 2017. Analysts see $1.0340 as a crucial level of euro support. HSBC strategists expect the euro to fall to parity against the dollar in the coming year.

"Much weaker growth and much higher inflation leave the ECB facing one of the toughest policy challenges in G10 (central banks)," they said.

Crypto markets, which trade around the clock, had a quiet weekend after turmoil last week driven by TerraUSD, a so-called stablecoin, which broke its dollar peg. An affiliate of the company behind TerraUSD said it had spent the bulk of its reserves trying to defend its dollar peg and would use the remainder to try to compensate some users who had lost out. Bitcoin was last trading at around $29,647, down more than 5%, after having dropped to $25,400 on Thursday, its lowest mark since December 2020. 

(Additional reporting by Saikat Chatterjee in London, Alun John in Hong Kong; Editing by Susan Fenton, Barbara Lewis and Paul Simao)