Maple Trade Model #1

Instructions:

1)  Figure out how to get access to Maple.  It is a mathematical program that can solve complex systems of equations, among other things, and the university has a site license.  Here are some options:

  • Maple 10 is available in the library’s Dataworks lab, as well as online through the Dataworks site.

    https://apollo.library.unr.edu/Citrix/MetaFrame/auth/login.aspx

    You must sign in with your NetID.  On the right it will say:

    Access to programs on the Citrix servers requires a small web plugin be installed on you computer.
    Computers in UNR IT supported labs already have the Citrix web plugin installed.
    Get the latest ICA Web plugin for Windows 2000, XP and Vista here https://apollo.library.unr.edu/ica32t.exe
    Get the latest ICA client for Mac OSX here https://apollo.library.unr.edu/MacICA_OSX.dmg.zip.
    Computers in UNR IT supported labs already have the Citrix web plugin installed.
    Mac users must use FireFox as a browser to ensure correct functionality

     Download the plugin, log off at the bottom of the page, restart the computer, log back in, and click on the Maple 10 icon.

  • You can use it on campus computers where it is already installed:  (a) in the DATAWORKS Lab, located in the Getchell Library, Lower Level room 8A; (b) in the Math Lab on the 6th floor of the Ansari Business Building; or (c) in the COBA labs.

  • You can buy it at a substantial discount in the university bookstore.
2)  Using Maple, solve for the following three equilibria by cutting and pasting each of the following sets of code to the command line (after the ">").  The equations and definitions are explained below.  Rather than just turn in a huge printout of everything you do, create a table in Excel with rows for the following calculated variables for Country 1:  the volume of exports = Q11-C11, the volume of imports = C12-Q12, the balance of trade = P11*(Q11-C11)-P12*(C12-Q12), the terms of trade = P11/P12, average price level P1 = (P11+P12)/2, real output = (P11*Q11+P12*Q12)/P1, real income =   (P11*C11+P12*C12)/P1, and the exchange rate E.  

In your first two columns, compare the free trade equilibrium and the autarky for Country 1.  Explain briefly what happens.

Autarky for Country 1:

restart; A11:=100; A12:=100; K11:=150; K12:=50; L1:=200; D1:=1; MV1:=100000;
autarky1:={
 Q11=A11*sqrt(K11*L11), 
 Q12=A12*sqrt(K12*L12),
 L1=L11+L12,
 P11/P12=Q11*Q12/((A11^2)*K11*L12),
 C11/C12=D1/(P11/P12),
 MV1=P11*C11+P12*C12,
 C11=Q11,
 C12=Q12 };
autarky1result:=solve(autarky1, {L11, L12, Q11, Q12, P11, P12, C11, C12});
evalf(autarky1result);

Autarky for Country 2:

restart; A21:=100; A22:=100; K21:=50; K22:=150; L2:=200; D2:=1; MV2:=200000;
autarky2:={
 Q21=A21*sqrt(K21*L21), 
 Q22=A22*sqrt(K22*L22),
 L2=L21+L22,
 P21/P22=Q21*Q22/((A21^2)*K21*L22),
 C21/C22=D2/(P21/P22),
 MV2=P21*C21+P22*C22,
 C21=Q21,
 C22=Q22 };
autarky2result:=solve(autarky2, {L21, L22, Q21, Q22, C21, C22, P21, P22});
evalf(autarky2result);

Free Trade Equilibrium:

restart; F:=0;
A11:=100; A12:=100; K11:=150; K12:=50; L1:=200; D1:=1; MV1:=100000;
A21:=100; A22:=100; K21:=50; K22:=150; L2:=200; D2:=1; MV2:=200000;
freetrade:={
 Q11=A11*sqrt(K11*L11), 
 Q12=A12*sqrt(K12*L12),
 L1=L11+L12,
 P11/P12=Q11*Q12/((A11^2)*K11*L12),
 C11/C12=D1/(P11/P12),
 MV1=P11*C11+P12*C12,
 Q21=A21*sqrt(K21*L21), 
 Q22=A22*sqrt(K22*L22),
 L2=L21+L22,
 P21/P22=Q21*Q22/((A21^2)*K21*L22),
 C21/C22=D2/(P21/P22),
 MV2=P21*C21+P22*C22,
 C11+C21=Q11+Q21,
 C12+C22=Q12+Q22,
 P11*(Q11-C11)+P12*(Q12-C12)+F=0, 
 E*P21=P11,
 E*P22=P12 };
freetraderesult:=solve(freetrade, 
{L11, L12, Q11, Q12, C11, C12, P11, P12, 
 L21, L22, Q21, Q22, C21, C22, P21, P22, E });
evalf(freetraderesult);

Add columns to your spreadsheet for 3(a), 3(b), 4(a), 4(b), 4(c), 4(d), 4(e), and 4(f) below.  Briefly summarize the effects for each.  

3)  For the free trade equilibrium only, consider how a transfer (inward or outward) in the balance of payments would affect the foreign exchange rate, as well as the patterns, volume, and terms of trade, and both production and consumption combinations in each country.  In each case, what happens to the balance of trade, i.e. exports minus imports? 

a) F  := 15000
b) F  :=-15000
4)  Now, double the following parameters, on at a time, to see how the free trade equilibrium is affected.  Explain what happens to the equilibrium exchange rate, as well as the patterns, volume, and terms of trade, and both production and consumption combinations in each country.  Are there any surprises in your results?
a) Country 1 becomes more productive in both goods, so A11:=200 and A12:=200
b) Both countries become more productive in their export goods, so A11:=200 and A22:=200
c) Country 1 doubles its capital stock in both goods, so K11:=300 and K12:=100
d) Country 1 doubles its labor force, so L1 :=400
e) Country 1 prefers to spend more of its income on its export good, so D1 :=2
f) Country 1 doubles its money supply, so MV1:=200000
For the next several questions, the Cobb-Douglas constant-share demand functions used in the above model assume that price elasticity always equals -1, and income elasticities always equal +1.  What if we assumed that these elasticities varied?  Consider a model in which output is fixed for simplicity's sake:

Free Trade Equilibrium (fixed output, variable elasticities):

restart; F:=0;
a11:=0; b11:=0; b12:=0; g11:=0.5; MV1:=100000; Q11:=15000; Q12:=5000;
a21:=0; b21:=0; b22:=0; g21:=0.5; MV2:=200000; Q21:=5000; Q22:=15000;
freetrade:={
 MV1=(P11*C11+P12*C12),
 P11*C11=a11+b11*P11+b12*P12+g11*MV1,
 IE11=g11*MV1/(P11*C11),
 IE12=(1-g11)*MV1/(P12*C12),
 PE11=b11/C11-1,
 PE12=(1-b12)/C12-1,
 MV2=(P21*C21+P22*C22),
 P21*C21=a21+b21*P21+b22*P22+g21*MV2,
 IE21=g21*MV2/(P21*C21),
 IE22=(1-g21)*MV2/(P22*C22),
 PE21=b21/C21-1,
 PE22=(1-b22)/C22-1,
 C11+C21=Q11+Q21,
 C12+C22=Q12+Q22,
 P11*(Q11-C11)+P12*(Q12-C12)+F=0, 
 E*P21=P11,
 E*P22=P12
 };
freetraderesult:=solve(freetrade,
{C11,C12,P11,P12,IE11,IE12,PE11,PE12,
 C21,C22,P21,P22,IE21,IE22,PE21,PE22,E});
evalf(freetraderesult); 

5)  Solve this new free trade equilibrium, and briefly comment on how it compares to that in (2).  Then consider the effect of a transfer:

F  := 15000
Explain whether or not your results are qualitatively different from your answer in 3(a), especially as it regards the terms of trade for Country 1.

6) Now, start with each of the following different elasticity assumptions, and explain how the effects of the transfer in (6) are significantly different:

a) Country 1 has higher income elasticity for Good 1, so a11:=-10000 and g11:=0.6
b) Country 1 has lower income elasticity for Good 1, so a11:=10000 and g11:=0.4
c) Country 1 has higher price elasticity for Good 1, so a11:=25000 and b11:=-5000
d) Country 1 has lower price elasticity for Good 1, so a11:=-25000 and b11:=5000
Don't forget to discuss the calculated elasticities, e.g., PE11, PE12, IE11, IE12.  

Obviously, there are many other variations and combinations of these possibilities we could explore, but this is enough for now.


Definitions:
Exogenous Variables (Parameters):
 
Aij
- Multifactor productivity of country i for good j.
Kij
- Specific fixed input (e.g., capital) of country i for production of good j.
Li
- Total labor supply of country i.
Di - Relative demand parameter for country i, equal to the income share for good 1 divided by the income share for good 2.
MVi
- Money stock times velocity for country i.
F
- Transfers (inward foreign savings flows).
IEij - Income elasticity for country i, good j. 
PEij - Price elasticity for country i, good j. 
Endogenous Variables:
 
Qij
- Production output by country i of good j.
Cij
- Consumption by country i of good j.
Lij
- Labor allocated in country i to produce good j.
Pij
- Nominal price in country i of good j.
E
- Direct exchange rate, i.e. the price of country 2's currency, denominated in country 1's currency.
Equations:
 
Qij = Aij (Kij Lij)^0.5 Cobb Douglas production function with equal technological shares (for both countries, both goods).
Li = Li1 + Li2 Labor allocation (for each country).
Pi1/Pi2=Qi1*Qi2/((Ai1^2)*Ki1*Li2)
Relative price equal to marginal rate of transformation, i.e. the negative slope of the PPF (for each country).
Ci1/Ci2=Di/(Pi1/Pi2) Relative demand equation, as an inverse function of the relative price (both countries).  Note that this comes from a Cobb-Douglas utility function of the form Ui = Ci1^(Di/(Di+1))*Ci2^(1/(Di+1)), which has the odd characteristic of having price elasticities always equal to -1 and income elasticities always equal to +1.
MVi=Pi1*Ci1+Pi2*Ci2 Money quantity equation (for both countries).
P11*(Q11-C11)+P12*(Q12-C12)+F=0 Balance of payments for country 1 (this also identifies balance of payments for country 2).
P1j = E*P2j Purchasing power parity (for both goods).
Pij*Cij=aij+bij*Pij+bik*Pik+gij*MVi Variable elasticity demand function for Country i and goods j, k, using Stone's linear expenditure system.