
==========================================================================
             NOTE: This document should print nicely from any 
                Wordprocessor with the font COURIER 10 pt
                      or from the DOS-editor EDIT
==========================================================================


                            HANDS-ON DOCUMENT 
                 Import quotas in a 3x3 Version of GTAP
                     by C.F. Bach and K.R. Pearson



This hands-on document describes simulations with a version of the 
standard GTAP model which has had bilateral import quotas added. 
The simulations are carried out using GEMPACK. Prior knowledge of
the GEMPACK software is necessary to follow the instructions.

The document builds upon the GTAP Technical Paper No. 4 by C.F. Bach 
and K.R. Pearson (1996): Implementing Quotas in GTAP using GEMPACK - 
or How to Linearize and Inequality. 
This document is referred to here as Tech.Paper No. 4 (or simply
as "the paper").
The examples set out here are those introduced in section 7 of this
Technical Paper.

As the described in section 5 of the Tech.Paper no. 4 the import quota
specification can be used in those cases where we wish to reduce the 
ordinary tariffs but maintain base line import quotas. Here we tell you
how to do three different simulations referred to as Examples B1,B2 and B3.
First we reduce a tariff with a binding and non-changing quota in B1. 
Next we reduce a tariff simultaneously as we increase the quota in B2. 
And finally we redo this simulation as Example B3 with the accurate 
method described for export quotas in section 6.6 of the paper. 
In all simulations we limit the quota constraints to the commodity 
FOOD. This is done by endogenizing the variable iq_slack for the 
other commodities (MNFCS and SVCES) and exogenizing tqis for these 
commodities. 

The files for the simulations can be found in the file QUOTA-EX.ZIP.
You should first change directory into the directory on your PC 
(possibly C:\QUOTAS) into which you put QUOTA-EX.ZIP.
You have probably already extracted the files from QUOTA-EX.ZIP when
you carried out the export quota examples (see section 4 of the 
paper). If not, extract them via the command:

---> pkunzip quota-ex.zip

The most important files are:
GTAP33IQ.TAB  - TABLO Input file with the model code. It is the standard
                TABLO input file GTAP94.TAB with the maximum set size 
                reduced so that at most 3 tradeable commodities and 3 
                regions are allowed AND a quota section added at the end.
DAT201IQ.HAR  - This is the standard 3x3 GTAP data file DAT2-01.HAR but with 
                an additional header VIQS added. This header contains the VIQS
                data (see section 6.4 of the paper) which has been 
                set equal to the usual VIMS data. By setting VIQS=VIMS we are
                assuming that all of the import quotas are just binding in the 
                initial data. This file can be created with use of the file
                IQ-DATA.TAB mentioned below.
IQ2-01.DAT    - This file contains the other supplementary data namely 
                the QIS_RATIO_L(i,r,s) values. The file is the actual file
                corresponding to the logical file called GTAPQUOTA in 
                GTAP33IQ.TAB.  Since all quotas are assumed just binding, 
                all QIS_RATIO_L values on this file are equal to 1.
                This file can be created with use of the file IQ-DATA.TAB 
                mentioned below.
IQ-DATA.TAB   - Takes the standard data aggregation file DAT2-01.HAR and 
                computes the two files DAT201IQ.HAR and IQ2-01.DAT 
                mentioned above.
IQCHK.TAB     - This file checks that the ratios QIS_RATIO_L and TQIS_L
                are not larger than 1.0, and that, for each (i,r,s), at
                least one of these equals 1.0. 
                It reads the post-simulation values of QIS_RATIO_L, VIQS 
                and VIMS and computes the post-simulation TQIS_L values and 
                MAX_RATIOS(i,r,s) = MAX[QIS_RATIO_L(i,r,s),TQIS_L(i,r,s)] 
                for all (i,r,s).
IQ-BIND.TAB   - This file produces shocks for the variables tqis and
                qis_quota in export quota simulations. The shocks are
                written to the two logical files 
                QIS_RAT_SH (this contains qis_quota shocks) and 
                TQIS_SH (this contains tqis shocks).
                This file is not used in the current examples. The use of 
                the file is equivalent to that of the file XQ-BIND.TAB in 
                the Hands-on document for export quotas (XQ.TXT).

These files, together with one Stored-input file and a number of
Command files, are used in the examples described in the rest of this
document.

Getting started:
   The first step is to implement the import quotas model in GTAP33IQ.TAB.
   [This first step is done differently if you are using the
     Demonstration Version of GEMPACK - see below.]
---> Run TABLO with the Stored-input file TP33XQ.STI
   The STI file is designed for those having a source-code version
   of GEMPACK. The output will be the TABLO-generated program 
   TP33IQ.FOR (and associated Auxiliary files TP33IQ.AXS and .AXT)
   If you have only an executable-image version of GEMPACK, you will 
   first need to edit TP33IQ.STI so that it produces GEMSIM Auxiliary 
   files. You do this by changing the response "wfp" near the end
   of the file to "pgs". In this case TABLO will produce the GEMSIM 
   Auxiliary files TP33IQ.GSS and .GST.
   If you produced the TABLO-generated program, now compile and link
   it via the command
---> LTG TP33IQ

   If you are using the Demonstration Version of GEMPACK, you
   cannot run TABLO to process the model in GTAP33IQ.TAB since it has
   too many variables for the Demonstration Version's TABLO. Instead
   we have prepared an executable image of the TABLO-generated 
   program TP33IQ.EXE and its associated Auxiliary files
   TP33IQ.AXS and TP33IQ.AXT. These are in the file IQ-TG.ZIP.
   You can extract these from IQ-TG.ZIP via the command
---> PKUNZIP IQ-TG

   Before running the simulations it is also a good idea to implement 
   the other TABLO Input files associated with this, IQ-DATA.TAB, 
   IQCHK.TAB and IQ-BIND.TAB. To implement this do:
---> Run TABLO and respond IQ-DATA when asked for TABLO input file.
   Once again you must chose wfp for TABLO-generated program (if you 
   have a source-code version) or to pgs (exe-image or Demo version)
   to generate GEMSIM Auxiliary files. [Readers with the 
   Demonstration Version of GEMPACK should follow the GEMSIM route.]
   If you chose a TABLO-generated program: 
---> LTG IQ-DATA
   Similarly for IQCHK.TAB:
---> Run TABLO and respond IQCHK when asked for TABLO input file.
---> LTG IQCHK

   Now you are ready to run simulations. In the text below give 
   alternative instructions for the different versions of GEMPACK, 
   namely source-code, executable image (exe-image) and 
   Demonstration version.

   We also assume that you use the DOS text editor EDIT to view the 
   contents of text files (but you can use another editor if you 
   prefer). If you use EDIT, when we write
---> Edit XQ-P1.CMF
   you should type in the command "edit xq-p1.cmf". If you use 
   another editor you will know the command to type.

--------------------------------------------------------------------------
1.  Preparing the data for import quota simulations
--------------------------------------------------------------------------
   As indicated above, when starting with a standard GTAP database we 
   first need to,
   1) add the header VIQS.
   2) create a file with the values of  QIS_RATIO_L.
   These two steps are conveniently done with the TABLO file IQ-DATA.TAB 
   which you implemented above.
 ---> Run IQ-DATA (source-code case) with the following input:
 ---> Run GEMSIM (exe-image and Demo cases) with the following input:
      AUXILIARY FILES   iq-data    (not required in source-code case)
      DISPLAY FILE      iq-data.dis
      GTAPDATA          dat2-01.har
      NEWDATA           dat201iq.har
      IMPQUOTA          iq2-01.dat
      GTAPSETS          set2-01.har
   [Or use the Command file IQ-DATA.CMF for this.]
   This should produce the two data files DAT201IQ.HAR and IQ2-01.DAT.
   Now you are ready to run simulations.

--------------------------------------------------------------------------
2.  Example B1. Shocking Import Tariffs with Import Quotas
--------------------------------------------------------------------------

   In this example we simply reduce a tariff with quotas in place.

Example B1.
==========================================================================
   We reduce the power of the tariff TMS_L on FOOD imported into the EU 
   from both USA and ROW by 10 percent, while maintaining the quota. 
   Start with a look at the command file:
---> Edit IQ-B1.CMF
   It is a standard closure except for the quota part and the only shock
   is the tariff reduction (plus the usual shock of one to del_Newton
   as indicated in section 6.6 of the paper). Now run the simulation:
---> Run TP33IQ with the command file IQ-B1.CMF (source-code and Demo case)
---> Run GEMSIM with the command file IQ-B1.CMF (exe-image case)
   In the absence of import quotas, you would expect this reduction in 
   import tariffs to lower the domestic EU price of imported food and so
   increase the volume of imported food used in the EU. But, with the 
   import quotas already binding, the volume of imports of food cannot 
   increase. Hence these volumes (and so all other volumes in the model) 
   should remain unchanged.
   You can confirm this by looking at the results of this simulation.  
---> Run GEMPIE on IQ-B1.SL4, and search for "pis (" in the PI5 file
   No change occurs in any volumes and the only price change is a 10 
   percent decrease in PIS_L (price of imports including tariffs but 
   not including tariff equivalent of quotas) for food imported into 
   the EU from USA and ROW.  This means that, in the post-simulation 
   economy, the market price PMS_L is higher than PIS_L and so there 
   is a nonzero associated quota rent, which you can see from the result
   of variable c_qis_rent_rat which is 0.1099 for these two regions. Of 
   course the associated price ratios TQIS_L also fall by 10 percent. 
   In summary, as import volumes are fixed by the quota, this tariff 
   reduction just leads to an equivalent increase in the price ratio 
   TQIS_L. These two will be of exactly the same sign and size (a -10 
   percent shock to tms will lead to a -10 percent change in tqis). 
   This is easily seen in a numerical example. Take the prices before 
   to be PCIF_L=1, PIS_L=1.2, and PMS_L=1.2. A 10 percent reduction in 
   TMS_L will reduce PIS_L to 1.08, but as quantities are fixed this will 
   just lead to a decrease in TQIS_L from 1 to 0.9 (i.e., 1.08/1.20), and 
   PMS_L will be maintained at 1.2. As import quantities are fixed by the 
   quota there will be no terms of trade effect, so world market prices 
   will also be constant.

--------------------------------------------------------------------------
3. Examples B2 and B3 - Reducing Import Tariffs, While Increasing Quotas
--------------------------------------------------------------------------

In these examples, we reduce the tariff on food imported into the EU from USA and ROW as in the example above and simultaneously increase the associated quotas by 15 percent.  Now the lower tariffs will lead to increased imports and it is not clear whethe

Example B2. The approximate version
==========================================================================
   First the closure is worth looking at closely: 
---> Edit IQ-B2.CMF
   In this example, we only wish to have quotas on food working and do not
   wish to have quotas operational on the other commodities manufactures 
   and services. If we wanted quotas on all commodities we would set the
   variable iq_slack exogenous for all commodities, which would ensure 
   that equation Imp_Quo_Ratios holds for all (i,r,s). But, we do not want
   to have this equation holding for manufactures and services; we achieve 
   this by setting tqis exogenous for these commodities (which, since we 
   don't shock it, means that, in the levels, PIS_L and PMS_L are fixed 
   equal for these commodities). Thus the desired closure has
      iq_slack("food",REG,REG)
      tqis("mnfcs",REG,REG)
      tqis("svces",REG,REG)
   in the list of exogenous variables.
   Notice also that this simulation is done with Euler's method and 20 steps
   without extrapolation (see section 6.6 of the paper).
   The purpose of the simulation is only to determine which quotas change 
   their binding/non-binding status.
   Now let us run the simulation:
---> Run TP33IQ with the command file IQ-B2.CMF (source-code and Demo cases)
---> Run GEMSIM with the command file IQ-B2.CMF (exe-image case)
   To check which quotas change status we must look in the updated GTAPQUOTA
   data:
---> Edit IQ-B2.UPD
   The quotas on food imported into the EU from USA and ROW 
   remain binding but two other import quotas, namely those on food 
   imported from ROW into USA and from EU into itself, become non-binding.
   [Imports from EU into itself are not really important - for technical 
   reasons only, the data base has a very small flow in it.]

Example B3. The accurate version. 
==========================================================================
   Now we are in a position to do Example B3 which is the accurate version 
   of Example B2. First look at the corresponding Command file:
---> Edit IQ-B3.CMF
   Firstly we have changed the closure to reflect the fact that the two 
   quotas above become non-binding so that the associated price ratios 
   TQIS_L are fixed exogenously to one. This means setting the associa-
   ted iq_slack components endogenous (to turn off equation Imp_Quo_Ratios
   in these cases) and to set the associated tqis components exogenous. 
   This is achieved by the statements
      Modify closure from environment file tp33iqfd ;
      Swap tqis("food","ROW","USA") = iq_slack("food","ROW","USA") ;
      Swap tqis("food","EU","EU") = iq_slack("food","EU","EU") ;
   in IQ-B3.CMF. [Note that Environment file TP33IQFD is the one set up 
   and saved in IQ-B2.CMF.]
   Normally (see examples A2, A4 and A6 in the file XQ.TXT and 
   section 6.6 in the paper), we would need to add extra shocks to 
   ensure that the newly exogenous components of tqis are shocked 
   to have post-simulation value 1.0. However, in this rather unusual 
   case, these already have pre-simulation values of 1.0 
   (since the original import quotas were "just" binding). Thus, in this 
   case, no such shocks need be added. The case is equivalent to analysing
   the impact of new quotas equal to current import volumes, which can often
   be one of the policy choices facing governments.
   You can see that this simulation converges well by looking at the
   Extrapolation Accuracy Summary. 
---> Edit IQ-B3.XAC
   You can also see that the resulting post-simulation values of QIS_RATIO_L 
   and TQIS_L are as required (see section 6.6 of the paper).
---> Run IQCHK with the command file IQCHK-B3.CMF (source-code case)
---> Run IQCHK with the command file IQCHK-B3.CMF (other cases)
---> Edit IQCHK-B3.LOG
   We need to ensure that all relevant values of QIS_RATIO_L, TQIS_L 
   are no larger than 1.0 and that the relevant values of MAX_RATIOS 
   are equal to 1.0.
   This checking needs to be done with a little care since not all post-
   simulation QIS_RATIO_L values or TQIS_L values are less than one. [For 
   example, QIS_RATIO_L("mnfcs","EU","ROW") is greater than one.] But 
   recall that in this case the closure has been set up (see IQ-B2.CMF 
   above) to only have quotas on food imports and not on imports of other
   commodities. Thus, you just need to check that the values of 
   QIS_RATIO_L, TQIS_L and MAX_RATIOS are as expected for food (not for 
   mnfcs or svces).
   Remember also to check in the file IQ-B3.UPD if the same quotas have 
   changed status as in Example B2.
   You can also check various features of the results:
---> Run GEMPIE on IQ-B3.SL4
   (i) For example, the quota on imports of food from USA and ROW into EU 
   was increased by 15 percent but is apparently still binding. What does 
   this imply about the volume of these imports? [You can check that, 
   indeed, these imports also increase by 15 percent by looking at the 
   appropriate qxs results from the simulation.]
   (ii) There may now be nonzero quota rent associated with those import 
   quotas which are still binding. Check the c_qis_rent_rat  results to see 
   if this is so. Are there now quota rents associated with the quotas on 
   imports of food from USA and ROW into EU?
   (iii) Look the results for the import quota equivalent variable tqis and
   try to convert it into direct import quota equivalent with the formula:
   Import quota equivalent = 100* (1/(1 - TQIS_L/100) - 1)
