By Bruno Federowski and Dion Rabouin

SAO PAULO/NEW YORK (Reuters) - U.S. President-elect Donald Trump's surprise victory could be a blessing in disguise for Brazil as the country's agenda of fiscal reform and low reliance on trade lure investors away from more vulnerable Mexican markets.

Emerging markets have sold off since the Nov. 8 election on concerns tax cuts and heavy infrastructure spending under a Trump administration could force the Federal Reserve to hike rates faster, potentially draining capital from high-yielding assets in the developing world.

Many also fear a global trade shock if Trump makes good on campaign pledges to review trade accords.

The Brazilian real tumbled 8 percent in the four days following the vote, the second-worst performing currency in Latin America behind the Mexican peso. But the real has since stabilized to around 3.40 to the dollar as the initial shock faded.

Investors say optimism over President Michel Temer's reform agenda has lifted foreign direct investment in Brazil and left it less exposed to market volatility in the wake of Trump's win.

Brazil's relatively closed economy, as well as its status as a net seller of oil, make it an attractive alternative to Mexico, which sells about 80 percent of its exports to the United States. Concerns over Mexico's budget and economy have also greyed the skies of the former market darling.

Many investors have been pivoting from Mexico to Brazil since at least July, according to a Reuters survey of fund managers, a trend that could accelerate throughout the coming months.

Steve Tananbaum, founder of GoldenTree Asset Management, said he is "quite constructive" on Brazil and Argentina, where right-leaning administrations have taken office in the past year with agendas for business-friendly reforms.

"Their currencies are down precipitously yet we think there are a lot of positive changes going on there," he said. "Politically, they both have had changes in leadership that are pro-growth administrations."

BRAZIL VS ARGENTINA

Even after the recent selloff, the Brazilian real and the Argentine peso remain among the world's best performing assets this year, supported by the policies of Brazil's Temer and Argentina's Mauricio Macri.

Both took over from leftist predecessors who sought to stimulate the economy with loose purse strings and interventionist measures.

Their belt-tightening efforts have captivated investors, though Brazil's roughly $2 trillion economy has yet to rebound from its deepest recession in decades.

Years of protectionism have slashed both economies' reliance on foreign trade, sheltering them from potential shocks.

Still, Argentina remains vulnerable to sudden capital outflows, having just returned to international debt markets after years of legal wrangling, investors said.

"If there is broader risk aversion in the markets that prevents Argentina from entering and raising the funds that it needs then Argentina becomes vulnerable," Siobhan Morden, head of Latin American fixed-income strategy at Nomura Securities, said.

BRAZIL HAS "FAT TO BURN"

While bonds and currencies slumped, emerging market stocks have been mixed since the election as prospects of infrastructure spending boosted prices of industrial metals.

Brazil's benchmark Bovespa stock index fell 3.8 percent since the vote, in comparison to a 6.2 percent slide in Mexican equities, while an index tracking shares of basic product producers rose 13.7 percent.

Carlos Sequeira, head of research at Banco BTG Pactual SA, said Brazilian stocks, which are up 45 percent in 2016, could rise even further if Temer manages to gather lawmaker support for measures to curb public spending and limit debt growth.

That would allow the central bank to continue its rate-cutting cycle, he said, making riskier stocks more attractive in relative terms.

The fact that real rates are higher in Brazil than in most of its Latin American peers suggests there would be room for rate cuts even if a weaker real fostered price pressures.

"There is fat to burn even if U.S. rates rise more than expected," Sequeira said.

(Reporting by Bruno Federowski and Dion Rabouin; Editing by Andrew Hay)