Donald Trump's presidency hasn't been a bad deal for Mexican business magnate Carlos Slim.

The Mexican billionaire saw his fortune grow during the first quarter of 2017, according to an analysis by Mexico's El Economista. This marks the second consecutive quarter during which Slim's companies, overall, have posted gains -- in other words, Trump isn't doing him much harm.

Four of six companies controlled by Slim added to his net worth during the first three months of the year. Telecommunications giant America Movil (AMX) - Get Report was the biggest contributor, followed by Grupo Carso, IDEAL and TELESITES. Two of his companies -- Grupo Financiero Inbursa and Minera Frisco -- declined in value.

El Economista calculates that Slim's wealth grew by about $2.1 million at the current exchange rate (40.7 million pesos) during the first quarter of 2017 and by $8.5 million (163.1 million pesos) during the fourth quarter of 2016.

At least part of the appreciation in Slim's net worth can be attributed to the rebound of the peso, which took a big hit after Trump's election and has gained in value since. The peso tumbled 10% against the dollar from Election Day through the end of 2016 and an additional 5% during the first two weeks of 2017. It's come back since, climbing about 8% year-to-date.

"The peso gains without a doubt explain a good deal of [Slim's net worth] increase," Eduardo Garcia, founder and editor-in-chief of Mexican online finance publication Sentido Comun, said in a recent interview with Forbes, which ranks Slim as the world's sixth-richest man.

The publication estimates his net worth to be $54.5 billion, behind Microsoft (MSFT) - Get Report founder Bill Gates, Berkshire Hathaway's (BRK.A) - Get Report Warren Buffett, Amazon's (AMZN) - Get Report Jeff Bezos, Spanish fashion tycoon Amancio Ortega and Facebook's (FB) - Get Report Mark Zuckerberg.

Slim, 77, has had mixed interactions with Trump in recent months.

Ahead of the election, Slim warned against Trump's policies, arguing that they would "destroy" the American economy. He specifically targeted the then-Republican presidential candidate's threats to impose a 35% tariff on imports from Mexico and renegotiate NAFTA.

After the election, the pair made nice, with Slim traveling to Mar-a-Lago to meet with Trump in December. Trump in a tweet called Slim a "great guy."

Slim in January said Trump is "not a terminator, he's a negotiator." And thus far, a negotiator who is working in his favor.