(Bloomberg) -- Bearish bets on Brazilian assets held by local investors are getting crushed by an onslaught of optimism from foreigners, who are rushing to put money to work in the nation’s cheap markets. 

Foreigners have poured $9.2 billion into derivatives betting on the real in the last three weeks, becoming the most bullish in almost fours years. Local stocks have seen an inflow of 23 billion reais ($4.3 billion) from non-residents this month as investors including Franklin Templeton and Mirae Asset Global Investments LLC see room for a rebound. 

Brazil’s aggressive monetary tightening cycle, which has pushed the benchmark interest rate 7.25 percentage points higher in less than a year, is helping lure offshore money that’s rotating into emerging markets as developed nations are expected to begin pulling stimulus. Preference for commodity-linked assets is also favoring Latin American economies at a time when geopolitical tensions push traders away from the EMEA region, especially Turkey and Russia.

“The global environment favors high yielding, commodity-linked currencies where positioning is not crowded,” said Juan Prada, a currency strategist at Barclays Capital. “Carry protects from Fed hikes.”

Global Dip Buyers Pile Into Brazil’s Hard-Hit Equity Market

The piling into local debt and stocks is fueling a rally in the nation’s battered currency despite local investors’ concern with the polarized election race in the second half of the year. The Brazilian real is already 3.7% stronger year-to-date despite the significant losses it faced in the first week of January. Stocks are up 7.8% this year, outperforming most major global gauges. 

That flow is being absorbed by local banks, which have seen its dollar position rise to a record $69.8 billion. 

“It looks like the foreign inflow is still ongoing in the stocks and the long-maturing bonds,” said Valter Filho, a currency trader at Galapagos Capital in Sao Paulo. 

The aggressive buying from foreigners is not exclusive to Brazil. Four out of the five best performing major currencies in the world in 2022 are from South America, with Chilean peso and Peruvian sol leading the way. Both countries also have commodity-linked economies and very hawkish central banks. Chilean officials this week surprised the market with a 150 basis points hike, which pushed short-term swaps higher and further improved the currency’s appeal to carry traders. 

©2022 Bloomberg L.P.