Brazil’s real and the Ibovespa slid as China’s yuan devaluation fueled concern that demand from the nation’s top trading partner will falter. Stocks and the currency pared losses after Moody’s Investors Service signaled a cut to junk isn’t likely any time soon.

The real dropped 1.1 percent on speculation that trade inflows from the Asian nation will slump and as Goldman Sachs Group Inc. said it may weaken to 4 per dollar in the next 12 months. Vale SA, which gets a third of its revenue from China, extended this year’s plunge to 24 percent. Commodity companies in the MSCI Brazil fell 3.4 percent, the most among 10 industries.

Brazilian assets joined a global selloff that pushed a gauge of emerging-market equities into a bear market, following a 20 percent tumble from a September peak. China devalued the yuan as policy makers at Asia’s largest economy stepped up efforts to combat the deepest slowdown since 1990 and support local exporters.

“China’s acknowledgment that the economic deceleration is coming in worse than anticipated brings discomfort to markets,” Raphael Figueredo, an analyst at brokerage Clear Corretora, said by telephone from Sao Paulo. “Exporters and commodity companies are really feeling the pinch.”

The Ibovespa fell 0.6 percent to 49,072.34 in Sao Paulo, bringing a slide from its May high to 15 percent. The real sank to 3.4743 per dollar, trimming a drop of as much as 2.3 percent.

Recession Outlook

China’s currency devaluation is another blow to Latin America’s largest economy, which is already facing prospects for a recession this year, Figueredo said. Analysts surveyed by the central bank predict the worst contraction in 25 years amid a corruption scandal at Brazil’s state-controlled oil producer.

The economic slowdown has complicated Finance Minister Joaquim Levy’s pledges to cut expenses and boost taxes, forcing him last month to reduce fiscal targets.

Moody’s Investors Service responded Tuesday by lowering Brazil’s rating to the cusp of junk in the second downgrade since President Dilma Rousseff came to office. Brazil’s grade was cut by one notch to Baa3, with a stable outlook.

“A rating cut is never good news, but investors are holding on to the stable outlook as a sign that a downgrade to junk is less likely in the sort term,” Fausto Gouveia, who helps oversee 850 million reais ($245 million) at asset manager AZ Legan, said by phone from Sao Paulo.

Brazil is rated BBB- by S&P, which on July 28 changed the outlook to negative, indicating that a downgrade is more likely than an upgrade. Fitch Ratings has a BBB for Brazil, which means two steps above junk.

So far this year, the real has tumbled 24 percent, the most among 16 major tenders tracked by Bloomberg. A weaker currency is part of a necessary adjustment to address the imbalances in Brazil, Goldman Sachs analysts Kamakshya Trivedi and Alberto Ramos wrote in a note to clients.

In a bid to support the currency, the central bank extended the maturity of 11,000 foreign-exchange swap contracts Tuesday, up from 6,000 daily earlier this month.