By Amrith Ramkumar

The dollar has made a sharp U-turn this summer following a long rally, confounding many traders but potentially adding fuel to this year's surprising stock-market rebound.

The ICE Dollar Index, which measures the dollar against a basket of other major currencies, in July notched its worst month in nearly a decade and recently hit a two-year low. The fall extended a reversal that began in late March, spurred lately by ballooning worries that mounting coronavirus cases will stall the U.S. economic rebound, even as growth accelerates in countries from China to Germany.

Big-name investors such as Ray Dalio and Jeffrey Gundlach have recently said publicly that the flood of U.S. government spending being injected into the financial system could eventually stoke inflation, eroding consumers' purchasing power. Surging budget deficits tend to make investors less likely to hold a country's currency. Fitch Ratings on Friday revised its credit rating outlook for the U.S. to negative from stable, though it maintained its top, triple-A rating.

At the same time, the currency's slide is adding further support to the booming market rally, lifting stocks and commodities. A weaker dollar boosts multinational companies, which see their products get more competitive abroad and can more easily convert overseas profits into dollars. It also makes products and investments that are priced in the currency cheaper for overseas investors, supporting demand for a host of financial assets. U.S. stocks have climbed near five-month highs recently, while raw materials are paring much of their 2020 decline.

"These things are denominated in dollars, and the dollar is getting crushed," said Christopher Stanton, chief investment officer of Sunrise Capital Partners. He expects the trend to continue and is directly wagering against the currency, betting on gains in the euro against the dollar and buying gold, which some investors are using as an alternative store of value. Gold recently climbed to all-time highs for the first time since 2011.

The dollar's decline upends a yearslong climb that was fueled by bets that U.S. economic growth would outpace activity overseas and let the Federal Reserve keep interest rates among the highest in the developed world. Now, the coronavirus is forcing the central bank to keep rates near zero, slicing much of the gap between rates in the U.S. and other nations and limiting investor returns from holding the currency.

Despite the tumble, few on Wall Street believe the dollar is on the brink of losing its status as the world's reserve currency, held in bulk by global central banks and used to finance most international transactions. The dollar remains relatively strong following its long climb, and analysts say economic data points like export growth justify the reversal. Dollar reserves also tend to increase when the currency weakens because it gets easier for central banks to add to their dollar assets.

Still, its reversal marks a key development for money managers. Investors this week will seek to gauge whether the U.S. economic recovery slowed last month by parsing the July jobs report and purchasing managers' indexes. The next round of corporate earnings from companies, including Booking Holdings Inc. and Hyatt Hotels Corp., will also provide a window into the prospects for the bruised travel industry.

Firms that earn more money overseas could benefit if the dollar's recent weakness persists. So could international markets -- many have long trailed U.S. stocks, but with growth overseas poised to catch up to domestic economic activity, they are now in position to attract more capital.

"The other houses are now looking just as attractive," said Nancy Perez, senior portfolio manager at Boston Private, which has recently increased its investments in shares of companies based in emerging markets in its asset-allocation strategies. "They have much more potential than the U.S."

Hedge funds and other speculators are favoring everything from the Swedish krona to the Brazilian real, positioning for more dollar weakness. Net investor bets on a weaker dollar recently climbed to their highest level since April 2018, Commodity Futures Trading Commission data compiled by Scotiabank show.

"We are in a stage of very high momentum," said Ed Al-Hussainy, senior interest-rate and currency analyst at Columbia Threadneedle Investments. He is betting that emerging-market currencies such as the Mexican peso and South African rand will extend their recent rebound. "Everybody is getting caught up in it."

The latest drop in the currency comes with the euro surging Thursday to two-year highs against the dollar after European Union leaders recently agreed on a more-than-$2 trillion spending package.

The aid is bolstering investors' faith in the bloc's unity and economic recovery since European countries hadn't spent as much previously. Many of the countries have also been more successful than the U.S. in containing the pandemic.

"There are now doubts about the idea that the U.S. would end the year in a better place than Europe," said economist Brad Setser, a senior fellow at the Council on Foreign Relations.

Investors say that the economic picture could make this dollar slide longer lasting, with Fed programs also alleviating early-year dollar shortages in overseas funding markets. But some are still wary of reading too much into the recent drop, with November's presidential election among the factors that could shift already volatile economic conditions.

Some analysts also question whether the weaker dollar will end up boosting exports and other economic data points given the scope of the global recession.

"It's nearly impossible to figure out exactly what the numbers will end up being," said Megan Horneman, director of portfolio strategy at Verdence Capital Advisors.

Write to Amrith Ramkumar at amrith.ramkumar@wsj.com