# Calib.gms (Outdated)

Calib.gms imports data, namely GTAP social accounting matrix (SAM), MAcMap protection data, protection in services, agricultural and rural population from FAO, economically active and total population (current and projections) from ILO, and GDP. The variable are defined at the base year with the corresponding data and all the parameter are calibrated or defined. For standard simulations (those that did not require any modelling changes), this file must not be changed. The parts that should be changed are all called by Calib.gms. There are: Sets.gms, Data.gms, protection.gms and protection_serv.gms.

We describe here some parts of the file that seem to may some explanations.

All GTAP values are scaled by a fixed factor to bring all variable close to 1, which helps the solver to find the solution. Usually the scale parameter is 1E-4, but it can be changed if that improve the solving time.

In order to reduce model size and limit scaling problems, small values from GTAP database are filtered. This is of small consequences because they represent very little economic activity and they often should not even be present in the database. For example, there are always intra-country trade flows equal to $1, while we would expect them to be zero. And there are also a lot of trade flows below$1. Consequently, we must, at least, remove all these flows. By default, the tolerance is set at $100, which allows to remove the intra-country trade flows when sectors are aggregated. Indeed, if you aggregate 10 sectors, the intra-country trade flows are equal to$10.

 *---- REMOVAL OF SMALL FLOWS ----
PARAMETER tol	"Tolerance limits for removing small values"	/ 1E-4 /;  ! 1E-6 = 1 batinclude .\ProgGMS\Filter.gms  CVIPM	(i,s)		tol
$batinclude .\ProgGMS\Filter.gms CVIGM (i,s) tol$batinclude .\ProgGMS\Filter.gms  CVIPA	(i,s)		tol
$batinclude .\ProgGMS\Filter.gms CVIGA (i,s) tol$batinclude .\ProgGMS\Filter.gms  CVIFM	(i,PROD_COMM,s)	tol
$batinclude .\ProgGMS\Filter.gms CVIFA (i,PROD_COMM,s) tol$batinclude .\ProgGMS\Filter.gms  CVDPM	(i,r)		tol
$batinclude .\ProgGMS\Filter.gms CVDGM (i,r) tol$batinclude .\ProgGMS\Filter.gms  CVDPA	(i,r)		tol
$batinclude .\ProgGMS\Filter.gms CVDGA (i,r) tol$batinclude .\ProgGMS\Filter.gms  CVDFM	(i,PROD_COMM,s)	tol
$batinclude .\ProgGMS\Filter.gms CVDFA (i,PROD_COMM,s) tol$batinclude .\ProgGMS\Filter.gms  CVIMS	(i,r,s)		tol
$batinclude .\ProgGMS\Filter.gms CVIWS (i,r,s) tol$batinclude .\ProgGMS\Filter.gms  CVXWD	(i,r,s)		tol

The removal of small flows unbalances slightly the SAM. The data are then reconciled to keep the SAM balanced.

For another discussion of small values in GTAP, see Rutherford's website.

When we filter small flows, introduce MAcMap protection data or change any GTAP data that seems wrong, we unbalance the whole database. Consequently, we reconcile the data after these changes. It takes times at two places. First, after the filtering of small flows and then after the tariff changes.

### Supply and demand reconciliation

Supply and demand are calculated for each couple country-sector. The gap is then either allocates to final demand, if the demand after reconciliation is still positive, or to supply (capital income) if it is negative. This procedure only affects the sectors and countries where there are a discrepancy.

 *---- SUPPLY - DEMAND RECONCILIATION ----

OFFRE(i,r)   = PRODTOTO(i,r)+TAXPRODO(i,r);
DEMANDE(i,r) =  CCDOMP(i,r)+KGCDOMP(i,r)+sum(j,IJCCDOMP(i,j,r))
+sum(s,DEMO(i,r,s)-VDDO(i,r,s)-TRO(i,r,s)-VTAXEXPO(i,r,s));
DEMANDE(i,r)$Transport(i) = DEMANDE(i,r)+TRMO(i,r); GAP(i,r) = OFFRE(i,r)-DEMANDE(i,r); EVFK(i,r)$(min(CCDO(i,r),CCDOMP(i,r))+GAP(i,r) <0)  = EVFK(i,r)-GAP(i,r);
GAP(i,r) $(min(CCDO(i,r),CCDOMP(i,r))+GAP(i,r) <0) = 0; CCDOMP(i,r) = CCDOMP(i,r)+GAP(i,r); CCDO(i,r) = CCDO(i,r)+GAP(i,r); ### Introduction of MAcMap protection data and recalibration MAcMap protection data are often used instead of GTAP ones. However, changing the ad valorem equivalent tariff duty creates a gap between import and export values that must be cleared. If the global set Tariffs (defined in Sets.gms) is not equal to GTAP then GTAP tariffs are replaced by MAcMap ones and the SAM is rebalanced.  *---- TARIFFS CHANGES ----$if %Tariffs% == "GTAP" $goto Suite *Modification of tariffs and reconciliation *Unchged(i) is the set of sectors for which GTAP tariffs are kept ...$label Suite
*---- END OF TARIFFS CHANGE ----

The new tariffs change the tax revenue and so the disposable income. If the tariffs are higher, the final consumption and the capital good consumption are increased. The balancing is straightforward, because the increase consumption matches with the increase tariff revenues. However, it is not the case for imports of intermediate goods consumptions. An tariff increase involve an increase in intermediate consumption and so in production. If the change is positive (increase in production), the final domestic consumption (consumer and capital good) is increased. On the contrary, if the production decreases, we augment the value added in order to maintain the production at the same level.