The Canadian dollar CADUSD edged lower against its broadly stronger U.S. counterpart on Tuesday as investors weighed rising tensions between the United States and China, but the currency’s decline was limited as oil prices moved higher.

The loonie was trading 0.2% lower at 1.2850 to the greenback, or 77.73 U.S. cents, after moving in a range of 1.2834 to 1.2878. It was the smallest decline among G10 currencies.

U.S. stocks were mixed in choppy trading, while the safe-haven U.S. dollar rallied against a basket of major currencies as comments by Federal Reserve officials suggested more interest rate hikes are coming in the near term and China condemned a visit to Taiwan by U.S. House of Representatives Speaker Nancy Pelosi.

Story continues below advertisement

The Canadian dollar “hung in there today, and I think that’s because WW3 (World War Three) didn’t begin following Pelosi’s arrival in Taiwan,” said Erik Bregar, director, FX & precious metals risk management at Silver Gold Bull.

Canada is a major producer of commodities, including oil, so the loonie tends to be sensitive to shifts in risk appetite.

U.S. crude settled 0.6% higher at $94.42 a barrel, clawing back some of the previous day’s decline, ahead of a meeting of OPEC+ producers this week.

“The Canadian dollar has held strong on the back of stabilizing oil prices,” said Darren Richardson, chief operating officer at Richardson International Currency Exchange Inc.

Story continues below advertisement

“I think the market is still quite confident in the Bank of Canada matching the Fed in terms of raising rates,” Richardson added.

Data showed that Canadian manufacturing activity lost further momentum in July as production and new orders declined for the first time since the early stages of the coronavirus pandemic.

Still, Canadian bond yields rose across the curve, tracking the move in U.S. Treasuries. The 10-year rose 9.7 basis points to 2.708%.

Be smart with your money. Get the latest investing insights delivered right to your inbox three times a week, with the Globe Investor newsletter. Sign up today.