In a recent issue of CHEER Winfried Reiss (1993) presented a spreadsheet version of a closed economy two-sector general equilibrium model that has been adapted from the BASIC program contained in Dinwiddy and Teal (1988). He demonstrated that it is possible to illustrate important concepts of microeconomic theory using LOTUS 1-2-3. Here a similar aim is reached by using one of the widely available standard regression packages, SHAZAM, described in detail in White (1993). Today, most econometric programs have programming facilities that allow the user to compute estimators not included, and these facilities can be used to implement general equilibrium models on a PC in a convenient manner. An advantage of using a regression program to do this is that, on the one hand, many universities have bought a campus license that allows staff and students to legally use the program on their own PCs, too, and that, on the other hand, due to their programming facilities these programs are useful tools in many fields, including descriptive statistics, introductory and advanced econometrics, input-output-analysis, etc., so students have to learn a limited number of commands only to perform various tasks.
In this paper we adopt a model from Dinwiddy and Teal (1988) that demonstrates fundamental concepts of open economy microeconomics. It is assumed that the reader is both familiar with neoclassical pure theory of international trade (see, e.g., any standard textbook like Caves, Frankel and Jones (1990)) and with an econometrics program (the SHAZAM commands should be understandable even for people who have never seen them before, and they are easily translated into, e.g., LIMDEP, SST, etc.). The aim here is to demonstrate how easily quite complex models and theorems can be illustrated on a PC, and how simulations of comparative static experiments can be performed to supplement blackboard presentation in class.
We will start with the most simple model, i.e. a small open economy (SMOPEC) that produces two goods (named good 1 and good 2) with two factors of production (capital and labour). Production functions for both goods are Cobb-Douglas, so we have constant returns to scale. Factor endowments are given and factors are immobile internationally. It is assumed that consumers maximise utility and producers maximise profits. All markets are perfectly competitive, and in equilibrium both goods and factor markets are cleared.
In a SMOPEC without protection prices of goods are given by world market prices (multiplied by the exchange rate, which is set to one here). Assuming that there are no credit relations between SMOPEC and the rest of the world, the balance of payment restriction must be fulfilled, i.e. the value of exports must equal the value of imports.
Note that with given world market prices (and a given exchange rate) we have a "fixed price economy" where market clearing must be reached via quantity adjustments.
In SMOPEC there is one household maximising his utility function
with U = utility, Cl (C2) = quantity of good 1 (2) consumed, subject to his budget constraint
with Y = income, r = interest rate, w = wage rate, and Ki (Li) is the amount of capital (labour) used in the production of good i. Note that the household owns all factors of productions, and that there are no profits from the firms due to constant returns to scale. His demand for good 1 (2), depending on income and prices p1 and p2, is given by
The production functions for good 1 (2) are
with Xi = quantity of good i produced. Firms minimize total costs which leads to optimal quantities of labour and capital per unit of output (named li and ki, respectively) depending on factor prices w and r:
In equilibrium, given constant returns to scale, prices just cover costs, i.e. are equal to factor prices times per unit quantities of factor inputs:
From  to  it follows that factor prices can be written as functions of goods prices:
Therefore, in a SMOPEC, where goods prices are given from the word market, factor prices are determined, too.
Consider now the given endowments of capital (K*) and labour (L*). In equilibrium endowments must be equal to the sum of factor inputs used to produce the two goods, and, therefore,
From  and  we get
i.e. the quantities of goods produced that clear both factor markets. If production of a good exceeds local demand by the household, the excess supply is exported, and vice versa for excess demand of a good.
For given values of world market prices and factor endowments, the equilibrium solution is easily computed using SHAZAM. The program is reproduced as PROG1.SHA below. It starts by setting the values of the exogenous variables, computes the goods and factor prices given in SMOPEC, computes the optimal per unit inputs of labour and capital, and the quantities of production that clear both factor markets. Then household income and the demand for both goods that maximise utility are computed, and imports and exports are computed by looking at the differences of production and demand for both goods. Finally, the balance of payments restriction is checked, and results are printed.
* PROG1.SHA A model for a small open economy with two goods, two factors of * production, constant returns to scale, and one household. file screen output file 11 result sample 1 1 * Exogenous variables genr kstar = 0.8 genr lstar = 2.0 genr pw1 = 1.4 genr pw2 = 1.6 * Set exchange rate equal to one genr f = 1 * Compute the given goods and factor prices genr pl = f * pw1 genr p2 = f * pw2 genr r = (p2**3*((1/3)**0.75+3**0.25)**2) / (8*pl**2) genr w = (2*pl**2) / (p2*((1/3)**0.75+3**0.25)**2) * Compute the per unit inputs of labour and capital genr smallk1 = (w/(3*r))**0.75 genr smalll1 = ((3*r)/w)**0.25 genr smallk2 = (w/r)**0.5 genr smalll2 = (r/w)**0.5 * Compute the quantities of products that clear the factor markets genr x1 = (smallk2*lstar - smalll2*kstar) / (smalll1*smallk2-smallk1*smalll2) genr x2 = (smalll1*kstar - smallk1*lstar) / (smalll1*smallk2-smallk1*smalll2) * Compute factor inputs in both sectors genr k1 = smallk1 * x1 genr l1 = smalll1 * x1 genr k2 = smallk2 * x2 genr l2 = smalll2 * x2 * Compute household income genr y = r * (k1 + k2) + w * (l1 + l2) * Compute demand for the two goods genr cl = y / (2*p1) genr c2 = y / (2*p2) * Compute import and export, and balance of payments genr m = c2 - x2 genr e = x1 - c1 genr bp = (pw1*e - pw2*m) * Print the results write(11) p1,p2,r,w /names write(11) x1,c1,e /names write(11) x2,c2,m /names write(11) k1,k2,kstar /names write(11) l1,l2,lstar /names write(11) bp /names stop
Results are given below:
The SHAZAM program can be used to perform comparative static simulations. To illustrate that, consider first an exogenous increase in the endowment of capital from 0.8 to 1.0. From the neo-classical theory of international trade we know that for a SMOPEC like the one considered here a ceteris paribus increase in the endowment of one factor of production means that production of the good that uses this factor intensively will increase while production of the other good will decrease. This relationship is known in the literature as the Rybczynski Theorem (e.g., Caves, Frankel and Jones (1990), p. 129).
This theorem is easily demonstrated by changing the value of K* to 1.0 and running the program. Results are given below:
Output of the capital intensive good 2 expands, and output of the labour intensive good 1 shrinks.
Another experiment can be performed by changing the world market price of good 1, e.g., from 1.4 to 1.45 (leaving the exchange rate unchanged). From our model we get the following results:
Production of good 1 (good 2) increases (decreases), and the wage rate (rate of interest) goes up (down), i.e. the factor of production that is used intensively in the production of the good that goes up in price wins, while the other factor looses. This relationship is known (in a slightly different context where the increase in price of a good is due to a tariff) as the Stolper-Samuelson Theorem (e.g., Caves, Frankel and Jones (1990), p. 137)
This illustrates how two of the fundamental theorems of the neo-classical theory of international trade can be demonstrated "at work" with a simple SHAZAM program.
Because prices for goods and factors are given, solutions for the SMOPEC model can be computed using a hand calculator, too - the advantage of using a PC program lies in the speed with which comparative static experiments can be performed. If we consider the case of a world consisting of two countries trading with each other things are much more complicated, because the prices on the world markets are now endogenous, i.e. a program must find a solution that clears all goods and factor markets in both countries.
A SHAZAM program that simulates such a two country model is reproduced below as PROG2.SHA. In principle, the SMOPEC equations are doubled, and the two countries differ only with respect to factor endowments. In the example used here country A and country B have the same amount of labour, but country B has twice as much capital as country A, so country B is the relative capital-rich economy (having more capital per capita). Note that the production functions and the utility function are identical across countries.
To find a solution for the world market prices, the program performs an iterative process that starts from arbitrarily chosen values for pwl and pw2, computes imports and exports for both goods in both countries, and then checks whether the import of each good by one country is equal to the export of this good by the other country. If this is the case, the prices are equilibrium prices, and the program prints the solution. If not, in case of excess supply (demand) for a good on the world market the price for this good goes down (up), and the process starts again.
As the reader can easily verify by running PROG2.SHA, country B will export good 2 in exchange for good 1, which is imported from country A. Therefore, each country exports the good that uses relatively intensively the factor of production the country is relatively richly endowed with (note that K1/L1 = 0.33 while K2/L2 = 0.99 in both countries). This illustrates the well known Heckscher-Ohlin Theorem of neo-classical international trade theory. Furthermore, in equilibrium factor prices are identical in both countries, which is what the Factor Price Equalization Theorem states.
Comparative static experiments can easily be performed using this model by changing, e.g., factor endowments, or introducing technical progress by modification of one of the production functions.
* PROG2.SHA A model for a two country world file screen output5 file 1 1 result5 sample 1 1 * Exogenous variables for country A and B genr kstara = 0.8 genr kstarb = 1.6 genr lstara = 2.0 genr lstarb = 2.0 * Set exchange rate equal to one genr f = 1 * Set starting values for world market prices genr pw1 = 1.4 genr pw2 = 1.6 * Iterative process do ? = 1,1000 genr period = ? genr p1 = f * pw1 genr p2 = f * pw2 genr r = (p2**3*((1/3)**0.75+3**0.25)**2) / (8*p1**2) genr w = (2*p1**2) / (p2*((1/3)**0.75+3**0.25)**2) * Compute the per unit inputs of labour and capital genr smallk1 = (w/(3*r))**0.75 genr smalll1 = ((3*r)/w)**0.25 genr smallk2 = (w/r)**0.5 genr smalll2 = (r/w)**0.5 * Compute the quantities of products that clear the factor markets genr x1a = (smallk2*lstara-smalll2*kstara) / (smalll1*smallk2-smallk1*smalll2) genr x2a = (smalll1*kstara-smallk1*lstara) / (smalll1*smallk2-smallk1*smalll2) genr x1b = (smallk2*lstarb-smalll2*kstarb) / (smalll1*smallk2-smallk1*smalll2) genr x2b = (smalll1*kstarb-smallk1*lstarb) / (smalll1*smallk2-smallk1*smalll2) * Compute factor inputs in both sectors genr k1a = smallk1 * x1a genr l1a = smalll1 * x1a genr k2a = smallk2 * x2a genr l2a = smalll2 * x2a genr k1b = smallk1 * x1b genr l1b = smalll1 * x1b genr k2b = smallk2 * x2b genr l2b = smalll2 * x2b * Compute household income genr ya = r * (k1a + k2a) + w * (l1a + l2a) genr yb = r * (k1b + k2b) + w * (l1b + l2b) * Compute demand for the two goods genr c1a = ya / (2*p1) genr c2a = ya / (2*p2) genr c1b = yb / (2*p1) genr c2b = yb / (2*p2) * Compute exports and imports, and balance of payments genr ma = c2a - x2a genr ea = x1a - c1a genr bpa = (pw1*ea - pw2*ma) genr mb = c1b - x1b genr eb = x2b - c2b genr bpb = (pw1*mb - pw2*eb) * Test for excess supply or demand on goods markets genr test = 0 genr diff1 = abs(ea - mb) if(diff1.lt.0.01) test = test + 1 genr diff2 = abs(eb - ma) if(diff2.lt.0.01) test = test + 1 endif (test.eq.2) * Change prices if world goods markets are not in equilibrium if(ea.gt.mb) pw1 = pw1 - 0.001 if(ea.lt.mb) pwl = pwl + 0.001 if(ma.gt.eb) pw2 = pw2 + 0.001 if(ma.lt.eb) pw2 = pw2 - 0.001 endo * Print results write(11) p1,p2,r,w /names write(11) x1a,c1a,ea /names write(11) x2a,c2a,ma /names write(11) k1a,k2a,ksterna /names write(11) l1a,l2a,lsterna /names write(11) bpa /names write(11) p1,p2,r,w /names write(11) x1b,c1b,mb /names write(11) x2b,c2b,eb /names write(11) k1b,k2b,ksternb /names write(11) l1b,l2b,lsternb /names write(11) bpb /names stop
This paper demonstrates that standard neo-classical open economy microeconomics easily be done on a PC without knowledge of a programming language, using a program for econometric analysis that requires from the students to learn a small number of commands only. My experience with this approach in classes that had an introductory course in international economics before is quite good: Students usually get a better understanding of the "logic" of the theoretical models; they start to "play around", find out that in some situations the models do not work the way they expect (e.g., for complete specialisation of a country in the production of one of the two goods); and some of them even try (sometimes successfully) to modify the model by, e.g., introducing different technologies in the countries, or by considering more than one household. This said, have another fine example how PCs can supplement blackboard presentation in class.
Caves, R. E., Frankel, J. A., and Jones, R. W. (1990), World Trade and Payments Harper Collins Publishers.
Dinwiddy, C.L. and Teal, F.J. (1988), The Two-Sector General Equilibrium Model - A new Approach. Oxford / New York: Phillip Allen / St. Martin's Press.
Reiss, W. (1993), The Two-Sector General Equilibrium Model in a Spreadsheet. Computers in Higher Education Economics Review, No. 20, November, pp8 - 17.
White, K. (1993), SHAZAM User's Reference Manual Version 7.O. New York etc. McGraw-Hill.