Numerical Simulation Of Trade

Floxtrade is a numerical simulation for trade. Ricardian comparative advantage, Heckscher-Ohlin factor advantage and advantages arising from increasing returns to scale are modelled within a simple and intuitive framework. In the interests of promoting a better understanding of the theory of international trade, the program is offered as a free download. It is designed for students of economics but is accessible to anyone with the determination to learn the basic theory. 

Update Note

The current build has a major update. Models that include Increasing/decreasing returns to scale sectors are now handled to pass all exhaustion tests. That means everything now adds up in an accounting sense. This is long overdue and allows a much improved analysis of trade models that feature these more difficult cases.  Also, variable consumer preferences are now fully supported as part of the script engine.  This means Floxtrade is now a very sophisticated trade modeller, capable of assessing mixed models that include gains from the three main drivers - gains from variations in productive efficiences (Ricardo), from factor endowments (Heckscher-Ohlin) and from increasing returns to scale (Krugman).

Introduction

The software shown below is a simulation of trade between two hypothetical economies Ang and Uno with up to 6 distinct goods. Production is generated by Cobb Douglas production functions (later models will provide for CES and user definable PFs). Wages, rents and prices are determined using standard marginal price theory. As might be expected, the simulation provides support for the usual trade models:

1. Ricardian comparative advantage: Gains through differences in productive efficiencies.

2. Heckscher-Ohlin comparative advantage: Gains from differences in factor endowment ratios.

3. Returns to scale: Gains arising from increasing/decreasing returns to scale production.

4. Factor mobility: Gains from the international movement of factors.

5. Monopolistic competition: Gains arising from product differentiation.

6. Mixed models: Any or all of the above may be included to construct mixed models for more realistic trade scenarios. 

How It Works

The model allows up to six industrial sectors and looks at trade between two countries. Both countries have a fixed stock of capital and labour and each industry is provided with an optimal allocation of capital for the labour employed. It is assumed that each country uses all available resources. Setting up a trade model simply involves deciding the number of sectors, providing the initial endowments of capital and labour and finally entering the parameters for each Cobb Douglas production function. The simulation is then able to generate the thousands of output vectors that form the production possibility frontier for each country. An output vector for both countries is chosen by the user as an entry (autarky) point which when added give the pre-trade global output . A search can then be made for pairs of output vectors which when added exceed the pre-trade global output. These are optimized then listed as trade results. Each trade result represents a preferred pair of output vectors in the sense that if the two countries produce at the new output vectors they can simply trade back to their previous consumption levels to enjoy the additional benefit of sharing the extra consumption available through the increase in global output as a result of trade. All this without any additional productive efficiency or factor endowments.

We work an example to illustrate the basic concepts: 

The idea is to simulate trade between two countries, in our case Ang and Uno. The first step is to decide the number of sectors. There are a minimum of two and a maximum of six sectors. This number is set simply by:

Step 1.

On the Setup Row click the green [Sectors] button to set the desired number of sectors (Minimum 2, Maximum 6). 

In this example there are three sectors each producing a range of similar goods, so we click the [Sectors] button until it shows [Sectors 3].

Step 2.

Set the endowments of capital and labour for each country. Just click [Capital 1] and [Labour 1] to give 180 units of capital and 120 units of labour to Ang. Similarly, click [Capital 2] and [Labour 2] to give Uno 140 units of capital and 140 units of labour. (Note that left click increases a value, right click decreases it).

Next thing is to decide the Cobb Douglas parameters. These are the technology multiplier (multiplier), capital intensity (alpha) and labour intensity (beta). They have default values of 1.0, 0.5 and 0.5 respectively. These are set as follows: 

Step 3.

Click the Tech, Alpha or Beta buttons to change values for both countries. Clicking the Alpha button also changes the beta value so they add to 1.0, signifying constant returns to scale (the usual case). In this instance, we need only click the [Alpha 1] button to give values of 0.5 for good A, 0.4 for B and 0.6 for C in Ang. (To change sectors, click the [Sector A] button). When done, click [Copy] to transfer these parameters to Uno as they are the same in this example.

There is now sufficient data to calculate the production possibility frontier for both countries. Do this by:

Step 4.

Click [Calc PPF].

The grids beneath the orange output row fills with output vectors. Each vector represents a possible production quota for each good, assuming both countries use all resources of capital and labour at their disposal. Each vector is optimal in the sense that a country cannot have more of one good without having less of another.

We assume each country produces at one of these output vectors.

Step 5.

Simply click on [Auto Index] to let the program choose. These will be the initial (autarky) values for production before trade. The values chosen reflect default consumer preferences. These assume consumers in both countries have identical, indifferent preferences. There is an option to vary the default consumer preference if we wish.

Now we know the production for each country we can determine prices, wages and rents.

Step 6.

Click [Price Check] to determine prices of goods and factors. A this point we have a complete evaluation of the autarky state for each economy. Our program should look like the image shown below. Note the output vectors reflect indifferent consumer preferences implying consumers spend equally in each sector.

Step 7.

Click [Baseline] to add the two vectors to get the combined global output of the goods.

Step 8.

Click [Trade], this evaluates and lists all the post-trade positions that improve on the autarky state.

Step 9

Finally, click on [Result] to show the post-trade scenario where both economies have restructured to take advantage of the gains from trade.

That is the basis for trade. By allowing trade, countries can produce at different and mutually beneficial combinations of outputs that allow them to have more of all goods without having less of any good compared to the pre-trade position. This allows the possibility of a "Pareto improvement"  - a situation where some can be made better off and nobody worse off than before the change. To achieve this it may be necessary for winners to compensate losers but there is no reason this cannot be done.  


Please Note: The software is in early beta release. It has been developed purely in the interests of advancing the science of economics. It contains NO advertising, scamware, unwanted programs, cookies or other junk often associated with freeware. The author asks only that copyright be respected. The file unzips to a single, small exe file that will run from any location including a usb drive. This program is being continuously updated and users are advised to revisit this page to check for upgrades.