MXN model replication


Dear all,
I am trying to replicate MXN model in Schmitt-Grohe and Uribe’s Open Economy Macroeconomics Chapter 8. I have trouble in finding the steady states. Could anyone have an idea where am I doing mistake.

Thanks a lot

mxn.mod (14.7 KB)


Model with foreign debt determining the exchange rates

You need to check the three equations that do not solve, i.e. have residuals.



Thank you for your response. Yes I have been working on those equations.I have difficulty in import, export and domestic absorption of importable and exportable goods equations. I have check again and again and couldn’t find any mistake. Also I used the calibration methodology of SGU and it did not work either. Any idea would be appreciated…



Let’s do this systematically. You are trying to exactly replicate the SGU model for which they provided Matlab codes? If yes, please provide those codes here so that I can cross-check



Yes Prof. Pfeifer. To be more accurate. I am working on MXN model. ( Schmith-Grohé and Uribe open economy macro book chapter 8 ). There exists three production sectors: importable goods, exportable goods and nontradable goods. Exportable goods and importable goods are combined with a CES production function and constructs composite tradable goods. Finally, final goods are produced with another CES production function using composite tradable goods and nontradable goods.

I tried two calibrations of the model. Above file is my attempt to calibrate the model. I first found domestic absorption of importables and exportables and tradable goods in terms of domestic absorption of non tradable goods. Then found imports and exports accordingly.

And SGU in their book calibrated imports and exports first using data. They calculate what is the share of imports to the GDP according to data. And equated imports to that share x GDP in the model. Then find domestic absorptions.

I tried both ways but I couldn’t be able to find steady states. For 4 equations, residuals of the static equations donot equal to 0. Mod file below is the calibration using SGU method. I also attach the Matlab replication files SGU provided at Uribe’s website.

There are two things I would like to ask regarding their Matlab codes. First they take price of nontrable goods and price of importable goods as given and get these from a get distance matrix command. When I alter these prices the residuals of static equations diminish but never reaches 0.
Secondly, at the end of the steady state m file, there exist a command like this:

eq53 = -ptau + CHITAU *(atau/B)^(-1/MUTN);

eq36 = -syn + pn*yn/y;

dist = norm([eq53 eq36]);

ptau is the price of tradable composite goods and pn is the price of nontradable goods. they defined a norm between these.

Can either of these be the problem I cannot replicate the model in dynare? I checked the equations many times and couldnt find where I am making mistake.

Finally, I tried to work my mod file with steady(nocheck command but irfs do not converge to zero. SGU irfs does not also converge but I think it is problematic?

Many many thanks,

<a class=“attachment” mxnsgu.mod (18.2 KB) (212.5 KB)
href="/uploads/default/original/2X/7/"> (212.5 KB)