metadata: authors: 0: author: Belotti,Federico
1: author: Borin,Alessandro
2: author: Mancini,Michele
count: World
docna: 0: docna: icio : Economic Analysis with Inter-Country
            Input-Output Tables in Stata
docty: Policy Research Working Paper
subtopic: International Trade and Trade Rules,Industrial and Consumer Services and Products,Transport and Trade Logistics,Trade Finance and Investment,Food Security
teratopic: Industry,Transport,International Economics and Trade,Agriculture
abstracts: cdata!: Several new statistical tools and
            analytical frameworks have been developed recently to
            measure countries' and sectors' involvement in
            global value chains. Such wealth of methodologies reflects
            that different empirical questions call for distinct
            accounting methods, along with different levels of
            aggregation of trade flows. This paper is a companion to the
            conceptual framework presented in Borin and Mancini (2019).
            The paper describes a new Stata module, icio, that allows
            the user to construct the most appropriate measure for given
            empirical questions on trade in value-added and
            participation in global value chains of countries and
            sectors. By exploiting inter-country input-output tables,
            icio provides decompositions of aggregate, bilateral, and
            sectoral exports and imports according to the source and
            destination of their value-added content. As different
            measures are suited to address distinct economic questions,
            icio is designed to be flexible also in this respect.
repnme: repnme: icio : Economic Analysis with Inter-Country
            Input-Output Tables in Stata
display_title: icio : Economic Analysis with
            Inter-Country Input-Output Tables in Stata
listing_relative_url: /research/2020/02/31797011/icio-economic-analysis-inter-country-input-output-tables-stata
topicv3: Industrial Clusters and Value Chains
            m1326062 1226,Agriculture and Food Security m1326205 435,Global Value Chains(GVC) m1326472 767,Trade m1326924 698,Trade in Value-Added m1504157 2613
publishtoextweb_dt: 2020-02-19T00:00:00Z
historic_topic: Industry,Transport,International Economics and Trade,Agriculture
origu: World Development Report (DECWD)
no_of_pages: 55
author_keys: 0: author_key: 1831729
model_extractions: Policy Research Working Paper 9156 World Development Report 2020 _Background Paper_ icio Economic Analysis with Inter-Country Input-Output Tables in Stata _Federico Belotti Alessandro Borin Michele Mancini_ Development Economics World Development Report 2020 Team February 2020
Policy Research Working Paper 9156

# **Abstract**

Several new statistical tools and analytical frameworks have been developed recently to measure countries’ and sectors’ involvement in global value chains. Such wealth of methodologies reflects that different empirical questions call for distinct accounting methods, along with different levels of aggregation of trade flows. This paper is a companion to the conceptual framework presented in <u>Borin and Mancini (2019). The paper describes a new Stata module, icio, that</u> allows the user to construct the most appropriate measure for given empirical questions on trade in value-added and participation in global value chains of countries and sectors. By exploiting inter-country input-output tables, icio provides decompositions of aggregate, bilateral, and sectoral exports and imports according to the source and destination of their value-added content. As different measures are suited to address distinct economic questions, icio is designed to be flexible also in this respect.

This paper is a product of the World Bank’s _World Development Report 2020_ Team, Development Economics. It is part of a larger effort by the World Bank to provide open access to its research and make a contribution to development policy discussions around the world. Policy Research Working Papers are also posted on the Web at http://www.worldbank. org/prwp. The authors may be contacted at federico.belotti@uniroma2.it, alessandro.borin@bancaditalia.it and michele.mancini@bancaditalia.it.

_The Policy Research Working Paper Series disseminates the findings of work in progress to encourage the exchange of ideas about development issues. An objective of the series is to get the findings out quickly, even if the presentations are less than fully polished. The papers carry the names of the authors and should be cited accordingly. The findings, interpretations, and conclusions expressed in this paper are entirely those of the authors. They do not necessarily represent the views of the International Bank for Reconstruction and Development/World Bank and its affiliated organizations, or those of the Executive Directors of the World Bank or the governments they represent._ Produced by the Research Support Team
# `icio` : Economic Analysis with Inter-Country Input-Output Tables in Stata<sup>_∗_</sup>

Federico Belotti<sup>1</sup> , Alessandro Borin<sup>2</sup> , and Michele Mancini<sup>3</sup> _Keywords_ : global value chains; input-output tables; trade in value-added; Stata. _JEL classification_ : E16, F1, F14, F15.

> _∗_ This paper is a product of the World Bank’s World Development Report 2020 Team, Development Economics, the International Relations and Economics Directorate of the Bank of Italy and the University of Rome Tor Vergata. A pilot version of the `icio` Stata module was used to compute some of the measures of GVC participation used in the analysis of the World Bank’s World Development Report 2020 “Global Value Chain: Trading for Development”. New updates and more information about `icio` can be found here: `http://tradeconomics.com/icio` . To install `icio` , run in Stata: `ssc install icio` . The views expressed in this paper are solely those of the authors and do not involve the responsibility of the Bank of Italy. The usual disclaimer applies.
# **1 Introduction**

The diffusion of global production networks has called for new statistical tools providing a representation of complex production linkages between and within economies. New types of data sources, the Inter-Country Input-Output (ICIO) tables, and new analytical frameworks have been developed to measure supply and demand contributions of countries and sectors in global value chains (GVCs).<sup>1</sup> In this paper we describe `icio` , a new Stata command that computes countries’ and sectors’ participation in GVCs as well as relevant measures of trade in valueadded, following the conceptual framework proposed by Borin and Mancini (2019), – – which in turn extends, refines and reconciles the other main contributions in this strand of the literature.<sup>2</sup> The command is flexible in many aspects. It allows to choose from different accounting methodologies, called perspectives. Each of these perspectives is best suited to address specific empirical questions, such as tracking production-demand linkages, assessing countries’ participation to the global production sharing, quantifying value-added embedded in countries’ and sectors’ exports, evaluating the potential exposure to macroeconomic and trade policy shocks. It exploits the most famous ICIO tables - the World Input-Output Database (Timmer et al. 2015), the OECD TiVA database (OECD, 2018), and the Eora Global Supply Chain Database (Lenzen et al. 2013). Moreover, any user-provided ICIO table can be straightforwardly loaded and used to compute value-added trade and GVC participation measures.

More specifically, `icio` encompasses the most relevant measures of value-added in exports and imports at the aggregate, bilateral and sectoral levels. For a given trade flow, it disentangles the source country/sector and the destination country/sector of value-added content. Moreover, for export flows at any level of disaggregation, `icio` computes the component related to GVC trade, i.e., the one entailing more than a single border crossing. This measure - and its backward and forward GVC participation sub-components, is featured in the World Bank World Development Report 2020 (WDR, 2020).<sup>3</sup> In addition, the `icio` command can be used to retrieve, from the ICIO tables,

> 1See, among others, Johnson and Noguera (2012), Wang et al. (2013), Koopman et al. (2014), Borin and Mancini (2015), Los et al. (2016), Nagengast and Stehrer (2016), Johnson (2018), Miroudot and Ye (2018), Los and Timmer (2018).

> 2The essential features and the algebraic derivation of the conceptual framework are reported in Appendices A to F.

> 3 GVC measures are based on Borin and Mancini (2015, 2019), which consistently refine the vertical specialization index proposed by Hummels et al. (2001).

2
the GDP (i.e. value-added) produced by a given country or industry (origin), the final demand in different countries and sectors (destination), or a combination of the two (when both origin and destination are specified).

We are aware that many questions can be addressed only partially with the current version of `icio` . Thus, our plan is to release new modules in the near future. First, we will add a much broader set of measures to assess the participation of countries and sectors in GVCs (Borin and Mancini, 2017; Wang et al., 2017) and their position (Antr`as and Chor, 2013; Fally 2012; Antr`as and Chor, 2018). Second, we will build a set of indicators to better evaluate the direct and indirect effects of trade policies, taking into account the GVC structure.

The rest of the paper is organized as follows. In Section 2 we show how to load ICIO tables in `icio` using the command `icio_load` . In Section 3 we show how supply, demand and supply-demand linkages can be computed in `icio` . This is useful when the empirical questions are related by supply, demand or require linking the origin of the value added to its absorption in final demand, without considering explicitly international trade flows. In Section 4 we provide the tools for gathering a comprehensive overview of the production process and cross-country relationships, i.e., how to obtain value-added decompositions of trade flows by country of origin and destination. In Section 5 we focus on the measurement of GVC participation. In several instances, and for illustration purposes, we show how to replicate some of the measures of GVC participation and figures presented in the World Bank’s Word Development Report 2020. Section 6 concludes.

Each section shares the same structure. At the beginning we provide a brief overview of the measures therein discussed. Then, we show how to compute those measures in `icio` , providing also some examples and a list of several relevant questions that could be addressed, with the related `icio` ’s syntax. In addition, in the Appendices we present the related conceptual frameworks.

# **2 Inter-Country Input-Output tables**

Input-Output (IO) models were developed by Leontief (1936) to represent and analyze production and consumption relationships within an economy. The related statistical tools, the IO tables, indicate the monetary amount of inputs of each sector necessary to produce the total output of a given industry and, in turn, how this output is used as final consumption (or investment) or as intermediate inputs for other productions. National IO tables distinguish only between domestic and foreign inputs; on the output side, exports represent one of the possible ‘final’ uses 3
of output, as domestic consumption and investment. ICIO tables, which have been developed combining national IO statistics with trade data, describe sale-purchase relationships between industries within and between economies as well as the uses in different final demand components (e.g. consumption, investment and government spending). In particular, an ICIO table specifies the country-sector pairs that provide intermediate inputs to a given industry and the country-sector pairs to which that industry sells its output - in the case of intermediate products - or the ultimate destination markets for final goods. In Appendix A we present the basic conceptual framework of ICIO models while in Section 2.1 we show how to load ICIO tables with the command `icio_load` .

# **2.1 Implementation: Loading ICIO tables using the** `icio_load` **command**

In order to use the `icio` command one needs to load a particular ICIO table by using the `icio_load` command. `icio_load` allows to work directly with the most popular ICIO tables - OECD TiVA database (OECD, 2018), World Input-Output Database (WIOD, Timmer et al. 2015), and Eora Global Supply Chain Database (Lenzen et al. 2013); in addition, any other user-provided ICIO table can be loaded.

## **2.1.1 Syntax**

The basic syntax for `icio_load` is

- `icio_load, [` _options_ `]`

where the main _options_ are:

- <u>`iciotable(`</u> _table_ _~~n~~ ame_ `[,` _usertable_ _~~o~~ ptions_ `])` , specifies the ICIO table to be used for the analysis; _default_ is `wiodn` , the last WIOD release available (release 2016, see below for more details on the available tables’ versions);

- <u>`year(`</u> _#_ `)` , sets the year to be used for the analysis; the _default_ is the last available year: 2014 for the WIOD tables ( `wiodn` ), 2015 for TiVA tables ( `tivan` ), 2015 for the Eora Global Supply Chain Database tables ( `eora` ). Not needed for userprovided tables;

- `info` , shows the data sources and the versions of the loadable ICIO tables.

## **2.1.2 Examples**

`icio_load` can be used for the following purposes: 4
1. To display the list of the directly available ICIO tables and their releases:<sup>4</sup>

``` .icio_load,info ```

|`table`|`version`|`from`|`to`|
|---|---|---|---|
|`wiodn`|`2016`|`2000`|`2014`|
|`tivan`|`2018`|`2005`|`2015`|
|`eora`|`199.82`|`1990`|`2015`|
|`wiodo`|`2013`|`1995`|`2011`|
|`tivao`|`2016`|`1995`|`2011`|

In this way the user can always recover which ICIO tables are directly available via the `icio` command. As can be seen from the previous output, at the time of writing, the following tables have been made available: the “2013” and the “2016” releases of the WIOD tables, the “2016” and “2018” of the TiVA tables, and the “199.82” version of the Eora Global Supply Chain Database tables.

2. To load a specific year of the ICIO table of interest; for example the following syntax allows to load the year 2014 of the WIOD tables released in 2016 (i.e. `wiodn` ):<sup>5</sup> ``` .icio_load,iciot(wiodn)year(2014) ``` 3. To load a user-provided ICIO table, by specifying `user` , instead of a specific ICIO table’s code, in the `iciotable(` _table_ _~~n~~ ame_ `)` option. The user-provided ICIO table and the related country list must be provided using two different comma separated files (i.e. files with extension `.csv` ). For example: ``` .icio_load,iciot(user,userp("path_to_the_table_folder")tablen(ADB_2011.csv)// countrylist(adb_countrylist.csv) ``` The syntax above shows that additional information has to be provided in order to instruct `icio` to load the user-provided table: _i_ ) the path to the folder where the `.csv` file containing the user-provided table is located, via the

> 4The ICIO tables directly available in `icio` are automatically downloaded the first time the user requests them through the `icio_load` command. These files are saved within the Stata system folder `"../ado/plus/i"` using a `.mmat` format (notice that the _filename_ begins with the prefix `icio_` ). For further details on the last release directly available through `icio` , run `icio_load, info` or visit the official websites `oe.cd/tiva` for the OECD TiVA database, `wiod.org` for the World Input-Output Database and `worldmrio.com` for the Eora Global Supply Chain Database. Please, also remember to cite the reference to the ICIO database you are analyzing through `icio` .

> 5Multiple years have to be loaded sequentially and then the results should be appended.

5
sub-option `userpath("` _string_ `")` ; _ii_ ) the name of the `.csv` file containing the table, via the sub-option <u>`tablename(`</u> _string_ `)` ; the name of the file containing the country list, via the sub-option `countrylistname(` _string_ `)` .

Notice that the table’s `csv` file must contain only one matrix of dimension ( _G × N_ ) _×_ ( _G × N_ + _G × U_ ), where _G_ is the number of countries, _N_ the number of sectors and _U_ the number of uses (i.e. consumption, investment, etc.). See the `icio` help file for more details.

# **3 Supply, demand and supply-demand linkages**

ICIO tables can be used in combination with long-established accounting relationships (Leontief, 1936) to measure the net value of production (GDP) of a country/sector, the value of final demand in a given country/sector and to pin down the links between the country-sector where the value-added originates and the market where it is absorbed in demand.

In Appendix B we show how to retrieve supply, demand and supply-demand linkages, i.e. GDP by country/sector of origin and/or destination, from ICIO tables while in Section 3.1 we describe how to compute these measures in `icio` , providing also some examples.

## **3.1 Implementation: Supply and demand with** `icio`

The `icio` command can be used to retrieve the GDP (i.e. value-added) produced by a given country or industry (origin of value-added) by specifying the option `origin()` , to measure the final demand in different countries and sectors (destination of the value-added) by specifying the option `destination()` , or a combination of the two (both `origin()` and `destination()` ).

### **3.1.1 Syntax**

### **1. Gross Domestic Product:**

`icio, origin(` _country_ _~~c~~ ode_ `[,` _sector_ _~~c~~ ode_ `]) [` _standard_ _~~o~~ ptions_ `]`

### **2. Final demand:**

`icio, destination(` _country_ _~~c~~ ode_ `[,` _sector_ _~~c~~ ode_ `]) [` _standard_ _~~o~~ ptions_ `]`

### **3. Value-added by origin and final destination:**

6
`icio, origin(` _country_ _~~c~~ ode_ `[,` _sector_ _~~c~~ ode_ `])` `destination(` _country_ _~~c~~ ode_ `[,` _sector_ _~~c~~ ode_ `]) [` _standard_ _~~o~~ ptions_ `]` The list of available country/sector codes for the loaded ICIO table can be displayed by running `icio, info` . As for the `[` _standard_ _~~o~~ ptions_ `]` , they are:

- `save(` _filename_ `[, replace])` , which saves the command output (scalar, vector or matrix) in memory to an excel file ( `.xls` );

- <u>`groups(`</u> _grouping_ _~~r~~ ule “group_ _~~n~~ ame”_ `[...])` , which specifies a user-defined grouping of countries. In this way, output measures can be computed for a country group (e.g., the “Euro area”, “MERCOSUR” or “ASEAN”) as a whole while taking into account the specific supply/demand/trade structure of each member of the group. To define one or more country groups, the user has to provide a list of comma-separated country codes, which is the “ _grouping_ _~~r~~ ule_ ”, followed by a user defined “ _group_ _~~n~~ ame_ ”.

# **3.1.2 Examples**

`icio` is useful to address empirical questions related to supply, demand and supplydemand relationships, without considering explicitly international trade flows. For instance, it is possible to retrieve the GDP of Germany that is finally absorbed in China (i.e., Johnson and Noguera (2012) “value-added exports”), that according to the WIOD database in 2014 is: ``` .icio_load Loadingtablewiod2014...loaded ```

- `. *What is the value-added originated in Germany and absorbed in China? . icio, origin(deu) destination(chn)`

``` Value-Addedbyorigin/destination: Origin:DEU Destination:CHN Output:Value-Added ```

||`Millions of $`|`% of total`|
|---|---|---|
|`Value-Added`|`101042.25`|_`100.00`_|

The Stata output displays the value, in millions of US dollars, and the share of total value-added produced in a specific country, when the complete list of countries or sectors of destination is selected by specifying the code `all`<sup>6</sup> (or absorbed by

> 6This is the case if a certain country/sector of origin is specified, `origin(` _country_ _~~-~~ code_ `[,` _sector_ _~~c~~ ode_ `])` , as well as the complete list of countries/sectors of destination, i.e.

7
a specific country/sector, if the complete list of countries or sectors of origin is specified with the same code).<sup>7</sup> If the option `all` is not specified the share will be clearly equal to 100%. For example ``` .*Whatisthevalue-addedoriginatedinGermanyandabsorbedineachcountry?
.icio,origin(deu)destination(all) ``` ``` Value-Addedbyorigin/destination: Origin:DEU Destination:ALL Output:Value-Added ```

||`Millions of $`|`% of tot`|`al`|
|---|---|---|---|
|`AUS`|`12048.65`|_`0.`_|_`33`_|
|`AUT`|`36839.13`|_`1.`_|_`02`_|
|`BEL`|`20719.98`|_`0.`_|_`57`_|
|`BGR`|`3004.85`|_`0.`_|_`08`_|
|`BRA`|`15943.49`|_`0.`_|_`44`_|
|`CAN`|`15305.40`|_`0.`_|_`42`_|
|`CHE`|`37205.73`|_`1.`_|_`03`_|
|`CHN`|`101042.25`|_`2.`_|_`79`_|
|`CYP`|`768.14`|_`0.`_|_`02`_|
|`CZE`|`16171.75`|_`0.`_|_`45`_|
|`DEU`|`2446528.60`|_`67.`_|_`58`_|
|`DNK`|`12205.44`|_`0.`_|_`34`_|
|`ESP`|`33469.66`|_`0.`_|_`92`_|
|`EST`|`1219.86`|_`0.`_|_`03`_|
|`FIN`|`9049.83`|_`0.`_|_`25`_|
|`FRA`|`85684.36`|_`2.`_|_`37`_|
|`GBR`|`77158.04`|_`2.`_|_`13`_|
|`GRC`|`6543.15`|_`0.`_|_`18`_|
|`HRV`|`2473.71`|_`0.`_|_`07`_|
|`HUN`|`8782.43`|_`0.`_|_`24`_|
|`IDN`|`4689.61`|_`0.`_|_`13`_|
|`IND`|`12267.21`|_`0.`_|_`34`_|
|`IRL`|`5407.92`|_`0.`_|_`15`_|
|`ITA`|`52128.41`|_`1.`_|_`44`_|
|`JPN`|`23269.19`|_`0.`_|_`64`_|
|`KOR`|`17377.73`|_`0.`_|_`48`_|
|`LTU`|`1978.03`|_`0.`_|_`05`_|
|`LUX`|`3989.54`|_`0.`_|_`11`_|
|`LVA`|`1134.20`|_`0.`_|_`03`_|
|`MEX`|`10619.36`|_`0.`_|_`29`_|
|`MLT`|`321.40`|_`0.`_|_`01`_|
|`NLD`|`34154.59`|_`0.`_|_`94`_|
|`NOR`|`10257.55`|_`0.`_|_`28`_|
|`POL`|`33030.97`|_`0.`_|_`91`_|
|`PRT`|`6773.81`|_`0.`_|_`19`_|
|`ROU`|`9065.05`|_`0.`_|_`25`_|
|`ROW`|`235768.63`|_`6.`_|_`51`_|
|`RUS`|`38509.83`|_`1.`_|_`06`_|
|`SVK`|`6112.61`|_`0.`_|_`17`_|

`destination(all[,` _sector_ _~~c~~ ode_ `])` or `destination(` _country code_ `,all)` . 7This is the case if the complete list of countries or sectors of origin is specified, i.e. `origin(all[,` _sector code_ `])` or `origin(` _country code_ `,all)` , as well as a specific country/sector of destination, `destination(` _country code_ `[,` _sector_ _~~c~~ ode_ `])` .

8
|`SVN`|`2618.50`|_`0.07`_|
|---|---|---|
|`SWE`|`20894.17`|_`0.58`_|
|`TUR`|`19070.35`|_`0.53`_|
|`TWN`|`6318.91`|_`0.17`_|
|`USA`|`122388.23`|_`3.38`_|

As can be noted, the share of the German GDP absorbed in China (on the total GDP produced by Germany), around 2.8%, is obtained either by looking for the `CHN` row in the previous output, or by taking the ratio of the dollar values obtained throughout the options `origin(deu) destination(chn)` and the value of the total German GDP, that can be obtained using: ``` .*WhatistheGermany ́sGDP?
.icio,origin(deu) Value-Addedbyorigin/destination: Origin:DEU Output:Value-Added Millionsof$%oftotal Value-Added3620310.26100.00 ``` Other examples of questions that could be answered (see the reported syntax) with the analysis of supply-demand linkages through `icio` are:

- _What is the GDP (value-added) produced by each country?_ `icio, origin(all)`

- _How much value-added does each country produce in a given sector (e.g., sector code 19)?_

``` icio,origin(all,19) ```

- _What is the aggregate final demand of each country?_ `icio, destination(all)`

- _Where the value-added produced in the Italian sector 19 is absorbed?_ `icio, origin(ita,19) destination(all)`

- _Which final demand sectors in China are the most important for the absorption of US-made value-added?_

``` icio,origin(usa)destination(chn,all) ```

- _Where the GDP produced in each country is absorbed (and save the output as “supply_ _~~d~~ emand.xls” in the current working directory)?_

``` icio,origin(all)destination(all)save("supply_demand.xls") ``` 9
- _How much USMCA (former NAFTA) countries’ final demand in sector 20 is satisfied by Chinese productions?_

``` icio,origin(chn)destination(usmca,20)groups(usa,mex,can,"usmca") ```

# **4 Value-added in trade**

The accounting relationships presented in the previous section provide a useful tool to link the origin of value-added (GDP) to its absorption in final demand. However, they provide only partial information on overall production processes and crosscountry relationships. For instance, no information is provided on the production stages that take place as well as on the national borders that are crossed between the stage in which the value-added is generated and the one of its final absorption. Both the above represent critical information to understand countries interdependence in GVCs.

In many empirical applications it is important to trace value-added in gross trade flows, for instance, when we want to measure the value-added produced by a country that is involved in a certain trade relationship. Depending on the empirical issue under investigation, it is also necessary to consider trade flows at different levels of disaggregation and analyze their value-added content. In fact, in some cases we may be interested just to single-out the value-added embedded in global trade flows or in the total exports or imports of a country. In other cases, also the bilateral and sectoral dimensions of trade flows may matter. For instance, when studying the implications of GVCs, it is relevant to consider the position of a country (or sector) within the production chain and identify its direct upstream and downstream trade partners. This may be relevant in order to geographically map the production networks and analyze the international propagation of macroeconomic shocks.

A key issue in the value-added accounting of trade regards the definition of “double counted” components, i.e. items that are recorded several times in a given gross trade flow due to the back-and-forth shipments that occur in a cross-national production process (Koopman et al. 2014). For instance, imagine that a country is exporting cotton. After some processing stage abroad, the cotton is imported back, embedded in some fabric, to be further re-exported as apparel. The value of cotton will be counted twice in the aggregate exports of the country, i.e. “double counted” - in the first export flow and in the second one, embedded in the apparel - but once in the GDP (i.e. value-added).

Now imagine that the goal is to allocate the value-added across the two export flows. A reasonable way is to consider the cotton production as value-added in the 10
first shipment, i.e. the one of cotton, and as double-counting in the second one, when cotton is embedded in the shipment of apparel. Summing the value-added terms in the two export flows, we end up with consistent aggregate figures at the country level, i.e. cotton classified once as value-added and once as double counting.

Consider now a different goal, i.e. assessing the value-added exposed to a specific trade barrier imposed by a partner. To this end, suppose that a tariff impairs the exports of apparel. Now, when considering the value-added embedded in the second flow, the one exposed to the tariff, also that one of cotton needs to be taken into account. In this way, we are able to correctly assess the value-added that could be impaired by the tariff.

More in general, depending on the type of trade flow and the objective of the analysis, it is necessary to define the “perimeter” according to which something is classified as “value-added” or “double counted”, i.e. a specific accounting “perspective” has to be chosen.

Each perspective is better suited to address specific empirical issues. Whenever the empirical application requires to retrieve the entire value-added of a country/sector of origin that is embedded in a given trade flow, as in the second example above, the accounting perspective to be chosen should match the level of disaggregation of the trade flow considered, as reported in the first column of Table 1 (e.g., “exporting country” perspective for aggregate exports, “bilateral” perspective for an aggregate bilateral trade flow, “sectoral-bilateral” perspective for a trade flow between two countries in a given sector, etc.).<sup>8</sup> For instance, suppose a tariff is imposed on the imports of a given sector from a certain partner, and we are interested in evaluating what part of the exporting country GDP is exposed to the tariff. In this case we want to consider as “value-added” the entire GDP that is involved in this sectoral-bilateral relationship, even if part of that was previously exported to other countries/sectors (i.e. double counted in an “exporting country” perspective). The specific sectoral-bilateral relationship becomes the new relevant perimeter, and only the items that enter multiple times in this trade flow are considered as “double counted”. Indeed, this is what is called a “sectoral-bilateral perspective”, the one used in the second example on cotton.

However, these measures cannot be summed up to get a precise assessment of value-added contents in more aggregate trade flows, e.g. value added in the total exports of a country. In other words, they are non-additive.<sup>9</sup> Thus, if we

> 8See Section E for a complete overview of the perspectives available in `icio` ).

> 9See also Johnson (2018) and Los and Timmer (2018) on this point. More specifically, when we use an accounting perspective based on a narrower perimeter to define the double counted items (e.g. the sectoral-bilateral one), by summing these indicators we obtain value-added content

11
are seeking a breakdown of the value-added measures by sectors of exports, by importing partners or by sector-partner combinations, consistent with exporters’ aggregate figures, as in the first example on cotton, we need to apply the exportingcountry perspective also to the decomposition of more disaggregated trade flows (see column two of Table 1). In this way, the resulting measures are additive, i.e. measures at a more aggregate level can be obtained summing disaggregate results. This accounting perspective can be used also for other purposes such as, for instance, to single out the portion of trade in any type of exports that crosses just one international border. Indeed, Section 5 shows that this is instrumental for measuring GVC-related trade.

Whenever the perspective is set at a more aggregate level as compared to the considered trade flow, it is also needed to select an approach to allocate double counting. `icio` implements two alternative approaches:<sup>10</sup> the first method, so called “ _source_ -based” approach, accounts for the value-added the first time it leaves the country of origin; the second, “ _sink_ -based” approach, considers it the last time it crosses the national borders. The choice between these two approaches depends on the particular issue we want to address. The “ _source_ ” approach is designed to examine the production linkages and the country/sector participation to different types of production processes. This makes it more suited to assess, for instance, the share of an export flow that crosses just one border, i.e. traditional exports, as opposed to the share that is further re-exported, i.e. GVC-exports. Conversely, the value-added in the “ _sink_ ” approach is recorded as closely as possible to the moment when it is ultimately absorbed. This makes it more suited to studying the relationship between value-added in exports and final demand, as in the analysis of bilateral trade balances.

As already mentioned, each perspective is more suited to address specific empirical questions. In Table 2 we provide a non-exhaustive overview of the most common ones, with the best suited accounting method to provide an answer. See Section 4.1 for additional examples, with the related `icio` syntax.

In the Appendix we show the conceptual framework of the value-added accounting in total exports, following an exporting-country perspective (Appendix C), in bilateral exports, both with a bilateral and an exporting-country perspective (Appendix D), and in all the possible trade flows (Appendix E). Instead, in Section 4.1, we show the implementation in `icio` and provide some empirical examples with the

> measures which exceed the correct ones for the aggregate trade flow (i.e. those based on a broader perimeter for defining double counted items).

> 10These approaches were proposed by Nagengast and Stehrer (2016) and fully derived by Borin and Mancini (2015, 2017).

12
related syntax.

Table 1: A summary of the available perspectives and approaches for each trade

||**Perspective**<br>**in line with**<br>**the trade fow**<br>**(1)**|**Perspective**<br>**consistent with**<br>**more aggregate fows**<br>**(i.e. additive)**<br>**(2)**|
|---|---|---|
|**1. Total exports**|||
|**1a. Aggregate**|Exporting-country|World (source/sink)|
|**1b. Sectoral**|Sectoral-exporter|Exporting-country (source/sink)|
|**2. Bilateral exports**|||
|**2a. Aggregate**|Bilateral|Exporting-country (source/sink)|
|**2b. Sectoral**|Sectoral-bilateral|Exporting-country (source/sink)|
|**3. Total imports**|||
|**3a. Aggregate**|Importing-country|n.a.|
|**3b. Sectoral**|Sectoral-importer|n.a.|

13
|**Accounting method**<br>exporting-country perspective|bilateral perspective<br>sectoral-bilateral perspective<br>importing-country perspective<br>sectoral-importer perspective<br>sectoral-exporter perspective<br>exporting-country<br>perspective,<br>source or sink approach|exporting-country<br>perspective,<br>sink approach<br>exporting-country<br>perspective,<br>source approach|
|---|---|---|
|**Trade fow to select**<br>total aggregate exports|bilateral aggregate exports<br>bilateral sectoral exports<br>total aggregate imports<br>total sectoral imports<br>total sectoral exports<br>sectoral/bilateral/sectoral-<br>bilateral exports|bilateral exports<br>any export fow|
|**estion**<br>d in the total exports of a country|ly exposed to:<br>bilateral trade relation (e.g. generic trade frictions<br>untries)<br> a specifc sectoral-bilateral trade relation (e.g. a<br>mposed by a trade partner in a given sector)<br> the imports of a country (e.g. trade restrictions<br>tners)<br>the imports of a country in a given sector (e.g. a<br>l tarif vis-`a-vis all partners)<br> the sectoral exports of a country (e.g.<br>negative<br>on the exports of a given country and sector)<br>eakdown in disaggregated export fows, consistent<br>egate measures|eakdown of bilateral trade balances<br>orts vs GVC-exports|
|**u**<br>e|l<br>a<br>o<br>n <br>i<br>n <br>ar<br> <br>a<br>n <br> <br>br<br>r|br<br>p|
|**q**<br>dd|tia<br>on<br>o c<br> o<br>if <br> o<br>l p<br> on<br>tor<br> o<br>ock<br>d <br>agg|d <br> ex|
|**Empirical**<br>GDP embe|GDP poten<br>— a shock<br>between tw<br>— a shock<br>specifc tar<br>— a shock<br>vis-`a-vis al<br>— a shock <br>specifc sec<br>— a shock<br>demand sh<br>Value-adde<br>with total|Value-adde<br>Traditional|

14
# **4.1 Implementation: Accounting for value-added in gross trade**

Depending on the specific empirical question, the user needs to choose the appropriate `icio` ’s options in order to select: _i_ ) the desired trade flow; _ii_ ) the best suited accounting methodology to single out “double counted” components (see above for a definition of “double counting”); _iii_ ) the appropriate output measure(s).

As to the first point, the following types of trade flows are considered: _i_ ) aggregate exports; _ii_ ) sectoral exports; _iii_ ) bilateral exports, _iv_ ) sectoral-bilateral exports, _v_ ) aggregate imports, _vi_ ) sectoral imports. It is also worth recalling that the option `group()` allows to consider value-added decompositions for country aggregates, so that the set of trade flows’ combinations is actually broader (see Section 3.1.2 for examples). For each trade flow, we consider the accounting perspectives and approaches that appear to be more economically important (see Appendix E for an overview).

We structured the `icio` ’s syntax according to the different trade flows as follows

1. **Value-added and GVC participation in total exports of a country:**

- a) Value-added and GVC participation in **total aggregate exports** : `icio, exporter(` _country_ _~~c~~ ode_ `) [` _methods_ _~~1~~ a_ `] [` _output_ _~~e~~ xports_ `] [` _origin_ _~~d~~ estination_ `] [` _standard_ _~~o~~ ptions_ `]`

- b) Value-added and GVC participation in **total sectoral exports** : `icio, exporter(` _country_ _~~c~~ ode_ `[,` _sector_ _~~c~~ ode_ `]) [` _methods_ _~~1~~ b_ `] [` _output_ _~~e~~ xports_ `] [` _origin_ _~~d~~ estination_ `] [` _standard_ _~~o~~ ptions_ `]`

## 2. **Value-added and GVC participation in bilateral exports:**

- a) Value-added and GVC participation in **bilateral aggregate exports** : `icio, exporter(` _country_ _~~c~~ ode_ `) importer(` _country_ _~~c~~ ode_ `) [` _methods_ _~~2~~ a_ `] [` _output_ _~~e~~ xports_ `] [` _origin_ _~~d~~ estination_ `] [` _standard_ _~~o~~ ptions_ `]`

- b) Value-added and GVC participation in **bilateral sectoral exports** : `icio, exporter(` _country_ _~~c~~ ode_ `[,` _sector_ _~~c~~ ode_ `]) importer(` _country_ _~~c~~ ode_ `) [` _methods_ _~~2~~ b_ `] [` _output_ _~~e~~ xports_ `] [` _origin_ _~~d~~ estination_ `] [` _standard_ _~~o~~ ptions_ `]`

3. **Value-added in total imports of a country:**

- a) Value-added in **total aggregate imports** :

- `icio, importer(` _country_ _~~c~~ ode_ `) [` _methods_ _~~3~~ a_ `] [` _output_ _~~i~~ mports_ `] [` _origin_ _~~d~~ estination_ `] [` _standard_ _~~o~~ ptions_ `]`

15
- b) Value-added in **total sectoral imports** :

- `icio, importer(` _country_ _~~c~~ ode_ `[,` _sector_ _~~c~~ ode_ `]) [` _methods_ _~~3~~ b_ `] [` _output_ _~~i~~ mports_ `] [` _origin_ _~~d~~ estination_ `] [` _standard_ _~~o~~ ptions_ `]`

# **4.1.1 Accounting methods’ options**

The options `perspective()` and `approach()` can be used to select the appropriate accounting methodology (i.e. `[` _methods *_ `]` in the syntax reported in Section 4.1) for answering the empirical question of interest. For the different trade flows, Table 3 reports a summary of the available perspectives.

As already mentioned at the beginning of Section 4, whenever the perspective is set at a more aggregate level as compared to the considered trade flow, two alternative approaches are available. By using the `icio` option `approach(source)` the item is classified as “value-added” the first time it crosses the national border, whereas the option `approach(sink)` allows to consider it as “value-added” the last time it crosses the border.

Table 3: A summary of the available perspectives and approaches for each trade flow: syntax

||**Perspective**<br>**in line with**<br>**the trade fow**|**Perspective**<br>**consistent with**<br>**more aggregate fows**<br>**(i.e. additive)**|
|---|---|---|
|**1. Total exports**<br>**1a. Aggregate**<br>**1b. Sectoral**|`persp(exporter)`<br>`persp(sectexp)`|`persp(world) approach(source)`<br>`persp(world) approach(sink)`<br>`persp(exporter) approach(source)`<br>`persp(exporter) approach(sink)`|
|**2. Bilateral exports**<br>**2a. Aggregate**<br>**2b. Sectoral**|`persp(bilateral)`<br>`persp(sectbil)`|`persp(exporter) approach(source)`<br>`persp(exporter) approach(sink)`<br>`persp(exporter) approach(source)`<br>`persp(exporter) approach(sink)`|
|**3. Total imports**|||
|**3a. Aggregate**|`persp(importer)`|n.a.|
|**3b. Sectoral**|`persp(sectimp)`|n.a.|

# **4.1.2 Output options**

For the selected trade flow, `icio` allows to compute the main indicators of gross trade and value-added through the `output()` option.

16
For export flows (i.e. `[` _output_ _~~e~~ xports_ `]` in Section 4.1) the _default_ output option is `output(detailed)` . It allows to get a complete value-added decomposition of the trade flows according to the conceptual scheme of Figure C.2 in Appendix C. Gross trade - `gtrade` - is split in the part that is originally produced by the exporting country (domestic content - `dc` ) and the part that is produced abroad (foreign content - `fc` ); in turn, each of these components is broken up in a part of valueadded item (domestic value-added - `dva` - and foreign value-added - `fva` ) and in a part of double counting.<sup>11</sup> The methodology used to single out the value-added and double-counted components changes according to the selected perspective/approach options, while the `gtrade` , `dc` and `fc` measures are, by construction, the same regardless of the accounting methodology.

The detailed output also includes additional indicators of trade in value-added that have been singled out in the literature (e.g. **VAX** by Johnson and Noguera, 2012; Reflection by Koopman et al. 2014; **DAVAX** and **VAXIM** by Borin and Mancini, 2019, see Appendix C for an overview) and also measures of GVC participation<sup>12</sup> as developed in Borin and Mancini (2015, 2019). The additional indicators that are included in the detailed output vary consistently with the selected perspective/approach. The user can also ask for a specific trade indicator by specifying one of the following arguments of the `output()` option: `gtrade` , `dc` , `dva` , `fc` and `fva` .<sup>13</sup> As an additional feature, it is also possible to single out the country/sector where the goods/services were originally produced by specifying the `origin(` _country_ _~~-~~ code_ `[,` _sector_ _~~c~~ ode_ `])` option, as well as the market/sector where they are absorbed in the final demand, by specifying the `destination(` _country_ _~~c~~ ode_ `[,` _sector_ _~~c~~ ode_ `])` option (i.e. `[` _origin_ _~~d~~ estination_ `]` in Section 4.1). Results for all countries or all sectors can be computed and displayed simultaneously, using `all` as argument for _country_ _~~c~~ ode_ or _sector_ _~~c~~ ode_ . Notice that _country_ _~~c~~ ode_ and _sector_ _~~c~~ ode_ cannot be both `all` . If the aim is to compute the value-added produced by a specific country/sector of origin, the option `output(va)` has to be specified.<sup>14</sup> The gross content term (i.e. value-added + double counted items) for a specific country (and sector)

> 11Double-counted terms are not singled out as output options in `icio` , but can be easily computed by subtracting the value-added component, either domestic or foreign, from the correspondent domestic or foreign content.

> 12See Section 5 for more details on these indicators and how to compute them.

> 13In addition to value-added and gross trade measures, for any export flow when `perspective(exporter)` and `approach(source)` are specified - these options are actually the _default_ - it is also possible to compute the value of trade that is related to GVCs and its backward and forward sub-components, specifying `gvc` , `gvcb` or `gvcf` in `output()` , respectively. These measures are discussed in detail in Section 5.

> 14Note that, when the country in `origin()` corresponds to that specified in `exporter()` , icio provides the same results when selecting `output(dva)` or `output(va)` .

17
of origin can be computed by specifying `output(gtrade)` .

As far as import flows are concerned (i.e. `[` _output_ _~~i~~ mports_ `]` in Section 4.1), the distinction between domestic and foreign items is less relevant, as the former would refer only to the items produced, exported and then re-imported by the importing country itself. For this reason, the _default_ in this case is to compute the gross trade value (i.e. `gtrade` ). The imported value-added (gross-content) can be traced back to the country of origin specifying the option `origin(` _country_ _~~c~~ ode_ `[,` _sector_ _~~-~~ code_ `])` together with `output(va)` ( `output(gtrade)` ). Of special note is that it is possible to pin down also a specific market/sector of final demand by specifying the `destination(` _country_ _~~c~~ ode_ `[,` _sector_ _~~c~~ ode_ `])` option.

As for the standard options, (i.e. `[` _standard_ _~~o~~ ptions_ `]` in Section 4.1), the `save()` and `group()` options are available for both export and import flows (see Section 3.1 for a description of these options).

# **4.1.3 Examples: Value-added in trade flows**

In this section we provide some examples of the insights that `icio` , dealing with the break down of value-added in trade flows, can bring for the economic analysis of ICIO tables.

As running example, we select a specific trade flow, the Chinese total aggregate exports. After having loaded the year 2014 of the last release of the WIOD tables using ``` icio_load,iciot(wiodn)year(2014) ``` the user can easily obtain a detailed breakdown of the selected trade flow, both in millions of US dollars and as a share, using ``` .icio,exporter(chn) Decompositionofgrossexports: Perspective:exporter Exporter:CHN Importer:totalCHNexports ```

||`Millions of $`|`% of export`|
|---|---|---|
|`Gross exports (GEXP)`|`2425406.15`|_`100.00`_|
|`Domestic content (DC)`|`2039474.07`|_`84.09`_|
|`Domestic Value-Added (DVA)`|`2016712.86`|_`83.15`_|
|`VAX -> DVA absorbed abroad`|`1957739.47`|_`80.72`_|
|`Reflection`|`58973.39`|_`2.43`_|
|`Domestic double counting`|`22761.21`|_`0.94`_|
|`Foreign content (FC)`|`385932.09`|_`15.91`_|
|`Foreign Value-Added (FVA)`|`380473.47`|_`15.69`_|

18
|`Foreign double counting`|`5458.62`|_`0.23`_|
|---|---|---|
|`GVC-related trade (GVC)`|`781287.59`|_`32.21`_|
|`GVC-backward (GVCB)`|`408693.30`|_`16.85`_|
|`GVC-forward (GVCF)`|`372594.29`|_`15.36`_|

The detailed decomposition can be also computed for a particular sector of export, e.g., “Manufacture of computer, electronic and optical products” (sector code 17 for the loaded ICIO table) by using<sup>15</sup> ``` .icio,exporter(chn,17) ``` ``` Decompositionofgrossexports: Perspective:exporter Exporter:CHN Importer:totalCHNexports Sectorofexport:17 ```

||`Millions of $`|`% of export`|
|---|---|---|
|`Gross exports (GEXP)`|`560552.89`|_`100.00`_|
|`Domestic content (DC)`|`417041.87`|_`74.40`_|
|`Domestic Value-Added (DVA)`|`404306.15`|_`72.13`_|
|`VAX -> DVA absorbed abroad`|`386215.71`|_`68.90`_|
|`DAVAX`|`315342.79`|_`56.26`_|
|`Reflection`|`18090.44`|_`3.23`_|
|`Domestic double counting`|`12735.72`|_`2.27`_|
|`Foreign content (FC)`|`143511.01`|_`25.60`_|
|`Foreign Value-Added (FVA)`|`140161.87`|_`25.00`_|
|`Foreign double counting`|`3349.14`|_`0.60`_|
|`GVC-related trade (GVC)`|`245210.09`|_`43.74`_|
|`GVC-backward (GVCB)`|`156246.74`|_`27.87`_|
|`GVC-forward (GVCF)`|`88963.36`|_`15.87`_|

``` DAVAX:Value-Addeddirectlyabsorbedbytheimporter ``` We now show how the results can change by using a different perspective on the same trade flow. We move from the _default_ - exporting country perspective - to a sectoral-exporter perspective by adding the option `perspective(sectexp)` ``` .icio,exporter(chn,17)perspective(sectexp) Decompositionofgrossexports: Perspective:sectexp Exporter:CHN Importer:totalCHNexports Sectorofexport:17 ```

||`Millions of $`|`% of export`|
|---|---|---|
|`Gross exports (GEXP)`|`560552.89`|_`100.00`_|

> 15Run `icio, info` after `icio_load` to get the complete country and sector lists.

19
|`Domestic content (DC)`|`417041.87`|_`74.40`_|
|---|---|---|
|`Domestic Value-Added (DVA)`|`409968.49`|_`73.14`_|
|`VAX -> DVA absorbed abroad`|`391624.68`|_`69.86`_|
|`Reflection`|`18343.80`|_`3.27`_|
|`Domestic double counting`|`7073.39`|_`1.26`_|
|`Foreign content (FC)`|`143511.01`|_`25.60`_|
|`Foreign Value-Added (FVA)`|`141076.94`|_`25.17`_|
|`Foreign double counting`|`2434.07`|_`0.43`_|

While the output confirms that domestic and foreign contents are not affected by changing perspective, the value-added terms are higher and, as a consequence, double counting items are smaller. This is not surprising since the sectoral-exporter perspective features a more restrictive definition of double counting (see Appendix E). Which perspective should be used? It depends on the specific empirical question. If the goal is to measure to what extent the GDP of a country could be exposed to a certain shock on the exports of a sector, a sectoral-exporter perspective might be appropriate. Indeed, in this case, the relevant border to trace value-added is the exporting country/sector’s one. Instead, the _default_ perspective (the “exporting country” one) is the most appropriate if the goal is to compute GVC-related trade indices - since to this end the relevant border is always the exporting country’s one - and is suited to obtain measures of value-added trade traced in disaggregated trade flows that are consistent with the aggregate figures. Notice that this additivity property is a feature of the “exporting country” perspective only.<sup>16</sup> It can be easily verified by showing that value-added components and GVC-related trade in the aggregate Chinese exports - as computed before using the synatx `icio, exporter(chn)` - equal the sum of the very same measures obtained for each sector. A possible implementation of this check is the following ``` .quiicio,exporter(chn,all)output(gtrade) ```

> `. mata : st_matrix("sum_gtrade", colsum(st_matrix("r(gtrade)")))`

> `. di "aggregate Gross exports " %14.2f sum_gtrade[1,1] aggregate Gross exports 2425406.15`

``` .
``` ``` .quiicio,exporter(chn,all)output(dva) ``` ``` .mata:st_matrix("sum_dva",colsum(st_matrix("r(dva)"))) ``` ``` .di"aggregateDomesticValue-Added"%14.2fsum_dva[1,1] aggregateDomesticValue-Added2016712.86 ``` ``` .
``` ``` .quiicio,exporter(chn,all)output(fva) ``` ``` .mata:st_matrix("sum_fva",colsum(st_matrix("r(fva)"))) ```

> 16Instead, all the other perspectives are non-additive, i.e. measures at a more aggregate level cannot be obtained summing disaggregate results.

20
``` .di"aggregateForeignValue-Added"%14.2fsum_fva[1,1] aggregateForeignValue-Added380473.47 ``` ``` .
.quiicio,exporter(chn,all)output(gvc) ``` ``` .mata:st_matrix("sum_gvc",colsum(st_matrix("r(gvc)"))) ``` ``` .di%11.0g"aggregateGVC-relatedtrade"%14.2fsum_gvc[1,1] aggregateGVC-relatedtrade781287.59 ``` We now select a different trade flow, moving to bilateral sectoral exports. In particular, we consider the Chinese exports of computer, electronic and optical products to the United States. The default assessment of the extent of GVC participation, as well as a breakdown of the flow in terms of value-added components consistent both with the aggregate Chinese exports and with total Chinese exports to the United States, is obtained using the _default_ “exporting country” perspective as: ``` .icio,exporter(chn,17)importer(usa) ``` ``` Decompositionofgrossexports: Perspective:exporter Exporter:CHN Importer:USA Sectorofexport:17 ```

||`Millions of $`|`% of export`|
|---|---|---|
|`Gross exports (GEXP)`|`107292.76`|_`100.00`_|
|`Domestic content (DC)`|`79824.00`|_`74.40`_|
|`Domestic Value-Added (DVA)`|`77386.31`|_`72.13`_|
|`VAX -> DVA absorbed abroad`|`76957.76`|_`71.73`_|
|`DAVAX`|`72570.84`|_`67.64`_|
|`Reflection`|`428.55`|_`0.40`_|
|`Domestic double counting`|`2437.68`|_`2.27`_|
|`Foreign content (FC)`|`27468.76`|_`25.60`_|
|`Foreign Value-Added (FVA)`|`26827.72`|_`25.00`_|
|`Foreign double counting`|`641.04`|_`0.60`_|
|`GVC-related trade (GVC)`|`34721.92`|_`32.36`_|
|`GVC-backward (GVCB)`|`29906.44`|_`27.87`_|
|`GVC-forward (GVCF)`|`4815.48`|_`4.49`_|

``` DAVAX:Value-Addeddirectlyabsorbedbytheimporter ``` Again, we can select a perspective in line with the level of aggregation of the chosen trade flow, i.e. a sectoral-bilateral perspective - `perspective(sectbil)` , for instance to measure to what extent the Chinese GDP could be exposed to a tariff imposed by the United States on the imports of computer, electronic and optical products: ``` .icio,exporter(chn,17)importer(usa)perspective(sectbil) ``` 21
``` Decompositionofgrossexports: Perspective:sectbil Exporter:CHN Importer:USA Sectorofexport:17 ```

||`Millions of $`|`% of export`|
|---|---|---|
|`Gross exports (GEXP)`|`107292.76`|_`100.00`_|
|`Domestic content (DC)`|`79824.00`|_`74.40`_|
|`Domestic Value-Added (DVA)`|`79815.64`|_`74.39`_|
|`VAX -> DVA absorbed abroad`|`79373.64`|_`73.98`_|
|`Reflection`|`442.00`|_`0.41`_|
|`Domestic double counting`|`8.36`|_`0.01`_|
|`Foreign content (FC)`|`27468.76`|_`25.60`_|
|`Foreign Value-Added (FVA)`|`27465.88`|_`25.60`_|
|`Foreign double counting`|`2.88`|_`0.00`_|

According to WIOD 2014 data, Chinese value-added potentially exposed to this tariff turns out to be around $79.8 billion, as shown by the value reported for the `Domestic Value-Added (DVA)` . This is higher than the $77.4 billion of Chinese value-added traced in the same export flow using an “exporting country” perspective (see the previous `icio` output above). Thus, if we had used the latter perspective, we would have understated the Chinese exposure. Again, each empirical question calls for the best suited perspective: the _default_ “exporting country” is more useful if the aim is to assess GVC participation or to retrieve measures of value-added trade consistent with the figures at a more aggregate level; the perspective in line with the selected trade flow is more suited to encompass the entire value-added that might be affected by a shock hitting that particular flow.

The same reasoning applies when the objective is to choose the best suited perspective for bilateral aggregate exports. Here the choice will be, again, between the _default_ “exporting country” perspective and the bilateral one. For example, Figure 4.9 of the World Bank World Development Report (WDR) 2020, reported here as Figure 1, aims at quantifying the potential exposure of other countries to a US-China trade war. In fact, US and Chinese exports embed a non-negligible amount of other countries foreign value-added that would be indirectly exposed to new tariffs. For instance, around 2% of the value-added in the Chinese exports to the United States consists of Japan’s GDP and almost 1.8% of the Republic of Korea’s GDP. In turn, around 2.5% of the value-added in the US exports to China is Canadian GDP. These numbers can be easily obtained using `icio` by selecting a bilateral perspective and retrieving the value-added by country of origin in a particular bilateral flow. The entire value-added, domestic and foreign, that crosses 22
the specific bilateral border where the new tariffs could be in place, i.e. the GDP potentially affected by trade barriers, can be computed using the following syntax ``` .*ReplicatedataofWDR2020Figure4.9 .icio_load,iciot(eora)year(2015) Loadingtableeora2015...loaded .icio,exp(chn)imp(usa)persp(bilat)output(va)origin(all)save(wdr_4_9a.xls) Decompositionofgrossexports: Perspective:bilateral Origin:ALL Exporter:CHN Importer:USA Output:Value-Added ```

||`Millions of $`|`% of export`|
|---|---|---|
|`AUS`|`2115.55`|_`0.57`_|
|`BEL`|`610.65`|_`0.17`_|
|`BRA`|`1046.77`|_`0.28`_|
|`CAN`|`955.66`|_`0.26`_|
|`CHE`|`977.48`|_`0.27`_|
|`DEU`|`4058.78`|_`1.10`_|
|`FRA`|`1919.28`|_`0.52`_|
|`GBR`|`1604.30`|_`0.44`_|
|`HKG`|`1489.18`|_`0.40`_|
|`IDN`|`1692.15`|_`0.46`_|
|`IND`|`1123.87`|_`0.31`_|
|`ITA`|`1564.26`|_`0.42`_|
|`JPN`|`7535.08`|_`2.05`_|
|`KOR`|`6554.82`|_`1.78`_|
|`MYS`|`1604.49`|_`0.44`_|
|`NLD`|`748.18`|_`0.20`_|
|`RUS`|`2208.83`|_`0.60`_|
|`SGP`|`1005.21`|_`0.27`_|
|`THA`|`964.69`|_`0.26`_|
|`USA`|`5126.99`|_`1.39`_|

``` Outputsavedas:wdr_4_9a.xlsintothecurrentworkingdirectory ``` ``` .icio,exp(usa)imp(chn)persp(bilat)output(va)origin(all)save(wdr_4_9b.xls) Decompositionofgrossexports: Perspective:bilateral Origin:ALL Exporter:USA Importer:CHN Output:Value-Added ```

||`Millions of $`|`% of export`|
|---|---|---|
|`AUS`|`235.58`|_`0.18`_|
|`BRA`|`361.65`|_`0.28`_|
|`CAN`|`3326.80`|_`2.56`_|
|`CHE`|`295.33`|_`0.23`_|
|`CHN`|`2322.90`|_`1.79`_|
|`DEU`|`1255.74`|_`0.97`_|
|`FRA`|`559.10`|_`0.43`_|
|`GBR`|`649.05`|_`0.50`_|

23
|`IND`|`294.56`|_`0.23`_|
|---|---|---|
|`ITA`|`438.06`|_`0.34`_|
|`JPN`|`1293.39`|_`1.00`_|
|`KOR`|`541.96`|_`0.42`_|
|`MEX`|`1288.42`|_`0.99`_|
|`MYS`|`274.08`|_`0.21`_|
|`NGA`|`230.40`|_`0.18`_|
|`NLD`|`249.97`|_`0.19`_|
|`RUS`|`501.60`|_`0.39`_|
|`SAU`|`232.88`|_`0.18`_|
|`TTO`|`271.61`|_`0.21`_|
|`VEN`|`1547.39`|_`1.19`_|

``` Outputsavedas:wdr_4_9b.xlsintothecurrentworkingdirectory ``` As in Figure 1, we deliberately reported in the above Stata output only the 20 countries with the highest foreign value-added in the bilateral exports between the United States and China. Actually, by running the previous syntax, `icio` would report also the value-added of the other countries in the EORA MRIO database. Since the complete list is very long, the user may find it useful to exploit the `save()` option. As can be seen, by adding this option, the complete `icio` output has been saved into a file called `wdr_4_9b.xls` within the current working directory.

Lastly, we consider the analysis of value-added in the total imports of a country. To quantify the German GDP potentially exposed to US tariffs vis-`a-vis all partners, according to WIOD 2014 data, we can use the following syntax ``` .icio_load Loadingtablewiod2014...loaded .icio,origin(deu)imp(usa)output(va) Decompositionofgrossimports: Perspective:importer Importer:USA Origin:DEU Exporter:totalUSAimports Output:Value-Added ```

||`Millions of $`|`% of import`|
|---|---|---|
|`Value-Added`|`133064.91`|_`5.53`_|

The Stata output indicates that around $133 billion of Germany’s value-added are imported, directly and indirectly, by the United States (around 5.5% of the total US imports), and thus could be exposed to US trade barriers, according to WIOD 2014 data. German GDP exposure to these trade barriers can be computed taking the ratio with respect to the total German GDP - obtained with `icio, origin(deu)` . Thus, around 3.7% of German GDP could be affected by these 24
Figure 1: Replication of World Bank WDR 2020 Figure 4.9.

**Figure 4.9** The multilateral dimension of the U.S.–China trade war

<!-- Start of picture text --> a. Chinese exports to United States: Share of value added by Chinese trade partner, 2015<br>2.5<br>2.0<br>1.5<br>1.0<br>0.5<br>0<br>b. U.S. exports to China: Share of value added by U.S. trade partner, 2015<br>3.0<br>2.5<br>2.0<br>1.5<br>1.0<br>0.5<br>0<br>JapanKorea, Rep.United StatesGermanyRussian FederationAustralia FranceIndonesiaMalaysiaUnited KingdomHong Kong SAR, ChinaItaly India BrazilSingaporeSwitzerlandThailandCanadaNetherlands Belgium<br>Canada ChinaVenezuela, RB Japan MexicoGermanyUnited Kingdom FranceKorea, Rep.Russian Federation Italy BrazilSwitzerland IndiaTrinidad and TobagoMalaysia NetherlandsAustraliaSaudi Arabia Nigeria<br>Value added (%)<br>Value added (%)<br><!-- End of picture text --> 25
US trade barriers. In a GVC world, the GDP exposure to a trade barrier could be direct - through the country’s exports to the economy that has imposed the trade restrictive measure - or indirect - through the exports of other countries. The former can be computed looking at the German GDP directly exported to the United States, running: `icio, origin(deu) exporter(deu) importer(usa) perspective(bilateral) output(va)` . Thus, 2.8% of German GDP could be directly affected by US tariffs, while 0.9% could be affected through other countries exports to the US of German products.

If the goal is to quantify the potential exposure of German value-added to a US tariff on a specific sector, e.g. motor vehicles from Germany, a sectoral-importer perspective is the right choice: ``` .icio,origin(deu,20)imp(usa,20)output(va) Decompositionofgrossimports: Perspective:sectimp Importer:USA Origin:DEU Exporter:totalUSAimports Output:Value-Added Sectorofimport:20 Sectoroforigin:20 ```

||`Millions of $`|`% of import`|
|---|---|---|
|`Value-Added`|`17216.14`|_`6.59`_|

``` .matGDPsect=r(va) .icio,origin(deu,20) Value-Addedbyorigin/destination: Origin:DEU Output:Value-Added Sectoroforigin:20 ```

||`Millions of $`|`% of total`|
|---|---|---|
|`Value-Added`|`147493.71`|_`100.00`_|

``` .matGDPtot=r(vby) ``` ``` .di"Germanyexposureinsector20:"GDPsect[1,1]/GDPtot[1,1]*100"%" Germanyexposureinsector20:11.672456% ``` Again, the relative exposure can be easily obtained taking the ratio of the absolute exposure ($17.2 billion) with respect to the total German value-added in the motor vehicles industry ($147.5 billion). Thus, a US tariff hitting motor vehicles imports from Germany might affect around 11.7% of the value-added produced in the same sector in Germany.

26
Other examples of questions that could be answered using `icio` for the analysis of value-added trade are:

- _Which part of a country’s total exports is home produced, i.e. is domestic GDP?_ `icio, exporter(deu) output(dva)`

- _Which part of a country’s total exports can be traced back to other countries GDP?_ `icio, exporter(deu) output(fva)`

- _Where the foreign value-added in German exports is produced?_ `icio, origin(all) exporter(deu) output(fva)`

- _Considering the bilateral exports from Italy to Germany, where the Italian GDP (domestic VA) re-exported by Germany is absorbed?_ `icio, exporter(ita) importer(deu) destination(all) output(dva)`

- _How can be obtained the complete breakdown by origin and destination of the value-added (both domestic and foreign) for Chinese exports to the US?_ `icio, origin(all) exporter(chn) importer(usa) destination(all) output(va) save(CHN_to_USA.xls)`

- _How can the (corrected) Koopman et al. (2014) decomposition be retrieved using icio?_

``` icio,exporter(deu)perspective(world)approach(sink) ```

- _Which is the Chinese GDP that at any point in time, passes through a certain bilateral trade flow, say Chinese exports to the United States? In other terms, what is the Chinese GDP potentially exposed to US tariffs on imports from China?_

``` icio,exp(chn)imp(usa)persp(bilat)output(dva) ```

- _Which is the German GDP potentially exposed to US trade barriers on all imports?_

``` icio,origin(deu)imp(usa)persp(importer)output(va) ```

- _Which is the German GDP that could be affected by US tariffs on imports in sector 20?_

``` icio,origin(deu)imp(usa,20)persp(sectimp)output(va) ``` 27
- _Which is the exposure of US GDP to a Chinese tariff on US imports in sector 17?_

``` icio,exp(usa,17)imp(chn)persp(sectbil)output(dva) ```

- _To what extent are Italian sectors exposed to a shock on German’s exports in sector 20?_

``` icio,origin(ita,all)exp(deu,20)persp(sectexp)output(va) ```

# **5 Measuring GVC-related exports**

Following the original idea by Hummels et al. (2001), many contributions in the literature have shared the view that the trade flow related to GVC activity should consist in goods and services crossing more than one border along the production process. Borin and Mancini (2015) made this definition operational by proposing a way to isolate traditional trade from gross flows (i.e. the portion of trade crossing just one border) and considering the remaining part as a proxy of the GVC related trade. This GVC indicator presents three desirable features : _i_ ) it is bounded between 0 and 1, since it traces within a particular trade flow the share of it related to GVC activity, i.e., the numerator is a sub-component of the denominator; _ii_ ) it is additive at any level of aggregation/disaggregation of trade flows; thus, data can be summed at any level (total country exports/world exports/world sector exports/country groups) in order to obtain the proper GVC participation measures at the desired level of aggregation; _iii_ ) it can be broken down into two additive terms, i.e. a ‘backward’ component corresponding to import content of exports and a “forward” component, which measures the part of domestic production that is supplied to the importing country to be processed and re-exported.

In Appendix F we provide its conceptual framework while in Section 5.1 we show how to compute GVC measures in `icio` and present some examples.

## **5.1 Implementation: GVC in exports**

To compute GVC measures with `icio` , the user needs to select: _i_ ) the desired trade flow and _ii_ ) the appropriate GVC measure to be computed (overall, backward or forward participation). The option `perspective(exporter)` is in this case imposed, since only this perspective allows to distinguish between the value of trade crossing just one border and the value of trade further re-exported, i.e. GVC trade.

28
# **5.1.1 Syntax**

The `icio` syntax for the different export flows is the following:

# 1. **GVC participation in total exports of a country:**

- a) GVC participation in **total aggregate exports** :

- `icio, exporter(` _country_ _~~c~~ ode_ `) [` _output_ _~~g~~ vc_ `] [` _origin_ _~~d~~ estination_ `] [` _standard_ _~~o~~ ptions_ `]`

- b) GVC participation in **total sectoral exports** :

- `icio, exporter(` _country_ _~~c~~ ode_ `[,` _sector_ _~~c~~ ode_ `]) [` _output_ _~~g~~ vc_ `]`

- `[` _origin_ _~~d~~ estination_ `] [` _standard_ _~~o~~ ptions_ `]`

# 2. **GVC participation in bilateral exports:**

- a) GVC participation in **bilateral aggregate exports** :

- `icio, exporter(` _country_ _~~c~~ ode_ `) importer(` _country_ _~~c~~ ode_ `) [` _output_ _~~g~~ vc_ `] [` _origin_ _~~d~~ estination_ `] [` _standard_ _~~o~~ ptions_ `]`

- b) GVC participation in **bilateral sectoral exports** :

- `icio, exporter(` _country_ _~~c~~ ode_ `[,` _sector_ _~~c~~ ode_ `]) importer(` _country_ _~~c~~ ode_ `) [` _output_ _~~g~~ vc_ `] [` _origin_ _~~d~~ estination_ `] [` _standard_ _~~o~~ ptions_ `]`

The `output()` option, i.e. `[` _output_ _~~g~~ vc_ `]` in the reported syntax, allows to get different measures of GVC-related trade by specifying `gvc` , `gvcb` and `gvcf` as arguments for total, backward and forward GVC indicators, respectively. As can be noted from the `icio` results reported in Section 4.1.3, GVC-related indicators are routinely reported as part of the detailed output, when an export flow-at any level of aggregation-is specified.

Also for GVC indicators it is possible to single out the country/sector where the goods/services were originally produced by specifying the `origin(` _country_ _~~-~~ code_ `[,` _sector_ _~~c~~ ode_ `])` option, as well as the market/sector where the goods/services are absorbed in final demand by specifying the `destination(` _country_ _~~c~~ ode_ `[,` _sector_ _~~-~~ code_ `])` option.

# **5.1.2 Examples: GVC-related exports**

Figure 1.13 of the World Bank WDR 2020, here reported as Figure 2, is based on EORA MRIO 1990 and 2015 data and shows the GVC-related trade in agriculture (sectors 1 and 2 in EORA) and agri-food sectors (sector 4 in EORA). For instance, in the case of Tanzania, one of the Sub-Saharan African countries that experienced 29
a significant increase in GVC participation in the agri-food sector, the data used for plotting panel b. of Figure 2 can be obtained by using the following syntax ``` .*ReplicatedataofWDR2020Figure1.13panelb .icio_load,iciot(eora)year(2015) Loadingtableeora2015...loaded .icio,exp(tza,4)output(gvc) ``` ``` Decompositionofgrossexports: Perspective:exporter Exporter:TZA Importer:totalTZAexports Output:GVC-relatedtrade Sectorofexport:4 ```

||`Millions of $`|`% of export`|
|---|---|---|
|`GVC`|`93.22`|_`52.74`_|

``` .icio_load,iciot(eora)year(1990) Loadingtableeora1990...loaded .icio,exp(tza,4)output(gvc) ``` ``` Decompositionofgrossexports: Perspective:exporter Exporter:TZA Importer:totalTZAexports Output:GVC-relatedtrade Sectorofexport:4 ```

||`Millions of $`|`% of export`|
|---|---|---|
|`GVC`|`38.80`|_`33.53`_|

In Figure B.2.1.1 of the WDR 2020, Vietnam’s integration in the electronics global value chain is discussed. Panel a, here reported as Figure 3, is based on the EORA MRIO database and shows the GVC-backward related trade, i.e. backward integration, in the electrical and machinery sector. Data for 2015 can be obtained running: ``` .*ReplicatedataofWDR2020FigureB.2.1.1panela .icio_load,iciot(eora)year(2015) Loadingtableeora2015...loaded .icio,exp(vnm,9)output(gvcb) Decompositionofgrossexports: Perspective:exporter Exporter:VNM Importer:totalVNMexports Output:GVC-backwardrelatedtrade Sectorofexport:9 Millionsof$%ofexport ``` 30
<!-- Start of picture text --> GVC backward 859.70 64.32<br><!-- End of picture text --> Figure 2: Replication of World Bank WDR 2020 Figure 1.13.

**Figure 1.13** GVCs expanded in both the agriculture and food industries from 1990 to 2015

<!-- Start of picture text --> a. Agriculture GVCs b. Agri-food GVCs<br>60 90<br>80<br>50<br>VNM RWA GHA 70<br>40 ETH KEN 60 HUN TZA<br>50 SRB<br>30 LAO GMB<br>40<br>SSD BGR<br>20 LBN 30 ETH<br>YEM 20<br>10<br>10<br>0 0<br>0 10 20 30 40 50 60 0 10 20 30 40 50 60 70 80<br>Agriculture GVC participation, 1990 (%) Agri-food GVC participation, 1990 (%)<br>East Asia and Pacific Europe and Central Asia Latin America and the Caribbean<br>Middle East and North Africa North America South Asia<br>Sub-Saharan Africa<br>Agriculture GVC participation, 2015 (%) Agri-food GVC participation, 2015 (%)<br><!-- End of picture text --> Figure 3: Replication of World Bank WDR 2020 Figure B2.1.1.

<!-- Start of picture text --> a. Backward integration of<br>electronics and machinery as a<br>share of gross exports<br>80<br>70<br>60<br>50<br>40<br>30<br>20<br>10<br>0<br>2000 2005 2010 2015<br>Percent<br><!-- End of picture text --> Throughout the WDR 2020, several figures on GVC-related trade at the world level are reported. These measures can be obtained with `icio` retrieving and then summing the GVC-related trade of each country in the loaded input-output table. Since this could be computationally intensive, we have also released a data set with GVC indicators and the most relevant measures of value-added in trade flows 31
computed for any country/sector for each database available in `icio` . This database is available on the official WDR 2020 website in the data section.<sup>17</sup> Other basic examples of questions on GVC participation and the related syntax are:

- _Which share of the German exports related to GVC is produced in Italy?_ `icio, origin(ita) exporter(deu) output(gvc)`

- _Which share of the German exports is related to backward and forward GVC?_ `icio, exporter(deu) output(gvcb) icio, exporter(deu) output(gvcf)`

# **6 Conclusions**

In this paper we described the new Stata command `icio` for value-added trade and GVC analysis. It’s most important features are the following:

- It exploits the most famous Inter-Country Input-Output (ICIO) tables - the World Input-Output Database (Timmer et al. 2015), the OECD TiVA database (OECD), and the Eora Global Supply Chain Database (Lenzen et al. 2013) - but also allows to load any user-provided ICIO table.

- It provides breakdowns of aggregate, bilateral and sectoral exports and imports according to the source and the destination of their value-added content, with a careful treatment of double counted items. These decompositions can be used to:

- assess the exposure of countries/sectors to different kind of trade shocks, including tariffs.

- get indicators for any level of disaggregation of trade flows that are consistent with more aggregate measures, i.e. disaggregated indicators can be summed up to get correct measures in more aggregate trade flows.

- It can break down export flows in terms of “traditional” vs GVC-trade, at any level of aggregation, also distinguishing between backward and forward participation in GVC.

> 17Go to https://www.worldbank.org/en/publication/wdr2020/brief/world-development-report2020-data.

32
- It is flexible and open, as we plan to release updates to include new ICIO database, as soon as the data become available, as well as other measures to assess the participation and position of countries and sectors in GVCs and trade policy analysis.

It is worth noting that the measures computed with `icio` , as any other measure obtained from ICIO tables, suffer from some limitations (Antr`as, 2019). In fact, ICIO tables are built under the strong proportionality assumptions, i.e. all output within each country-industry is built with the same input mix (de Gortari, 2019). However, input-output datasets will soon start exploiting customs data to allow for more heterogeneity in production and trade (United Nations, 2018). Once ICIO tables become more detailed, value-added trade measures obtained with the different perspectives featured in `icio` will diverge more and more, making it even more important to have available the best suited accounting framework to answer each specific empirical question.

33