An employee installs the rear passenger door on a test frame for a Volkswagen AG Tiguan compact sport utility vehicle inside the company's production plant in Puebla, Mexico.

Revised data released Monday by Mexico's National Institute of Statistics and Geography showed the country's economy contracted by about 0.1% for three straight quarters before flat lining in the third trimester of 2019. Bank of America Merrill Lynch economist Carlos Capistran referred to that economic slump as a "technical recession."

The Mexican and the U.S. economies have historically grown or declined in tandem, but not this year.

Mexico's economic slowdown is unusual because the U.S. economy is still growing. The last Mexican economic recession that was not accompanied by a U.S. slowdown took place in the 1990s during the so-called Tequila Crisis, Capistran points out.

The Tequila Crisis refers to a collapse in the Mexican peso against the dollar sparked by a violent uprising in Southern Mexico and the assassination of a presidential candidate in 1994. Those events increased the risk premium on Mexican assets, including the peso and weighed on the country's economy.

The Mexican recession comes amid uncertainty around the U.S.-Mexico-Canada trade agreement, which has shaken sentiment in Latin America's second-largest economy.

"The balance sheets of business and consumers do not seem to be under strain yet," Capistran said in a note Monday. "So, in our view, the technical recession was likely triggered by a large confidence shock."

Congress has yet to ratify the USMCA deal that was signed by President Donald Trump last year. That deal is meant to replace the North American Free Trade Agreement, which President Donald Trump has called the worst deal ever.

Trump has tried to pressure Congress to approve the USMCA. On Monday, he tweeted Democrats should "get down to work and finally approve USMCA, and much more!"

Tweet

House Speaker Nancy Pelosi said Monday that the USMCA deal signed by Trump last year "left American workers exposed to losing their jobs to Mexico, included unacceptable provisions to lock in high prescription drug prices, and fell short of key environmental standards." She noted, however, that House Democrats were "within range" of reaching a deal on the matter.

Trade with the U.S. is critical for the Mexican economy. Last year, Mexico exported $265 billion in goods to the U.S. and imported $346.5 billion, according to data from the U.S. Trade Representative's office.

President Andres Manuel Lopez Obrador's administration has also curbed government spending to build the country's budget surplus. Meanwhile, the Bank of Mexico has the country's overnight interest rate at 7.5%, well above the rates seen in the U.S.

These issues weighed on Mexican stocks this year. The Mexico S&P/BMV IPC index is up just 3.3% in 2019. That's well below the iShares MSCI ACWI exchange-traded fund, which tracks global stocks, which is up more than 20% year to date.

To be sure, central bank rates are expected to fall from current levels. Also, the AMLO administration unveiled Tuesday a $44 billion infrastructure plan it expects will bring annual economic growth of more than 4%.

But Bank of America's Capistran still thinks the risks to the Mexican economy remain tilted to the downside.

"The risk, in our view, is that the administration or Banxico try to pursue counter-cyclical policies in an isolated manner, which could end in fiscal deterioration, un-anchoring of inflation expectations and a large depreciation," he said. "Another risk is that the administration moves further toward populist measures, seeking to reactivate growth and to redistribute to the poor but without consideration of inter-temporal budget and external constraints."

Subscribe to CNBC on YouTube.