%2multibyte Version: 5.50.0.2953 CodePage: 65001

\documentclass[12pt]{article}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{setspace}
\usepackage{geometry}
\usepackage{fancyhdr}
\usepackage{harvard}
\usepackage{sectsty}
\usepackage{endnotes}
\usepackage{graphicx}
\usepackage{float}

\setcounter{MaxMatrixCols}{10}
%TCIDATA{OutputFilter=LATEX.DLL}
%TCIDATA{Version=5.50.0.2953}
%TCIDATA{Codepage=65001}
%TCIDATA{<META NAME="SaveForMode" CONTENT="1">}
%TCIDATA{BibliographyScheme=Manual}
%TCIDATA{LastRevised=Friday, December 02, 2016 18:13:16}
%TCIDATA{<META NAME="GraphicsSave" CONTENT="32">}
%TCIDATA{Language=American English}

\setlength{\footnotesep}{11.0pt}
\renewcommand{\baselinestretch}{2}
\newtheorem{theorem}{Theorem}
\newtheorem{acknowledgement}[theorem]{Acknowledgement}
\newtheorem{algorithm}[theorem]{Algorithm}
\newtheorem{axiom}[theorem]{Axiom}
\newtheorem{case}[theorem]{Case}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{conclusion}[theorem]{Conclusion}
\newtheorem{condition}[theorem]{Condition}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{criterion}[theorem]{Criterion}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{solution}[theorem]{Solution}
\newtheorem{summary}[theorem]{Summary}
\newenvironment{proof}[1][Proof]{\textbf{#1.} }{\ \rule{0.5em}{0.5em}}
\geometry{left=1in,right=1in,top=1in,bottom=1in}
\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\thesubsection}{\Alph{subsection}}
\graphicspath{{C:/Users/tenreyro/Dropbox/impvol/Finalversion/impvol_text/}}
\input{tcilatex}
\begin{document}

\title{Diversification through Trade \thanks{%
For helpful comments and conversations, we would like to thank Costas
Arkolakis, Fernando Broner, Ariel Burstein, Lorenzo Caliendo, Julian
DiGiovanni, Bernardo Guimaraes, Nobu Kiyotaki, Pete Klenow, David Laibson,
Fabrizio Perri, Steve Redding, Ina Simonovska, Jaume Ventura, Romain
Wacziarg, and seminar participants at Bocconi, Birmingham, CREI, Princeton,
Penn, Yale, NYU, UCL, LBS, LSE, Toulouse, Warwick, as well as participants
at SED, ESSIM, and the Nottingham trade conference. Calin Vlad Demian,
Federico Rossi, and Peter Zsohar provided superb research assistance.
Caselli acknowledges financial support from the Luverlhume Fellowship. Koren
acknowledges financial support from the European Research Council (ERC)
starting grant 313164. Tenreyro acknowledges financial support from the ERC
starting grant 240852. \newline
$^{\dag }$ London School of Economics, CEP, CfM, CEPR. $^{\flat }$ NBER. $%
^{\ddag }$ Central European University, MTA KRTK, CEPR. $^{\S }$ European
Comission. Corresponding author: Tenreyro, s.tenreyro@LSE.ac.uk.} }
\author{Francesco Caselli$^{\dag ,\flat }$ \and Miklos Koren$^{\ddag }$ \and %
Milan Lisicky$^{\S }$ \and Silvana Tenreyro$^{\dag }$}
\date{This draft: July 2015}
\maketitle

\begin{abstract}
A widely held view is that openness to international trade leads to higher
GDP volatility, as trade increases specialization and hence exposure to
sector-specific shocks. We revisit the common wisdom and argue that when
country-wide shocks are important, openness to international trade can lower
GDP volatility by reducing exposure to domestic shocks and allowing
countries to diversify the sources of demand and supply across countries.
Using a quantitative model of trade, we assess the importance of the two
mechanisms (sectoral specialization and cross-country diversification) and
provide a new answer to the question of whether and how international trade
affects economic volatility.
\end{abstract}

\section{Introduction}

An important question at the crossroads of macro-development and
international economics is whether and how openness to trade affects
macroeconomic volatility. A widely held view in academic and policy
discussions, which can be traced back at least to Newbery and Stiglitz
(1984), is that openness to international trade leads to higher GDP
volatility. The origins of this view are rooted in a large class of theories
of international trade predicting that openness to trade increases
specialization. Because specialization (or lack of diversification) in
production tends to increase a country's exposure to shocks specific to the
sectors (or range of products) in which the country specializes, it is
generally inferred that trade increases volatility.\ This view seems present
in policy circles, where trade openness is often perceived as posing a
trade-off between the first and second moments (i.e., trade causes higher
productivity at the cost of higher volatility).\footnote{%
See for example the report on \textquotedblleft Economic openness and
economic prosperity: trade and investment analytical
paper\textquotedblright\ (2011), prepared by the U.K. Department of
International Development.}

This paper revisits the common wisdom on two conceptual grounds. First, the
paper points out that the existing wisdom is strongly predicated on the
assumption that sector-specific shocks (hitting a particular sector) are the
dominant source of GDP volatility. The evidence, however does not support
this assumption. Indeed, country-specific shocks (shocks common to all
sectors in a given country) are at least as important as sector-specific
shocks in shaping countries' volatility patterns (e.g. Koren and Tenreyro,
2007)\footnote{%
See also Stockman (1988)'s study of volatility based on seven industrialized
countries and Costello (1993)'s study based on five industrialized
countries. Both authors find that country-specific shocks are more important
than sector-specific shocks in shaping volatility patterns. Using a wider
sample of countries and a different method, Koren and Tenreyro (2007)
confirm these results and find that the relative weight of country-specific
shocks is even more relevant in less developed economies.}. The first
contribution of this paper is to show analytically that when
country-specific shocks are an important source of volatility, openness to
international trade can lower GDP volatility. In particular, openness
reduces a country's exposure to domestic shocks, and allows it to diversify
its sources of demand and supply, leading to potentially lower overall
volatility. This is true as long as the volatility of shocks affecting
trading partners are not too big, or the covariance of shocks across
countries is not too large. In other words, we show that the sign and size
of the effect of openness on volatility depends on the variances and
covariances of shocks across countries.

The paper furthermore questions the mechanical assumption that higher
sectoral specialization per se leads to higher volatility. Indeed, whether
GDP volatility increases or decreases with specialization depends on the
intrinsic volatility of the sectors in which the economy specializes in, as
well as on the covariance among sectoral shocks and between sectoral and
country-wide shocks.

We make these points in the context of a quantitative, multi-sector,
stochastic model of trade and GDP determination. The model builds on a
variation of Eaton and Kortum (2002), Alvarez and Lucas (2006), and Caliendo
and Parro (2012), augmented to allow for country-specific, and
sector-specific shocks. In each sector, production combines equipped labour
with a variety of tradable inputs. Producers source tradable inputs from the
lowest-cost supplier (where supply costs depend on the supplier's
productivity as well as trade costs), after productivity shocks have been
realized. This generates the potential for trade to \textquotedblleft
insure\textquotedblright\ against shocks, as producers can redirect input
demand to countries experiencing positive supply shocks. However, (equipped)
labor must be allocated to sectors before productivity shocks are realized.
This friction allows us to capture the traditional specialization channel,
because it reduces a country's ability to respond to sectoral shocks by
reallocating resources to other sectors. An extension of the model allows
for ex-post sectoral reallocation of equipped labour in the presence of
reallocation costs.

We use the model in conjunction with sector-level production and bilateral
trade data for a diverse group of countries to quantitatively assess how
changes in trading costs since the early 1970s have affected GDP volatility.%
\footnote{%
The data are disaggregated into 24 sectors. We stop the analysis in 2007 as
our model abstracts from the factors underlying the financial crisis.} The
quantitative exercise uses as inputs the stochastic properties of
country-specific sectoral productivity shocks, which we back out from the
model on the basis of sector-level data on gross output, value added, and
bilateral trade flows data. To assess the effect of changes in trade
barriers since the 1970s we also back out country-and-sector specific paths
of trade costs.

We find that the decline in trade costs since the 1970s has caused sizeable
reductions in GDP volatility in 80 percent of the countries in our sample,
while it led to modest increases in volatility in the rest. The range of
changes in volatility varies significantly across countries, with Ireland,
the Netherlands, Belgium-Luxembourg, and Norway experiencing the largest
reductions in volatility and Greece and Italy experiencing the biggest
increases. The general decline in volatility due to trade is the net result
of the two different mechanisms discussed above, sectoral specialization,
and country-wide diversification. The country-wide diversification mechanism
contributed to lower volatility in 90 percent of the countries in our
sample, indeed suggesting that there is scope for diversification through
trade. Equally interestingly, and against conventional wisdom, higher
sectoral specialization does not always lead to higher volatility: Austria,
Belgium-Luxembourg, Canada, India, the Netherlands, Norway, South Korea, and
Sweden, all experienced a decline in volatility due to the trade-induced
change in sectoral specialization. For over two thirds of the countries,
however, the sectoral-specialization channel contributed to increased
volatility. As with the overall net effect of trade on volatility, the
relative importance of the two mechanisms we highlight varies across
countries, though the effect of the specialization mechanism is on average
smaller than the effect of the diversification mechanism.

To summarize, our study challenges the standard view that trade increases
volatility. It highlights a new mechanism (country diversification) whereby
trade can lower volatility. It also shows that the standard mechanism of
sectoral specialization---usually deemed to increase volatility---can in
certain circumstances lead to lower volatility. The analysis indicates that
diversification of country-specific shocks has generally led to lower
volatility during the period we analyze, and has been quantitatively more
important than the specialization mechanism.

As the model and quantitative results illustrate, openness to trade does not
always causes an unambiguous effect on volatility: the sign and size of the
effect varies across countries. This result might partly explain why direct
empirical evidence on the effect of openness on volatility has yielded mixed
results. Some studies find that trade decreases volatility (e.g., Cavallo,
2008; Strotmann, D\"{o}pke, and Buch, 2006; Burgess and Donaldson, 2015;
Parinduri, 2011), while others find that trade increases it (e.g., Rodrik,
1998; Easterly, Islam, and Stiglitz, 2000; Kose, Prasad, and Terrones, 2003;
and di Giovanni and Levchenko, 2009). The model-based analysis can
circumvent the problem of causal identification faced by many empirical
studies, allowing for counterfactual exercises that isolate the effect of
trade costs on volatility. Moreover, it can cope with highly heterogenous
trade effects across countries.

Before proceeding, we should emphasize that we focus the analysis on GDP
volatility because for most countries in the world, GDP and consumption
fluctuations are almost perfectly correlated. Hence, accounting for GDP
volatility goes a long way in accounting for consumption volatility.
Accordingly, in the modeling section, we abstract from financial trade in
assets.\footnote{%
There is an obvious analogy between diversification through trade in goods
and diversification through trade in financial assets. However, trade in
assets stabilizes consumption, not GDP (indeed, trade in assets might
increase GDP volatility, as capital would tend to flow to high productivity
countries and amplify productivity shocks), whereas in contrast, trade in
goods stabilizes GDP---and as a by-product, also consumption. Given the high
comovement between consumption and output in the data,\ in practice there
appears to be limited asset diversification across countries.}

The remainder of the paper is organized as follows. Section II reviews the
literature. Section III presents the model and solves analytically for two
special cases, autarky and costless free trade. Section IV introduces the
data and calibration. Section V presents the quantitative results and
studies an extension of the model that allows ex post reallocation of
equipped labour across sectors in the presence of adjustment costs. Section
VI presents concluding remarks. The Appendix contains further derivations
and a detailed description of the datasets used in the paper.

\section{Literature Review}

A number of empirical studies have exploited variation across countries to
assess the effects of trade openness on volatility. Some studies, most
notably Rodrik (1998), Easterly, Islam, and Stiglitz (2000), Kose, Prasad,
and Terrones (2003) find that trade openness increases volatility, while
others, including Haddad, Lim and Saborowski (2010), Cavallo (2008), and
Bejan (2006) find that trade openness decreases volatility. Di Giovanni and
Levchenko exploit variation across countries and across sectors, concluding
that trade openness leads to higher volatility. Strotmann, D\"{o}pke, and
Buch (2006) exploit variation across firms in Germany and infer that
exposure to international trade increases firm-level and aggregate
volatility. While the use of sector- or firm-level data allows researchers
to control for a number of country-specific determinants of volatility,
omitted-variable biases at higher levels of aggregation, reverse causality,
and possibly heterogenous effects of trade openness across countries remain
important concerns.\footnote{%
Trade is by no means the only determinant of volatility. For studies of
other determinants of volatility, see Kose, Prasad, and Terrones (2003),
Raddatz (2006), Koren and Tenreyro (2007, 2011, 2013), Berrie, Bonomo and
Carvalho (2013), and the references therein.}

To understand the causal effect of trade openness on volatility, we build on
a variation of the theoretical model formulated by Eaton and Kortum (2002),
further extended by Alvarez and Lucas (2006) and Caliendo and Parro (2012).
The model is amenable to quantitative calibration and has proven useful at
replicating trade flows and production patterns across countries. Variations
of this model have been used to address a number of questions in
international economics---questions related to the effects of trade on the
\textquotedblleft first moments\textquotedblright\ of domestic or foreign
productivity, but not the trade effects on countries' aggregate volatility.
For example, Hsieh and Ossa (2011) study the spillover effects of China's
growth on other countries; di Giovanni, Levchenko, and Zhang (2014) study
the global welfare impact of China's trade integration and technological
change; Levchenko and Zhang (2013) investigate the impact of trade with
emerging countries on labour markets; Burstein and Vogel (2012) and Parro
(2013) study the effect of international trade on the skill premium;
Caliendo, Rossi-Hansberg, Parro, and Sarte (2013) study the impact of
regional productivity changes on the U.S. economy, and so on.\footnote{%
For other appliations, see also Costinot, Donaldson and Komunjer (2012) and
Levchenko and Zhang (2014).} None of these applications, however, focuses on
the impact of openness to trade on volatility. The closest paper to ours,
both on question and modelling framework, is Burgess and Donaldson (2012),
who use the Eaton-Kortum model in conjunction with data on the expansion of
railroads across regions in India to assess whether real income became more
or less sensitive to rainfall shocks, as India's regions became more open to
trade. The authors find that the decline in transportation costs lowered the
impact of productivity shocks on real income, implying a reduction in
volatility. Our analysis highlights that, while a reduction in volatility
has been experienced by many countries as they became more open to trade,
the size and sign of the trade effect on volatility may be--- and indeed has
been---different across different countries.\footnote{%
Though similar in question and modelling framework, the quantiative approach
carried out in our paper is very different from that adopted for India by
Burgess and Donaldson (2012).}$^{,}$\footnote{%
See also Donaldson (2015), where the question also is addressed in the
context of India's railroad expansion. There is\ also a growing literature
on the effect of globalization on income risk and inequality. We do not
focus on distributional effects within countries in this paper, though it is
obviously a very important issue, and a natural next step in our research.
For theoretical developments in that area, see for example, Anderson (2011)
and the references therein.}

Our results also relate to Wacziarg and Wallack (2004), who empirically
study 25 episodes of trade liberalizations and find a relatively small
extent of labour reallocation across sectors. Though the authors do not
analyze volatility patterns, their results are consistent with our finding
that, on average, the sectoral-specialization channel tends to be of limited
quantitative importance; our results, however, point out to significant
heterogeneity in the effects, indicating that the sectoral specialization
channel played an important role in certain countries, most notably Italy
and the Netherlands.

Our paper is also related to the seminal contribution of Backus, Kehoe, and
Kydland (1992). The authors show that in a real-business-cycle setting, GDP
volatility is higher in the open economy than in the closed economy, as
capital inputs are allocated to production in the country with the most
favorable technology shock. In other words, GDP fluctuations are amplified
in an open economy. (In contrast, consumption volatility decreases in the
open economy, as financial markets allow countries to smooth the impact of
GDP shocks on consumption; this result generates a large cross-country
correlation of consumption relative to\ the cross-country correlation of
output, which, as the authors point out, is not borne out by the data.) In
our multi-country, multi-sector setting, instead, GDP volatility can---and
often does---decrease with openness, as intra-temporal trade in inputs
allows countries with less favorable productivity shocks to source inputs
from abroad, thus reducing GDP (as well as consumption) volatility.\footnote{%
A number of papers have tried to address the comovement \textquotedblleft
anomaly\textquotedblright\ pointed out by Backus, Kehoe, and Kydland (1992),
that is, the result that cross-country consumption correlations increase vis-%
\`{a}-vis cross output correlations in the open economy; see, for example,
Stockman and Tesar (1995). In this paper, we focus on the effect of trade on
output volatility and refer readers interested in the comovement puzzle to
the complementary literature.} Also related is the empirical literature
initiated by Frankel and Rose (1998), who documented a strong correlation
between bilateral trade flows and GDP comovements between pairs of
countries. Our main focus in this paper is on the \textit{causal} effect of
trade on \textit{volatility}---and the channels mediating this effect---but
the quantitative approach we follow in our counterfactual exercise can
potentially be extended to also identify the \textit{causal }effect of trade
on bilateral comovement---and indeed, other higher-order moments. We keep
the focus on volatility, which is our main motivation, and speak to the
perennial question of how trade might affect it.\footnote{%
For studies on the effect of bilateral trade on bilateral comovement, see
Kose and Yi (2001), Arkolakis and Ramanarayanan (2008), and the references
therein.}

\section{A Model of Trade with Stochastic Shocks}

The baseline model builds on a multi-sector variation of Eaton and Kortum
(2002), Alvarez and Lucas (2006), and Caliendo and Parro (2012), augmented
to allow for stochastic shocks, as well as frictions to the allocation of
non-produced (and non-traded) inputs across sectors.

\subsection{Model Assumptions}

The world economy is composed of $N$ countries. At a given point in time $t$%
, each country $n$ is endowed with $L_{nt}$ units of a primary (non
produced) input, which we interpret as equipped labour. There are $J$
sectors (or broad classes of goods) in the economy, whose output is combined
into a final good through a Cobb-Douglas aggregate. In formulas, aggregate
gross output in the economy is given by:
\begin{equation}
Q_{nt}=\prod\nolimits_{j=1}^{J}\left( Q_{nt}^{j}\right) ^{\alpha ^{j}}
\label{aggregate}
\end{equation}%
where $Q_{t}^{j}$ is the gross output in sector $j$ and $\sum_{j=1}^{J}%
\alpha ^{j}=1$. Competitive firms in each sector $j$ produce a composite
good according to the following constant-elasticity-of-substitution (CES)
technology:
\begin{equation}
Q_{nt}^{j}=\left[ \int_{0}^{1}q_{nt}(\omega ^{j})^{\frac{\eta -1}{\eta }%
}d\omega ^{j}\right] ^{\frac{\eta }{\eta -1}}  \label{sectoroutput}
\end{equation}%
where $q_{nt}(\omega ^{j})$ is the quantity of good $\omega ^{j}$ used by
country $n$ in sector $j$ at time $t$, and $\eta >0$ is the elasticity of
substitution across goods within a given sector. The intermediate goods $%
\omega ^{j}$ can be produced locally or imported from other countries.
Delivering a good from country $n$ to country $m$ in sector $j$ and time
period $t$ results in $0<\kappa _{mnt}^{j}\leq 1$ goods arriving at $m$; we
assume that $\kappa _{mnt}^{j}\geq \kappa _{mkt}^{j}\kappa _{knt}^{j}\quad
\forall m,n,k,j,t$ and $\kappa _{nnt}^{j}=1$. All costs incurred are net
losses.\footnote{%
In the calibration, the $\kappa $s will reflect all trading costs, including
tariffs; so implicitly we adopt the extreme assumption that tariff revenues
are wasted---or at least not rebated back to agents in a way that would
interact with the allocation of resources in the economy.} Under the
assumption of perfect competition, goods are sourced from the lowest-cost
producer, after adjusting for transport costs.

The technology for producing $q_{nt}(\omega ^{j})$ is given accordingly by
the country of origin ($m$) with the lowest cost (with $m=n$ when the good
is produced locally):
\begin{equation}
x_{mt}(\omega ^{j})=A_{mt}^{j}z_{m}(\omega ^{j})l_{mt}(\omega ^{j})^{\beta
^{j}}\prod\nolimits_{k=1}^{J}M_{mt}^{k}(\omega ^{j})^{\gamma ^{kj}}
\label{eqinput}
\end{equation}%
where $x_{mt}(\omega ^{j})$ is the production of good $\omega ^{j}$ by
country $m$ at time $t$, $M_{mt}^{k}(\omega ^{j})$ is the amount of the
composite good $k$ used by country $m$ to produce $x_{mt}(\omega ^{j})$
units of good $\omega ^{j}$ and $l_{mt}(\omega ^{j})$ is the corresponding
amount of equipped labour. The exponent $\gamma ^{kj}$ captures the share of
sector $k$ in the total production cost of sector $j$ and we assume constant
returns to scale: $\beta ^{j}+\sum_{k=1}^{J}\gamma ^{kj}=1$ for all $j$. As
such, the expression allows for a rich input-output structure.

Total factor productivity (TFP) levels vary across countries, sectors, and
goods. Specifically, each intermediate good $\omega ^{j}$ in sector $j$ of
country $n$ has a time-invariant idiosyncratic productivity factor $%
z_{n}(\omega ^{j})$ and a time-varying factor $A_{nt}^{j}$ common to all the
goods $\omega ^{j}$ in sector $j$. Building on the literature, we assume the
productivities $z_{n}(\omega ^{j})$ follow a sector-specific, time-invariant
Fr\'{e}chet distribution $F_{n}^{j}(z)=\exp (-T_{n}^{j}z^{-\theta })$. A
higher $T_{n}^{j}$ shifts the distribution of productivities to the right,
that is leading to probabilistically higher productivities. A higher $\theta
$ decreases the dispersion of the productivity distribution, and hence
reduces the scope for comparative advantage. Shocks to $A_{nt}^{j}$ over
time are interpreted as standard sectoral TFP shocks.

Only intermediate goods $\omega ^{j}$ are traded; final composites $%
Q_{nt}^{j}$ are not. These final goods are used directly by consumers and
also as inputs in the production process. Hence, market clearing in the good
markets implies:
\begin{equation*}
Q_{nt}^{j}=C_{nt}^{j}+\sum\nolimits_{k=1}^{J}\int_{0}^{1}M_{nt}^{j}(\omega
^{k})d\omega ^{k},
\end{equation*}%
where the integral aggregates over the unit-size continuum of goods $\omega
^{k}$ entering in the production of each sector's $k$ aggregate good.

Clearing in the input market within a sector implies:
\begin{equation*}
L_{nt}^{j}=\int_{0}^{1}l_{nt}(\omega ^{j})d\omega ^{j},
\end{equation*}%
where $l_{nt}(\omega ^{j})$ denotes the amount of equipped labour used in
the production of good $\omega ^{j}$ by country $n$. The (equipped) labour
allocated to each sector, $L_{nt}^{j},$ with $\sum%
\nolimits_{k=1}^{J}L_{nt}^{k}=L_{nt}$, are determined ex ante (before the
realization of the shocks). Specifically, we assume there is perfect
risk-sharing within a country, but no risk-sharing across countries.%
\footnote{%
To motivate the lack of risk-sharing across countries, see our earlier
discussion on the high comovement between consumption and output as well as
the high correlation between consumption and output volatility.} At the
beginning of each period, a representative consumer decides on the optimal
allocation of the primary input $L_{nt}$ into different sectors in order to
maximize the expected value of utility; then (stochastic) shocks to
productivity $A_{nt}^{j}$ are realized, equipped labour is reallocated
within a sector (but not across sectors), and production and consumption
take place. The lack of ex-post reallocation across sectors in a given
period aims at capturing the idea that in the short run, it is costly to
reallocate productive factors across sectors. Hence, ex post, $L_{t}^{j}$ is
fixed until $t+1.$\footnote{%
In the quantification, a period will be one year. This amounts to assuming
that it takes at least one year for resources to be reallocated across
sectors.} We relax this assumption in Section V, where we allow for ex post
sectoral reallocation of equipped labour. (The reallocation carries a
quadratic adjustment cost, which we calibrate to match sectoral reallocation
in the data.)

The representative consumer's budget constraint in each period is:
\begin{equation*}
P_{nt}C_{nt}=\sum\nolimits_{j=1}^{J}w_{nt}^{j}L_{nt}^{j}-S_{nt},
\end{equation*}%
where $P_{nt}$ is the price of the aggregate good in equation (\ref%
{aggregate}), $w_{nt}^{j}L_{nt}^{j}$ is the nominal value-added generated in
sector $j$, and $S_{nt}$ is an exogenously given current account surplus of
country $n$, with $\sum_{n}S_{nt}=0$ for all $t$. Lifetime utility is given
by
\begin{equation*}
U_{n}=\sum\nolimits_{t=0}^{\infty }\delta ^{t}u(C_{nt}),
\end{equation*}%
where $u^{\prime }>0$, $u^{\prime \prime }\leq 0$ and $\delta $ is the
discount factor. Because there is no intertemporal trade and no capital in
the economy, each period consumers maximize the expected static utility flow
$E\left[ u\left( C_{nt}\right) \right] $ and the equilibrium is simply a
sequence of static equilibria. In making his labor allocation decisions the
representative consumer takes into account the joint probability
distribution function of sectoral productivities, $A_{nt}^{j}$s. In the
analysis, we assume log utility and therefore the consumer solves:
\begin{equation}
L_{nt}^{j}=\arg \max E_{t-1}\left[ \ln \left( \frac{%
\sum_{j=1}^{J}w_{nt}^{j}L_{nt}^{j}}{P_{nt}}\right) \right]
,s.t.:\sum\nolimits_{j=1}^{J}L_{nt}^{j}=L_{nt},  \label{eq:log:utility}
\end{equation}%
where $E_{t-1}$ indicates that the expectation is taken before the
realization of period $t$ shocks. This\ maximization problem leads to the
following first-order conditions for the allocation of inputs to sectors:
\begin{equation}
\frac{L_{nt}^{j}}{L_{nt}}=E_{t-1}\left[ \frac{w_{nt}^{j}L_{nt}^{j}}{%
\sum_{k}w_{nt}^{k}L_{nt}^{k}}\right] ,\qquad \forall j,t.  \label{eq:FOC}
\end{equation}%
In words, the share of resources allocated to a given sector equals its
expected share in value added. To gain intuition on this expression note
that $1/\sum_{k}w_{nt}^{k}L_{nt}^{k}$ is the marginal utility of consumption
in period $t$; thus, more resources are allocated to higher value-added
sectors, after appropriately weighting by marginal utility. Consider, for
further intuition, a (small) sector whose productivity is negatively
correlated with the rest of the economy (that is, it has high value added
when the rest of the economy has low value added); in states of the world in
which overall income is low, the marginal utility of consumption $%
1/\sum_{k}w_{nt}^{k}L_{nt}^{k}$ will be high and hence the optimal
allocation entails allocating more resources to this sector.
(Log-linearizing this expression makes the role of second moments on the
allocation of resources clearer.) In the closed economy, the value-added
share is pinned down by the Cobb--Douglas coefficients $\alpha ^{j}\beta ^{j}
$, as with Cobb-Douglas technology there is no variation on expenditures
(and sales) shares---and log-utility implies the shares determine the
sectoral allocation of resources. In the open economy this result no longer
holds as a country's sectoral shares depend on its absolute and comparative
advantage as well as trading costs vis-\`{a}-vis other countries.

\subsection{Model Solution}

In an open economy inputs can potentially be sourced from different
countries. Delivering a unit of good $\omega ^{j}$ produced in country $m$
to country $n$ costs:
\begin{equation*}
p_{nmt}^{j}(\omega ^{j})=\frac{B^{j}\left( w_{mt}^{j}\right) ^{\beta
^{j}}\prod_{k=1}^{J}(P_{t}^{k})^{\gamma ^{kj}}}{A_{mt}^{j}\kappa
_{nmt}^{j}z_{m}(\omega ^{j})}
\end{equation*}%
where $B^{j}\left( w_{mt}^{j}\right) ^{\beta
^{j}}\prod_{k=1}^{J}(P_{t}^{k})^{\gamma ^{kj}}$ is the cost of the input
bundle in country of origin $m$, sector $j$, at time $t$,
with $B^j \equiv \left( \beta ^{j}\right) ^{-\beta ^{j}} \prod_{k=1}^J (\gamma^{kj})^{-\gamma^{kj}}$.
Because of perfect
competition, the price paid in country $n$, denoted $p_{nt}(\omega ^{j})$,
will be the minimum price across all $N$ potential trading partners: $%
p_{nt}^{j}(\omega ^{j})=\min \left\{ p_{nmt}^{j}(\omega ^{j});\text{ }%
m=1,...,N\right\} .$ Producers of the aggregate good in (\ref{aggregate})
minimize production costs taking prices as given. We assume the distribution
of efficiencies for any good $\omega ^{j}$ in sector $j$ and country $n$ are
independent across countries and sectors and follows a time-invariant Fr\'{e}%
chet distribution: $F_{n}^{j}(z)=\exp (-T_{n}^{j}z^{-\theta })$. Under this
assumption, the distribution of prices in sector $j$ of country $n$,
conditional on $\left\{ A_{mt}^{j}\right\} _{m=1,...N}$ is given by $%
G_{nt}^{j}(p)|_{\left\{ A_{t}^{j}\right\} }=\Pr (P_{nt}^{j}<p)=1-\exp \left[
-\Phi _{nt}^{j}p^{\theta }\right] $ where $\Phi
_{nt}^{j}=\sum_{m=1}^{N}T_{m}^{j}\left( \frac{B^{j}\left( w_{mt}^{j}\right)
^{\beta ^{j}}\prod_{k=1}^{J}(P_{t}^{k})^{\gamma ^{kj}}}{A_{mt}^{j}\kappa
_{nmt}^{j}}\right) ^{-\theta }$. Given that there is a continuum of $\omega
^{j}$ in each sector, by the law of large numbers the probability that
country $m$ provides a good in sector $j$ at the lowest price in country $n$
equals the fraction of goods that country $n$ buys from country $m$ in
sector $j$:
\begin{equation}
d_{nmt}^{j}=\frac{T_{m}^{j}\left( \frac{B^{j}\left( w_{mt}^{j}\right)
^{\beta ^{j}}\prod_{k=1}^{J}(P_{t}^{k})^{\gamma ^{kj}}}{A_{mt}^{j}\kappa
_{nmt}^{j}}\right) ^{-\theta }}{\Phi _{nt}^{j}}  \label{shares}
\end{equation}%
that is, $d_{nmt}^{j}$ is the fraction of country $n$'s total spending on
sector-$j$ goods from country $m$ at time $t$. The equilibrium in the open
economy can be defined as following.

\textbf{Equilibrium Definition. }An equilibrium in the open economy is
defined as a set of resource allocations $\left\{ L_{nt}^{j}\right\} $,
import shares $\left\{ d_{nit}^{j}\right\} $, prices $\left\{ P_{nt}\right\}
$, $\left\{ P_{nt}^{j}\right\} $, and $\left\{ w_{n}^{j}\right\} $ such
that, given technology $\left\{ A_{it}^{j}\right\} ,\left\{
T_{it}^{j}\right\} ,$ aggregate endowments $\left\{ L_{nt}\right\} $ and
trading costs $\left\{ \kappa _{int}^{j}\right\} $ $i)$ consumers maximize
expected utility, $ii)$ firms minimize costs, and $iii)$ markets for goods
and inputs clear. In equilibrium, prices and quantities satisfy (\ref{eq1})-(%
\ref{eq5}):
\begin{equation}
P_{nt}=\prod\nolimits_{j}^{J}\left( \frac{1}{\alpha _{n}^{j}}\right)
^{\alpha ^{j}}\left( P_{nt}^{j}\right) ^{\alpha ^{j}}  \label{eq1}
\end{equation}%
\begin{equation}
P_{nt}^{j}=\xi \Phi _{nt}^{j^{-1/}\theta }  \label{eq2}
\end{equation}%
\begin{equation}
\Phi _{nt}^{j}=\left( B^{j}\right) ^{-\theta
}\sum\nolimits_{i=1}^{N}T_{i}^{j}\left( A_{it}^{j}\right) ^{\theta }\left[
\frac{\left( w_{it}^{j}\right) ^{\beta
^{j}}\prod_{k=1}^{J}(P_{t}^{k})^{\gamma ^{kj}}}{\kappa _{nit}^{j}}\right]
^{-\theta }  \label{eq3}
\end{equation}%
\begin{equation}
d_{nmt}^{j}=\frac{\left( B^{j}\right) ^{-\theta }T_{m}^{j}\left(
A_{mt}^{j}\right) ^{\theta }\left( \frac{w_{mt}^{j\beta
^{j}}\prod_{k=1}^{J}(P_{t}^{k})^{\gamma ^{kj}}}{\kappa _{nmt}^{j}}\right)
^{-\theta }}{\Phi _{nt}^{j}};\sum\nolimits_{m=1}^{N}d_{nmt}^{j}=1
\label{eq4}
\end{equation}%
\begin{equation}
\frac{L_{nt}^{j}}{L_{nt}}=E_{t-1}\left[ \frac{w_{nt}^{j}L_{nt}^{j}}{%
\sum_{k=1}^{J}w_{nt}^{k}L_{nt}^{k}}\right]   \label{eq7}
\end{equation}%
The constant $\xi \equiv \left[ \Gamma \left( \frac{\theta +1-\eta }{\theta }\right) %
\right]$, and $\Gamma $ is the gamma function.
Revenue in sector $j$ in country $n$ is equal to the total expenditure of
all the countries on this sector, $E_{mt}^{j}$, weighted by country $n$'s
market share:
\begin{equation*}
R_{nt}^{j}=\sum\nolimits_{m=1}^{N}d_{mnt}^{j}E_{mt}^{j}
\end{equation*}%
Expenditure by agents in country $m$ on good $j$ comes from consumption
(final demand) and intermediate demand:
\begin{equation*}
E_{mt}^{j}=\alpha _{t}^{j}P_{mt}C_{mt}+\sum\nolimits_{k=1}^{J}\gamma
^{jk}R_{mt}^{k}
\end{equation*}%
Final consumption is domestic value added minus the trade surplus $S_{mt}$,
\begin{equation*}
P_{mt}C_{mt}=\sum\nolimits_{j=1}^{J}w_{mt}^{j}L_{mt}^{j}-S_{mt}=\sum%
\nolimits_{j=1}^{J}\beta ^{j}R_{mt}^{j}-S_{mt},
\end{equation*}%
where we have made use of the fact that $w_{mt}^{j}L_{mt}^{j}=\beta
^{j}R_{mt}^{j}$. Combining these three equations, $R_{nt}^{j}=%
\sum_{m=1}^{N}d_{mnt}^{j}\left[ \sum_{k=1}^{J}(\alpha _{t}^{j}\beta
^{k}+\gamma ^{jk})R_{mt}^{k}-\alpha _{t}^{j}S_{mt}\right] $. In vector
notation (with $\mathbf{R}_{nt}$ being $J\times 1$ column vector),
international income accounting becomes
\begin{equation}
\mathbf{R}_{nt}=\sum\nolimits_{m=1}^{N}\text{diag}(\mathbf{d}_{mnt})[(%
\boldsymbol{\alpha \beta }^{\prime }+\boldsymbol{\Gamma })\mathbf{R}_{mt}-%
\boldsymbol{\alpha }S_{mt}],  \label{eq5}
\end{equation}%
where $\text{diag}(\mathbf{d}_{mnt})$ is $J\times J$ matrix with the $j$th
diagonal element of $d_{mnt}^{j}$ and zero in all off-diagonal cells. We can
use \eqref{eq5} to pin down $\mathbf{R}_{mt}$ for any combination of import
shares and trade deficit.

Equations (\ref{eq1})--(\ref{eq3}) show the equilibrium prices as a function
of technology and input costs resulting from firms' cost minimization and
consumers' maximization problems. The first equation in (\ref{eq4}) shows
the value of goods from sector $j$ bought by country $n$ from country $m$ as
a share of total spending on goods $j$ by country $n.$ The second equation
says that the sum of spending shares on goods $j$ from all countries $m$ by
country $n$ (including $n$ itself) add to 1, that is, imports plus domestic
expenditures on goods $j$ by country $n$, add up to the overall spending
value on goods $j$ by country $n.$ Equation (\ref{eq4}) expresses total
value added in the economy as the sum of sectoral value added. (Real value
added is given by $Y_{nt}=\frac{w_{nt}L_{nt}}{P_{nt}}$.) Equation (\ref{eq7}%
) expresses the resource shares as a function of expected shares, following
the first order conditions in (\ref{eq:FOC}). Finally, equation (\ref{eq5})
gives the value of total sales in sector $j$ of country $n$.

The model can conceptually be solved backwards in two steps. First, for any
given set of values for $L_{nt}^{j}$, the first five sets of equations can
be solved for $P_{nt}$, $w_{nt}^{j}$, $P_{nt}^{j}$, $d_{nmt}^{j}$ as a
function of the $\kappa _{mnt}^{j}s$ and the augmented productivity factors
defined as:
\begin{equation}
Z_{nt}^{j}\equiv T_{n}^{j}\left[ L_{nt}\left( A_{nt}^{j}\right) ^{1/\beta
^{j}}\right] ^{\beta ^{j}\theta }.  \label{productivityfactor}
\end{equation}%
Then in a first stage, we can solve for the shares $\frac{L_{nt}^{j}}{L_{nt}}
$. As seen, with log utility the solution for $\frac{L_{n}^{j}}{L_{n}}$
simplifies significantly as it is the expected value of sectoral value-added
shares; in the implementation, we will use the data to help pin down these
expectations.

\subsection{Two Illustrative Cases: Autarky and Costless Trade}

To illustrate the mechanism of diversification through trade, we analyze a
one-sector version of the model (that is, the Eaton-Kortum model) under two
extreme cases for which we have closed-form analytical solutions for GDP:
autarky and costless trade. We accordingly drop the sector subscripts.
Input-output linkages are also simplified: the final good is used as an
intermediate.

\subsubsection{Volatility under Autarky}

Under complete autarky, it can be easily shown that value added in the
one-sector economy is a function of aggregate productivity:
\begin{equation*}
Y_{nt}\propto \left( Z_{nt}\right) ^{\frac{1}{\beta \theta }}
\end{equation*}%
where $Z_{nt}\equiv T_{n}\left( L_{nt}A_{nt}^{1/\beta }\right) ^{\beta
\theta }$. Taking log-differences around the mean (or trend value in the
empirics), we obtain $\hat{Y}_{nt}=\frac{1}{\beta \theta }\hat{Z}_{nt}.$
Thus, in the one-sector economy under autarky, shocks to value added are
driven exclusively by domestic shocks to the productive capacity of the
economy, $\hat{Z}_{nt}.$ The variance of GDP, $V(\hat{Y}_{nt})$ thus depends
on the variance of the shocks $V(\hat{Z}_{nt})$:
\begin{equation*}
V(\hat{Y}_{nt})=\frac{1}{\left( \beta \theta \right) ^{2}}V(\hat{Z}_{nt}).
\end{equation*}

\subsubsection{Volatility under Costless International Trade}

Under costless international trade in the one-sector economy ($\kappa
_{nmt}=1$), GDP per capita simplifies to:\footnote{%
See derivations in the Appendix. With costless international trade, the
aggregate production function exhibits decreasing returns in the domestic
equipped labour $L_{nt}$, a result that goes back to Acemoglu and Ventura
(2002).}
\begin{equation*}
Y_{nt}=\left( \xi B\right) ^{1/\beta }Z_{nt}^{\frac{1}{1+\beta \theta }%
}\left( \sum\nolimits_{m=1}^{N}Z_{mt}^{\frac{1}{1+\beta \theta }}\right) ^{%
\frac{1}{\beta \theta }}
\end{equation*}%
and hence GDP fluctuations are given by:
\begin{equation*}
\hat{Y}_{nt}=\frac{1}{1+\beta \theta }\left[ \hat{Z}_{n}+\frac{1}{\beta
\theta }\sum\nolimits_{m=1}^{N}\gamma _{m}\hat{Z}_{m}\right]
\end{equation*}%
where $\gamma _{m}=\frac{\bar{Z}_{m}^{\frac{1}{1+\beta \theta }}}{%
\sum_{i=1}^{N}\bar{Z}_{i}^{\frac{1}{1+\beta \theta }}}$ is the relative size
of country $j$ evaluated at the mean of $Z_{j}s$. Rearranging, we obtain $%
\hat{Y}_{nt}=\frac{1}{\beta \theta }\left[ \frac{\gamma _{n}+\beta \theta }{%
1+\beta \theta }\hat{Z}_{n}+\frac{1}{1+\beta \theta }\sum_{m\neq
n}^{N}\gamma _{m}\hat{Z}_{m}\right] $. Volatility under free trade is hence
given by:
\begin{equation}
Var(\hat{Y}_{nt})=\left( \frac{1}{\beta \theta }\right) ^{2}\left\{
\begin{array}{c}
\left( \frac{\gamma _{n}+\beta \theta }{1+\beta \theta }\right) ^{2}Var(\hat{%
Z}_{nt})+\left[ \frac{1}{1+\beta \theta }\right] ^{2}\sum_{m\neq i}\gamma
_{m}^{2}Var(\hat{Z}_{mt}) \\
2\frac{\gamma _{n}+\beta \theta }{1+\beta \theta }\frac{1}{1+\beta \theta }%
\sum_{m\neq n}\gamma _{m}Cov(\hat{Z}_{m,}\hat{Z}_{n})%
\end{array}%
\right\}
\end{equation}%
Compared to the variance in autarky, $V(\hat{Y}_{nt})=\frac{1}{\left( \beta
\theta \right) ^{2}}V(\hat{Z}_{nt})$, it is clear that the volatility due to
domestic productivity fluctuations, $Var(\hat{Z}_{nt}),$ now receives a
smaller loading, as $\left( \frac{\gamma _{n}+\beta \theta }{1+\beta \theta }%
\right) ^{2}<1$ since $\gamma _{n}<1.$ The smaller the country (as gauged by
its share $\gamma _{n}$), the smaller the impact of domestic volatility of
shocks, $\hat{Z}_{n},$ on its GDP, when compared to autarky. Openness to
trade, however, exposes the economy to other countries' productivity shocks,
which will also contribute to the country's overall volatility. Whether or
not the gain in diversification (given by lower exposure to domestic
productivity) is bigger than the increased exposure to new shocks depends on
the variance-covariance matrix of shocks across countries. If all countries
have the same constant variance $Var(\hat{Z}_{nt})=\sigma ,$ and the $\hat{Z}%
_{nt}$ are uncorrelated, volatility under free trade becomes:
\begin{equation}
Var(\hat{Y}_{nt})=\left( \frac{1}{\beta \theta }\right) ^{2}\left\{ \left(
\frac{\gamma _{n}+\beta \theta }{1+\beta \theta }\right) ^{2}+\left[ \frac{1%
}{1+\beta \theta }\right] ^{2}\sum_{m\neq i}\gamma _{m}^{2}\right\} \sigma
\end{equation}%
which is unambiguously lower than the volatility in autarky given that%
\footnote{%
since $\left( \beta \theta \right) ^{2}+2\beta \theta \gamma
_{n}+\sum_{j=1}\gamma _{j}^{2}<(1+\beta \theta )^{2}$ because $2\beta \theta
\gamma _{n}+\sum_{j=1}\gamma _{j}^{2}<2\beta \theta +1.$}
\begin{equation}
\left( \frac{\gamma _{n}+\beta \theta }{1+\beta \theta }\right) ^{2}+\left[
\frac{1}{1+\beta \theta }\right] ^{2}\sum_{m\neq i}\gamma _{m}^{2}<1
\label{derivelater}
\end{equation}%
(recall $\gamma _{m}<1$ and\ $\sum_{m=1}^{N}\gamma _{m}^{2}\leq 1)$. Of
course, if other countries have higher variances or the covariance terms are
important, then the weights countries receive matter and the resulting
change in volatility cannot be unambiguously signed.

\section{Mapping the Model into Observables}

\label{mapping_into_observables} In this section we connect the model to the
data and use it to quantitatively assess the effect of historical changes in
trade barriers on GDP volatility for a diverse sample of 24\ core countries
and an aggregate of the remaining countries\ to which we refer as
\textquotedblleft rest of the world\textquotedblright\ (ROW). Volatility in
the model, as in the data, is measured as the variance (or standard
deviation, where indicated), of real GDP deviations from country-specific
trends. Real GDP in the model is given by total value added deflated by the
optimal expenditure-based price index, $Y_{nt}=\frac{w_{nt}L_{nt}}{P_{nt}},$
to match the data counterpart of total nominal value-added deflated by the
country's consumer-price index (CPI).

The equilibrium of the model is characterized by equations (\ref{eq1})-(\ref%
{eq7}). We solve the model\ numerically, for which we need to calibrate the
values of the exogenous trading costs $\kappa _{nmt}^{j}$, the productivity
process $Z_{nt}^{j}$, and the parameters $\alpha ^{j}$, $\gamma ^{kj}$, $%
\theta $, and $\eta $. We consider 24 sectors in the analysis (agriculture,
22 manufacturing sectors, and services). Throughout the study, services are
treated as a nontradable sector (that is, $\kappa _{nmt}^{j}=0$ for all $%
n\neq m$ and $\kappa _{nmt}^{j}=1$ for $n=m$), whereas agriculture and\ all
manufacturing sectors are treated as tradables, with potentially different
trading costs.

\subsection{Calibration}

We set $\alpha ^{j}$ so as to match the average share of each sector on
total final uses in the OECD Input-Output tables across all countries. The
betas for each sector are calculated as the ratio of value added to total
output. A detailed description of the data and the calculations is available
in the Appendix.

We allow for a relatively broad parametric range for $\theta $, from $\theta
=2$ to $\theta =8,$ consistent with the estimates in the literature (see
Eaton and Kortum, 2003, Donaldson 2015, and Simonovska and Waugh, 2011). We
use $\theta =4$ as the baseline case, and report the results for other
values when discussing the sensitivity of our results. We calibrate the
elasticity of substitution across varieties $\eta =4$, consistent with Broda
and Weinstein (2006)'s median estimates. The results are not sensitive to
this parametric choice.

We explain next how we obtain the processes for $\kappa _{nmt}^{j}$ and $%
Z_{it}^{j}$ using data on sectoral bilateral trade flows, value added,
output, and prices. Before we specify the details, a quick intuition on how
these series are backed-out from the model is as follows. We recover trade
costs $\kappa _{nmt}^{j}$ using information on bilateral trade shares and
gross output at the sectoral level. Intuitively, if two countries trade
little with one another in a given sector (relative to the sectoral gross
output of these countries), this will signal high trade costs between the
countries in that sector. Second, we recover productivities relative to a
benchmark country using the market share of each exporter. If a country has
a high export share in a sector, that is a sign of revealed comparative
advantage, meaning a high relative productivity in the sector relative to
the benchmark country. To calibrate the absolute level of productivities, we
use price data for a benchmark country. Finally, to add realism to the
calibration, we allow for trade imbalances, which we treat as exogenous. (We
report results with balanced and imbalanced trade.) We explain the procedure
in detail and with formulas in the next section.

\paragraph{Kappas}

In order to perform counterfactual experiments we need to back out the
historical realizations of the exogenous processes. Following the idea in
Head and Ries (2011), we assume that sectoral bilateral trading costs are
symmetric, that is: $\kappa _{nmt}^{j}=\kappa _{mnt}^{j}$, and hence
bilateral trade costs at the sectoral level can be backed out from\ the
data. Indeed, inverting the structural model, we obtain:\footnote{%
The symmetry assumption helps to reduce the number of parameters to
calibrate. See Allen, Arkolakis, and Takahashi (2014) for a discussion of
underidentification in trade models.}
\begin{equation}
\frac{d_{nmt}^{j}d_{mnt}^{j}}{d_{mmt}^{j}d_{nnt}^{j}}=\left( \kappa
_{nmt}^{j}\right) ^{2\theta }.  \label{kappa}
\end{equation}%
The left-hand side objects can be measured using data on bilateral imports
and gross output at the sectoral level. Specifically, $d_{nmt}^{j}$ is the
value of exports from $m$ to $n$ in sector $j$ at $t$ relative to total
spending by $n$ on sector $j$ at time $t$, where total spending is measured
as gross output plus imports minus exports by that sector and country at
time $t.$ The share $d_{mmt}^{j}$ is obtained as a residual from the
accounting restriction:
\begin{equation*}
d_{mmt}^{j}=1-\sum\nolimits_{n\neq m}^{N}d_{mnt}^{j}
\end{equation*}%
Hence, for a given value of $\theta $, we can obtain the time series of
trading costs by sector and country-pairs $\left\{ \kappa _{nmt}^{j}\right\}
$.

\paragraph{Productivity in Tradable Sectors}

To back out the productivities, we proceed as follows. First, using the
formula for $d_{nm}^{j}$ in equation (\ref{eq4}), after some algebra, we
obtain:
\begin{equation}
d_{nm}^{j}=\frac{1}{(\xi B^{j})^{\theta }}(\kappa _{nm}^{j})^{\theta
}(P_{n}^{j})^{\theta }Z_{m}^{j}(\psi _{m}^{j})^{\theta \beta
^{j}}(y_{m}^{j})^{-\theta \beta ^{j}}(P_{m})^{-\theta \beta
^{j}}\prod_{k=1}^{J}(P_{m}^{k})^{-\theta \gamma ^{kj}},  \label{produc}
\end{equation}%
where $\psi _{m}^{j}\equiv \frac{L_{m}^{j}}{L_{m}}$ and $y_{m}^{j}\equiv
\frac{L_{m}^{j}w_{m}^{j}}{P_{m}}$. We can exploit this to recover $Z_{m}^{j}.
$ In particular, inverting (\ref{produc}) we have:
\begin{equation}
Z_{mt}^{j}={B^{j}}^{\theta }{\xi }^{\theta }d_{nmt}^{j}\left(
y_{m}^{j}\right) ^{\theta \beta ^{j}}\left( \kappa _{nmt}^{j}\right)
^{-\theta }\left( \frac{P_{nt}^{j}}{P_{mt}^{\beta
^{j}}\prod_{k=1}^{J}(P_{mt}^{k})^{\gamma ^{kj}}}\right) ^{-\theta }\left(
\psi _{mt}^{j}\right) ^{-\theta \beta ^{j}}  \label{productivity}
\end{equation}%
To approximate terms on the right-hand side we use data on sectoral import
shares $d_{nmt}^{j}$, sectoral value added $y_{m}^{j}$, sectoral shares $%
\psi _{mt}^{j}$, and aggregate prices $P_{nt}$, along with the calibrated
parameters. (See the Appendix for more details.) The only terms we cannot
back out directly from data are sectoral prices. We thus use the model in
conjunction with the data to infer them. Note first that equation~(\ref%
{productivity}) holds for all $(n,k)$ pairs of countries and all sectors $j$
(except for services). The procedure becomes clear when we collect known and
unknown terms as follows:
\begin{align}
Z_{nt}^{j}& =\underbrace{{B^{j}}^{\theta }{\xi }^{\theta }d_{knt}^{j}\left(
y_{n}^{j}\right) ^{\theta \beta ^{j}}\left( \kappa _{knt}^{j}\right)
^{-\theta }\left( P_{nt}^{\beta
^{j}}\prod\nolimits_{m=1}^{J}(P_{nt}^{m})^{\gamma ^{mj}}\right) ^{\theta
}\left( \psi _{nt}^{j}\right) ^{-\theta \beta ^{j}}}_{\equiv \exp (\zeta
_{k,n,t}^{j})}{P_{k,t}^{j}}^{-\theta }  \notag \\
& =\exp (\zeta _{k,n,t}^{j}){P_{k,t}^{j}}^{-\theta }
\end{align}%
Note in particular that this relationship holds for any choice of country $k$%
. Note also that the factor $\exp (\zeta _{k,n,t}^{j})$ can be constructed
from observable data. We decompose $\exp (\zeta
_{k,n,t}^{j})=Z_{nt}^{j}\left( {P_{k,t}^{j}}\right) ^{\theta }$ according to
the following procedure. We first take logs and rename terms for brevity.
\begin{equation}
\zeta _{k,n,t}^{j}=\chi _{nt}^{j}+\tau _{k,t}^{j}
\end{equation}%
where $\chi _{nt}^{j}\equiv \ln {Z_{nt}^{j}}$ and $\tau _{k,t}^{j}\equiv
\theta \ln {P_{k,t}^{j}}$. We need a benchmark country, so we use sectoral
prices in the US:
\begin{equation*}
\tau _{US,t}^{j}\equiv \theta \ln {P_{US,t}^{j}}
\end{equation*}%
We choose units of accounts for each sector so that U.S. nominal sectoral
prices are equal to 1 in 1972. We can then obtain $\tau _{k,t}^{j}$ for all
other countries as:
\begin{equation}
\tau _{k,t}^{j}=\frac{1}{N}\sum\nolimits_{n=1}^{N}\left( \zeta
_{k,n,t}^{j}-\zeta _{US,n,t}^{j}\right) +\tau _{US,t}^{j}
\end{equation}%
(Note that this equation holds with and without the averaging operator, $%
\frac{1}{N}\sum_{n=1}^{N}$, as $\tau _{k,t}^{j}$ and $\tau _{US,t}^{j}$ do
not depend on the exporter $n$.\footnote{%
We use the average in the quantitative analysis to minimize measurement
error.}) We can then back-out $\chi _{nt}^{j}$ for all other countries:%
\begin{equation}
\chi _{nt}^{j}=\frac{1}{N}\sum\nolimits_{k=1}^{N}\left( \zeta
_{k,n,t}^{j}-\tau _{k,t}^{j}\right)
\end{equation}%
And we recover shocks and prices, respectively, as $Z_{n,t}^{j}=\exp \left(
\chi _{nt}^{j}\right) $ and $P_{k,t}^{j}=\exp \left( \tau _{kt}^{j}/\theta
\right) .$ This procedure generates augmented productivity factors $%
Z_{n,t}^{j}$ and sectoral prices for agriculture and manufacturing sectors $%
P_{k,t}^{j}$.

\paragraph{Productivity in Nontradables}

To compute the productivities in the services sector for each country, we
use equilibrium equations (\ref{eq1}), (\ref{eq2}) and (\ref{produc}). As we
already have sectoral prices of tradables we can use (\ref{eq1}) to recover
the price of services as follows:
\begin{equation}
P_{n,t}^{s}=\left( \frac{P_{n,t}}{P_{US,t}}P_{US,t}\right) ^{\frac{1}{\alpha
^{s}}}\left( \prod\nolimits_{j=1}^{J}{\alpha ^{j}}^{-\alpha ^{j}}\right) ^{-%
\frac{1}{\alpha ^{s}}}\left[ \prod\nolimits_{j\neq s}\left(
P_{n,t}^{j}\right) ^{\alpha ^{j}}\right] ^{-\frac{1}{\alpha ^{s}}}
\end{equation}%
Note that we observe data on the price of country $n$ relative to the price
in the United States, $\frac{P_{n,t}}{P_{US,t}}$, from the Penn World
Tables. Hence, we recover $Z_{n,t}^{s}$ using (\ref{eq2}), (\ref{produc}),
and $n=m$.
\begin{equation}
Z_{n,t}^{s}=\xi ^{\theta }{B^{s}}^{\theta }\left( \frac{%
w_{n,t}^{s}L_{n,t}^{s}}{\psi _{n,t}^{s}}\right) ^{\theta \beta ^{s}}\left(
\frac{P_{n,t}}{P_{US,t}}P_{US,t}\right) ^{\theta (1-\beta ^{s})}{P_{n,t}^{s}}%
^{-\theta }
\end{equation}

\paragraph{Sectoral versus Aggregate Shocks}

The changes in productivity retrieved above,
\begin{equation}
\frac{1}{\beta ^{j}\theta }\hat{Z}_{m}^{j}\equiv \frac{1}{\beta ^{j}}\hat{A}%
_{mt}^{j}+\hat{L}_{mt},  \label{prodchanges}
\end{equation}%
can be decomposed into two factors: a sectoral factor, $\frac{1}{\beta ^{j}}%
\hat{A}_{mt}^{j}$, and an aggregate factor $\hat{L}_{mt}$. The
interpretation of $L_{mt}$ as \textquotedblleft equipped
labour\textquotedblright\ means that it embeds a productivity component too.
Given the functional form, the split between pure productivity and resources
in $L_{mt}$ is not relevant from the point of view of aggregate volatility.
(A shock to $L_{mt}$ will be equivalent to an aggregate shock to $A_{mt}^{j}$%
s that leaves the relative productivities $A_{mt}^{j}/A_{mt}^{j^{\prime }}$
unchanged $\forall j,j^{\prime }.$) For identification, we impose the
restriction that
\begin{equation}
\sum \frac{\alpha ^{j}}{\beta ^{j}}\hat{A}_{mt}^{j}=0.  \label{idrestriction}
\end{equation}%
Thus, changes in the sectoral productivity will correspond to changes in the
relative value of $A_{mt}^{j}$, while changes in aggregate productivity
(affecting all sectors equally), as well as changes in overall resources,
will be subsumed in $L_{mt}$. We hence call sectoral shocks, those affecting
$\hat{A}_{mt}^{j}$ and aggregate shocks those affecting the aggregate factor
$\hat{L}_{mt}$. The identification restriction implies that any primitive
aggregate shock affecting all sectors will be collected in $\hat{L}_{mt}.$

\subsubsection{Counterfactual Equilibria}

We discuss next how we compute the equilibrium in the counterfactual
exercise and how we identify the two theoretical mechanisms. For each new
value of (inverse) trading cost $\kappa $, and the estimated sequence of
sectoral productivities $\left\{ Z_{mt}^{j}\right\} $, we need to solve for
the sequence of equipped labour allocated to each sector $\left\{
L_{mt}^{j}\right\} $. The Appendix describes in detail how we solve for the
rational-expectations equilibrium as a fixed point of a mapping on the space
of possible $\left\{ L_{mt}^{j}\right\} $ sequences.

Since we are interested in decomposing the trade effect on volatility on the
contributions of the two mechanisms, specialization and diversification, we
need to identify the sources of shocks to productivity. We resort to a
factor model that decomposes productivity shocks into sector- and
country-specific components, as described in Koren and Tenreyro (2007). To
separate per period shocks from trends we use a band pass filter to detrend
each $\left\{ \log {Z_{n,t}^{j}}\right\} _{t=1}^{T}$ series. Without loss of
generality, we decompose the cycle component, denoted $\tilde{Z}_{nt}^{j}$,
as:
\begin{equation*}
\tilde{Z}_{nt}^{j}=\lambda _{t}^{j}+\mu _{nt}+\epsilon _{nt}^{j},
\end{equation*}%
where ${\mu _{n,t}}$ is the country-specific factor, affecting all sectors
within the country; $\lambda _{t}^{j}$ is the global sectoral factor,
affecting sector $j$ in all countries;\ and the residual $\epsilon _{n,t}^{j}
$ is the idiosyncratic component, specific to the country and sector. The
Appendix describes how the three factors, $\lambda ,\mu $, and $\epsilon $
are estimated. In the counterfactual exercises, we can mute the sector- or
country-specific factors by setting the corresponding components equal to 0,
in order to identify the separate effects of the two trade channels
affecting volatility.

\section{Quantifying the Effect of Trade on Volatility}

This section uses the framework developed above to quantitatively assess how
historical changes in trade costs from the early 1970s have affected
volatility patterns in a sample of countries at different levels of
development. We first analyze the baseline model's results and then perform
a series of sensitivity checks.

\subsection{Baseline Results}

Figure $1$ starts by comparing the baseline model-generated GDP volatility
with the volatility in the data. The baseline model refers to our benchmark
calibration, based on $\theta =4$, where both input-output linkages and
trade imbalances are allowed for. Recall that real GDP is measured as value
added deflated by the expenditure-based index in the model and the CPI index
in the data. The graph shows the standard deviation of real GDP deviations
from trend. The correlation between model and data series is 0.94 and the
R-squared value in the regression is 0.92, with a regression coefficient of
0.98. The correlation of the variances in model-generated and data series is
even higher, at 0.98. The analysis that follows will focus on the variance
as a measure of volatility, rather than the standard deviation, because of
the additivity properties of the former.

Trade barriers have declined significantly since the early 1970s. This
decline in barriers (or increase in $\kappa $) is illustrated in Figures $2$
and $3$, which show, correspondingly, the histograms of bilateral $\kappa $s
in manufacturing and agriculture in the first and last year of our sample.
As the figures show, the distribution of $\kappa $ has moved to the right,
indicating a decline in trading costs in both sectors. Overall, the
backed-out trade barriers are fairly large, as they capture not just
explicit tariff and non-tariff barriers, but all other impediments to\ the
product's trade.

\medskip

\begin{figure}[h]
\caption{Model-generated Volatility and Data Volatility (in standard
deviations)}\centering\includegraphics[width=\textwidth]{fig0a.pdf}
\end{figure}
\medskip
\begin{figure}[h]
\caption{Histogram of bilateral $\protect\kappa $ in Manufacturing sectors.
Years 1972 and 2007}\centering\includegraphics[width=\textwidth]{fig3.png}
\end{figure}

\begin{figure}[h]
\caption{Histogram of bilateral $\protect\kappa $ in Agriculture. Years 1972
and 2007}\centering\includegraphics[width=\textwidth]{fig4.png}
\end{figure}

Table $1$ investigates how the changes in trading costs have affected
volatility in the 25 countries in our sample using the baseline model.
Column (1) in the table shows the volatility generated by the model.
Volatility is computed as the variance of trend deviations of (log) real GDP
over the 35 years of sample. (As said, we focus on the variance rather than
the standard deviation, as the variance allows for an additive decomposition
into the two mechanisms we are interested in; standard deviations are
plotted in Figure $1$). The value reported in Column (1) is very close to
the actual volatility experienced by these economies from 1972 through 2007
(the correlation between data and model-generated series in 0.98). Column
(2) shows the volatility that would be observed if there were no global
sectoral shocks. The latter is generally smaller than the benchmark
volatility, though there are some exceptions, as global sectoral shocks can
covary negatively with country-specific shocks in some countries. To compute
this counterfactual measure, we mute the global sector-specific shocks in
the decomposition of $\tilde{Z}_{nt}^{j}$. (This measure of volatility is
useful to identify and quantify the two trade channels, as it will become
clear next.) Column (3) shows the country's volatility in the counterfactual
scenario that trading costs ($\kappa $) stayed at their 1972 levels. Column
(4) shows this latter measure in the absence of global sector-specific
shocks.

\begin{table}[h]
\caption{Baseline and counterfactual changes in volatility (measured as
variance) due to changes in trading costs. Baseline calibration ($\protect%
\theta =4$)}\centering\includegraphics[width=\textwidth]{Table1a.pdf}
\end{table}

Column (5) shows the percent change in average volatility due to actual
changes in trading costs since 1972, that is, the percent difference between
columns (1) and (3). Column (6) shows the contribution of the
diversification channel to the change in volatility in (5) and Column (7)
shows the\ corresponding contribution of the specialization channel. The
contribution of diversification to the change in volatility is computed as
the difference between the volatility in the absence of sectoral shocks
(Column 2) and the volatility under 1970's trading costs, in the absence of
sectoral shocks (Column 4). The difference is expressed relative to the
volatility under the 1972's trading cost levels\ (Column 3), so it may even
be lower than $-100\%$. This measure captures the trade in volatility due
exclusively to the country-diversification effect, as the sectoral shocks
are muted. The volatility due to specialization is computed as the
difference between Columns (5) and (6).

As Table $1$ shows, four fifths of the countries in our sample experienced a
decline in volatility due to the decline in trade barriers since 1972, while
the other fifth experienced an increase in volatility. The biggest decreases
in volatility caused by trade occurred in Belgium-Luxemburg, Ireland, the
Netherlands, and Norway, all of which saw volatility reductions in the order
of 90 percent, meaning their current volatility is 90 percent lower than it
would have been if trading costs stayed at their 1972 levels. The biggest
increases in volatility due to trade were witnessed by Greece (6.5 percent
increase) and Italy (8.4 percent increase). These results are the net effect
stemming from the contribution of the two separate channels we study. The
diversification channel contributed to lower volatility in 90 percent of the
countries. The specialization channel contributed to increased volatility in
two-thirds of the countries, with the biggest increases experienced by
Italy, Spain, the Netherlands, Finland, and Greece. In some countries,\
sectoral specialization actually contributed to lower volatility; this is
the case of Austria, Belgium-Luxembourg, India, Canada, Norway, South Korea,
and Sweden. This is possible, as the model illustrates, when the sector (or
sectors) in which the economy specializes in comoves negatively (or less
positively) with the country's aggregate shocks---or other sectoral shocks.
Interestingly, some countries, like Germany and the United Kingdom did not
experience large changes in their volatility due to changes in trade costs.
However, this result masks the contribution of a sizeable reduction in
volatility due to the diversification channel and a comparably sizeable
increase in volatility due to the sectoral specialization channel.

In absolute terms, the diversification effect was in general larger than the
specialization effect, and hence, on net, four fifths of the countries saw a
reduction in volatility, while the remaining fifth saw a more modest
increase in volatility. The heterogeneity in the trade effects across
countries is remarkable.

\subsection{Sensitivity Analysis}

In what follows, we study the role played by different elements of the model.

\subsubsection{Scope for Comparative Advantage $\protect\theta $}

Table $2$ shows the change in volatility due to international trade and its
decomposition for two other\ (extreme) values of $\theta $, $\theta =2$ and $%
\theta =8.$

\begin{table}[h]
\caption{Counterfactual changes in volatility (measured as variance) due to
changes in trading costs. Alternative calibrations with $\protect\theta =2$
and $\protect\theta =8$.}\centering\includegraphics[width=%
\textwidth]{Table2a.pdf}
\end{table}
The general message is qualitatively robust: i) the effect of trade on
volatility varies across countries; ii) the diversification channel tends to
reduce volatility; and iii) sectoral specialization tends to increase
volatility. Interestingly, for $\theta =2$, the case of high scope for
comparative advantage, volatility always declines with trading costs, with
the declines being significant even for countries like the United States.
The decline in volatility is driven almost exclusively by the large effects
stemming from the country-wide diversification channel. The effects of
sectoral specialization are also sizeable, but smaller than the
diversification effect. On net, thus, international trade leads to a
reduction in volatility.

On the other extreme of $\theta =8$, the results are qualitatively similar
to the benchmark case, with only a couple of exceptions, but in general the
results are quantitatively much smaller.

Taken together, the findings appear robust to changes in $\theta $ and
suggest that the effect of country diversification on volatility would be
stronger for lower values of $\theta $, meaning that decreaes in trade costs
reduce volatility even further as the scope for comparative advantage
increases. (This result holds despite the fact that sectoral specialization
would also increase in this case.)\footnote{%
Our exercise underscores the importance of the parameter $\theta $, and adds
to the message of Arkolakis, Costinot, and Rodriguez-Clare (2012): in order
to assess the effects of trade on key aggregate variables, the elasticity of
trade to trade costs plays a key role.}

\subsubsection{Input-Output Linkages}

To study the role of the input-output linkages in driving the results, we
explore a simpler specification of the model, going back to Eaton and Kortum
(2002)'s contribution. The key modification is that equation (\ref{eqinput})
becomes:

\begin{equation}
x_{mt}(\omega ^{j})=A_{mt}^{j}z_{m}(\omega ^{j})l_{mt}(\omega ^{j})^{\beta
^{j}}M_{mt}(\omega ^{j})^{(1-\beta ^{j})},  \label{iosimple}
\end{equation}%
where $M_{mt}(\omega ^{j})$ is the amount of the composite intermediate
final good used in the production of good $\omega ^{j}$. Note that this
formulation allows for a very simple form of input-output linkages captured
in the factor $M_{mt}(\omega ^{j})^{(1-\beta ^{j})}$.

\begin{table}[h]
\caption{Model-generated and counterfactual changes in volatility (measured
as variance) due to changes in trading costs. Baseline calibration without
(detailed) input-output linkages.}\centering\includegraphics[width=%
\textwidth]{Table3a.pdf}
\end{table}

Table $3$ summarizes the findings. The quantitative results are somewhat
different from those obtained in the baseline model with explicit
input-output linkages calibrated as in the data and presented in Table 1.
However, the overall qualitative picture is strikingly similar and the
numerical differences are relatively small. This suggests that the simpler
specification capturing input-output likanges in a cruder way is a fairly
good approximation to the more ralistic input-output structure that we use
in our baseline calibration.

\subsubsection{Trade Imbalances}

All the previous analysis built on the baseline calibration takes into
account trade imbalances, which are calibrated to match actual data. To
study the sensitivity of our numerical results to these trade imbalances we
perform the same analysis by setting all imbalances to zero, both in the
main model and in the counterfactual exercises. The results are shown in
Table $4.$

The quantitative results do not change significantly when we allow trade
imbalances in the system. The numerical differences vis-\`{a}-vis the
baseline calibration are relatively small and certaintly not sufficient to
alter the pattern of signs displayed in Table $1$.

\subsubsection{Adjustment Costs and Ex Post Sectoral Reallocation}

The baseline model assumes that the sectoral allocation of equipped labour
is decided a period in advance, before productivity shocks are realized. In
this section we relax this stark assumption. We assume that the ex post
reallocation of equipped labour is possible, but an adjustment cost is paid
in that reallocation. Lifetime utility is given by
\begin{equation*}
U_{n}=\sum\limits_{t=0}^{\infty }\delta ^{t}u(C_{nt})-\Upsilon ,
\end{equation*}%
where the new term $\Upsilon $ is the sum of quadratic deviations of
equipped labour's sectoral shares ($\psi _{nt}^{j}$) from the ex ante
optimal sectoral allocation ($\psi _{nt}^{j\ast }$). In formulas: $\Upsilon
\equiv \frac{\varrho }{2}\sum_{j=1}^{J}\left[ \psi _{nt}^{j}-\psi
_{nt}^{j\ast }\right] ^{2}$, where higher $\varrho $ indicates higher
adjustment costs. In our baseline calibration, $\varrho $ is implicitly
assumed to be infinite, and hence no ex post reallocation of equipped labour
takes place. The cost $\Upsilon $ is relevant ex-post, when the
representative agent needs to reallocate inputs across sectors. Ex ante,
however, the optimal allocation is such that the expected adjustment costs
will be zero. Because there is no intertemporal trade and no capital in the
economy, and given that input shares ex ante will equal the expected optimal
allocation, each period consumers maximize the expected static utility flow $%
E\left[ u\left( C_{nt}\right) \right] $ and the equilibrium is simply a
sequence of static equilibria. As before, we assume log utility and
therefore the ex ante allocation is given by:
\begin{equation}
L_{nt}^{k\ast }=\arg \max E_{t-1}\left[ \ln \left( \frac{%
\sum_{j=1}^{J}w_{nt}^{j}L_{nt}^{j}}{P_{nt}}\right) \right]
,s.t.:\sum\nolimits_{j=1}^{J}L_{nt}^{j}=L_{nt},  \label{eq:log:utility1}
\end{equation}%
where $E_{t-1}$ indicates that the expectation is taken before the
realization of period $t$ shocks. This\ maximization problem leads to the
following first-order conditions for the ex-ante shares:
\begin{equation}
\psi _{nt}^{k\ast }=\frac{L_{nt}^{k\ast }}{L_{nt}}=E_{t-1}\left[ \frac{%
w_{nt}^{k}L_{nt}^{k}}{\sum_{k}w_{nt}^{k}L_{nt}^{k}}\right] ,\qquad \forall
k,t.  \label{foc1}
\end{equation}%
In words, the share of resources allocated ex ante to a given sector equals
its expected share in value added. Ex post, as said, labour can potentially
be reallocated after incurring the ajustment costs. The ex-post sectoral
input allocation solves:%
\begin{equation}
L_{nt}^{k}=\arg \max \left[ \ln \left( \frac{%
\sum_{j=1}^{J}w_{nt}^{j}L_{nt}^{j}}{P_{nt}}\right) -\frac{\varrho }{2}%
\sum_{j=1}^{J}\left[ \psi _{nt}^{j}-\psi _{nt}^{j\ast }\right] ^{2}\right] ,%
\text{ }s.t.:\sum\nolimits_{j=1}^{J}L_{nt}^{j}=L_{nt}
\end{equation}%
with $\psi _{nt}^{j}\equiv \frac{L_{nt}^{j}}{L_{nt}}$ and $%
\sum_{j=1}^{J}\psi _{nt}^{j}=\sum_{j=1}^{J}\psi _{nt}^{j\ast }=1.$ The
first-order conditions lead to:%
\begin{equation}
\psi _{nt}^{k}=\psi _{nt}^{k\ast }+\frac{1}{\varrho }\left[ \frac{w_{nt}^{k}-%
\frac{1}{J}\sum_{j=1}^{J}w_{nt}^{j}}{%
\sum_{j=1}^{J}w_{nt}^{j}L_{nt}^{j}/L_{nt}}\right]   \label{estimate}
\end{equation}%
In words, the ex post input shares $\psi _{nt}^{k}$ equal the ex-ante
optimal shares $\psi _{nt}^{k\ast }$ plus a fraction of the percentage
differential between the sectoral input cost $w_{nt}^{k}$ and the average
equipped labour cost in the economy $\frac{1}{J}\sum_{j=1}^{J}w_{nt}^{j}$.
(Note that the denominator is the average input cost in the economy.) The
adjustment cost parameter $\varrho $ determines the semi-elasticity of
sectoral adjustment to the cost differential. In the extreme, when
adjustment costs are infinite, $\varrho \rightarrow \infty $, the economy
simply stays at the initial sectoral input shares $\psi _{nt}^{k}=\psi
_{nt}^{k\ast }$. As adjustment costs decrease, the sectoral shares adjust in
response to the cost differential. To calibrate $\varrho $, we use EU KLEMS
data on employment and compensation for all countries in the European Union
from 1970 to 2007.We compute labour shares and sectoral wage differentials $%
\left( w_{nt}^{k}-\frac{1}{J}\sum_{j=1}^{J}w_{nt}^{j}\right) /\left(
\sum_{j=1}^{J}w_{nt}^{j}L_{nt}^{j}/L_{nt}\right) $ as in equation (\ref%
{estimate}). We then regress yearly changes in labour shares on yearly
changes in the wage differentials to obtain estimates of $\frac{1}{\varrho }$%
. The estimated regression coefficient is 0.001 (p-value 0.03). We solve the
model and counterfactuals under $\frac{1}{\varrho }=0.001$ and report the
results in Table $5.$ Given the large estimated value of $\varrho $, perhaps
not surprisingly, the results are very similar to those in the baseline
model. When we reduce the value of $\varrho $ to a third of the estimated
data point, the diversification chanel becomes stronger, but in all, the
results are not significantly different from those in Table $5.$\footnote{%
Results are available from the authors.}

\begin{table}[h]
\caption{Model-generated and counterfactual changes in volatility (measured
as variance) due to changes in trading costs. Baseline calibration without
trade imbalances.}\centering\includegraphics[width=\textwidth]{Table4a.pdf}
\end{table}

\begin{table}[h]
\caption{Model-generated and counterfactual changes in volatility (measured
as variance) due to changes in trading costs. Baseline calibration with ex
post sectoral reallocation costs.}\centering\includegraphics[width=%
\textwidth]{Table5a.pdf}
\end{table}

\section{Conclusions}

How does openness to trade affect GDP volatility? This paper revisits the
common wisdom that trade increases volatility by causing higher sectoral
specialization. It argues that when country-specific shocks are an important
source of volatility, openness to international trade can lower GDP
volatility, as it reduces exposure to domestic shocks and allows countries
to diversify the sources of demand and supply across countries. Building on
Eaton and Kortum (2002)'s quantifiable model of trade, the paper assesses
the effect of trade on volatility and the role played by the two mechanisms,
sectoral specialization and country diversification.

A key finding of the paper is that the historical decline in trade barriers
in agriculture and manufacturing has led to a reduction in volatility in
eighty percent of the countries analyzed, and to modest increases in
volatility in the rest. The quantitative change in volatility varies
significantly across countries. The overall volatility change due to trade
openness is the net result of the two different mechanisms, sectoral
specialization, and country-wise diversification. The first mechanism tends
to decrease volatility, while the second tends to increase it (though, as we
point out, this general tendency finds a number of exceptions). The
diversification effect is, on average, quantitatively stronger than the
specialization effect; this result explains why, on average, volatility
tends to decline with trade. The model sheds light on why the magnitude of
the trade effects may differ across countries. The sizeable heterogeneity in
the trade effects on volatility can contribute to understand the diversity
of results documented by the existing empirical literature.

\begin{thebibliography}{99}
\bibitem{} Acemoglu, D. and J. Ventura (2002), \textquotedblleft The World
Income Distribution,\textquotedblright\ Quarterly Journal of Economics, 117
(2), p. 659-694

\bibitem{} Allen, A., C. Arkolakis, and Y. Takahashi (2014)
\textquotedblleft Universal Gravity,\textquotedblright\ Yale manuscript.

\bibitem{} Alvarez, F. and R. E. Lucas (2007), \textquotedblleft General
Equilibrium Analysis of the Eaton-Kortum Model of International
Trade,\textquotedblright\ Journal of Monetary Economics, 54 (6): 1726-1768.

\bibitem{} Anderson, J., 2011. \textquotedblleft The specific factors
continuum model, with implications for globalization and income
risk,\textquotedblright\ Journal of International Economics, Elsevier, vol.
85(2): 174-185.

\bibitem{} Arkolakis, C., A. Costinot and A. Rodriguez-Clare (2012),
\textquotedblleft New Trade Models, Same Old Gains?\textquotedblright\
American Economic Review, 2012, 102(1), p. 94-130.

\bibitem{} Arkolakis, C. and A. Ramanarayanan (2008), \textquotedblleft
Vertical Specialization and International Business Cycle
Synchronization,\textquotedblright\ manuscript Yale University.

\bibitem{} Backus, D., K. Patrick J., and F. Kydland (1992), "International
Real Business Cycles", Journal of Political Economy 100 (4): 745--775.

\bibitem{} Bejan, M. (2006), \textquotedblleft Trade Openness and Output
Volatility,\textquotedblright\ manuscript,
http://mpra.ub.uni-muenchen.de/2759/.

\bibitem{} Berrie, T., M. Bonomo and C. Carvalho (2014). \textquotedblleft
Deindustrialization and Economic Diversification,\textquotedblright\ PUC
manuscript.

\bibitem{} Broda, C. and D. Weinstein (2006), \textquotedblleft
Globalization and the Gains from Variety,\textquotedblright\ The Quarterly
Journal of Economics, MIT Press, vol. 121(2): 541-585, May.

\bibitem{} Burgess, R. and D. Donaldson (2012) \textquotedblleft Railroads
and the Demise of Famine in Colonial India,\textquotedblright\ MIT
manuscript.

\bibitem{} Burstein, A. and J. Vogel (2016), \textquotedblleft International
trade, technology, and the skill premium,\textquotedblright\ forthcoming
Journal of Political Economy.

\bibitem{} Burstein, A. and J. Cravino (2015), \textquotedblleft Measured
Aggregate Gains from International Trade\textquotedblright\ with Javier
Cravino, American Economic Journal: Macroeconomics, vol 7 (2): 181-218.

\bibitem{} Caliendo, L. and F. Parro (2012) \textquotedblleft Estimates of
the Trade and Welfare Effects of NAFTA\textquotedblright\ with Fernando
Parro, NBER Working Paper No. 18508, 2012.

\bibitem{} Caliendo, L., E. Rossi-Hansberg and D. Sarte (2013).
\textquotedblleft The impact of regional and sectoral productivity changes
on the U.S. economy,\textquotedblright\ Princeton and Yale manuscripts.

\bibitem{} Cavallo, E. (2008). \textquotedblleft Output Volatility and
Openess to Trade: a Reassessment,\textquotedblright\ Journal of LACEA
Economia, Latin America and Caribbean Economic Association.

\bibitem{} Costello, D. (1993) \textquotedblleft A Cross-Country,
Cross-Industry Comparison of Productivity Growth,\textquotedblright\ Journal
of Political Economy, Vol. 101(2): 207-222.

\bibitem{} Costinot, A., D. Donaldson and I. Komunjer (2012),
\textquotedblleft What Goods Do Countries Trade? A Quantitative Exploration
of Ricardo's Ideas,\textquotedblright\ Review of Economic Studies,79 (2):
581-608.

\bibitem{} Department for International Development (2011),
\textquotedblleft Economic openness and economic prosperity: trade and
investment analytical paper\textquotedblright\ (2011), prepared by the U.K.
Department of International Development's Department for Business,
Innovation \& Skills, February 2011.

\bibitem{} di Giovanni, J. and A. Levchenko (2009). \textquotedblleft Trade
Openness and Volatility,\textquotedblright\ The Review of Economics and
Statistics, MIT Press, vol. 91(3): 558-585, August.

\bibitem{} di Giovanni, J. and A. Levchenko (2012), \textquotedblleft
Country Size, International Trade, and Aggregate Fluctuations in Granular
Economies,\textquotedblright\ Journal of Political Economy, 120 (6):
1083-1132.

\bibitem{} di Giovanni, J, A. Levchenko and I. Mejean (2014),
\textquotedblleft Firms, Destinations, and Aggregate
Fluctuations,\textquotedblright\ Econometrica, 82:4, pages 1303-1340.

\bibitem{} di Giovanni, J., A. Levchenko, and J. Zhang (2014).
\textquotedblleft The Global Welfare Impact of China: Trade Integration and
Technological Change,\textquotedblright\ forthcoming American Economic
Journal: Macroeconomics.

\bibitem{} Donaldson, D. \textquotedblleft Railroads of the Raj: Estimating
the Impact of Transportation Infrastructure,\textquotedblright\ (2015)
forthcoming, American Economic Review.

\bibitem{} Easterly, W., R. Islam, and J. Stiglitz (2001), \textquotedblleft
Shaken and Stirred: Explaining Growth Volatility,\textquotedblright\ Annual
World Bank Conference on Development Economics, p. 191-212. World Bank,
July, 2001.

\bibitem{} Eaton, J. and S. Kortum (2002), \textquotedblleft Technology,
Geography and Trade,\textquotedblright\ Econometrica 70: 1741-1780.

\bibitem{} Frankel, J. and A. Rose (1998), \textquotedblleft The Endogeneity
of the Optimum Currency Area Criteria,\textquotedblright\ Economic Journal,
Vol. 108, No. 449 (July):. 100-120.

\bibitem{} Haddad, M., J. Lim, and C. Saborowski (2010), \textquotedblleft
Trade Openness Reduces Growth Volatility When Countries Are Well
Diversified\textquotedblright\ The World Bank WPS5222.

\bibitem{} Head, K. and J. Ries (2001), \textquotedblleft Increasing Returns
versus National Product Differentiation as an Explanation for the Pattern of
U.S.-Canada Trade.\textquotedblright\ American Economic Review 91: 858-876.

\bibitem{} Hsieh, C. and Ossa, R. (2011), \textquotedblleft A Global View of
Productivity Growth in China,\textquotedblright\ University of Chicago
manuscript.

\bibitem{} Kehoe, T. and K. J. Ruhl (2008), \textquotedblleft Are Shocks to
the Terms of Trade Shocks to Productivity?,\textquotedblright\ Review of
Economic Dynamics, Elsevier for the Society for Economic Dynamics, vol.
11(4): 804-819, October.

\bibitem{} Koren, M. and S. Tenreyro (2007), \textquotedblleft Volatility
and Development,\textquotedblright\ Quarterly Journal of Economics, 122 (1):
243-287.

\bibitem{} Koren, M. and S. Tenreyro (2013), \textquotedblleft Technological
Diversification,\textquotedblright\ The American Economic Review, February
2013, Volume 103(1): 378-414.

\bibitem{} Koren, M. and S. Tenreyro (2011), \textquotedblleft Volatility
and Development in GCC countries,\textquotedblright\ The Transformation of
the Gulf: Politics, Economics and the Global Order, David Held and Kristian
Ulrichsen, eds. 2011.

\bibitem{} Kose, A., E. Prasad, and M. Terrones (2003), \textquotedblleft
Financial Integration and Macroeconomic Volatility,\textquotedblright\ IMF
Staff Papers, Vol 50, Special Issue, p. 119-142.

\bibitem{} Kose, A. and K. Yi, (2001), \textquotedblleft International Trade
and Business Cycles: Is Vertical Specialization the Missing
Link?,\textquotedblright\ American Economic Review, vol. 91(2): 371-375, May.

\bibitem{} Levchenko, A. and J. Zhang (2013), \textquotedblleft The Global
Labor Market Impact of Emerging Giants: a Quantitative
Assessment,\textquotedblright\ IMF Economic Review, 61:3 (August 2013),
479-519.

\bibitem{} Levchenko, A. and J. Zhang (2014), \textquotedblleft Ricardian
Productivity Differences and the Gains from Trade,\textquotedblright\
European Economic Review, 65 (January 2014), 45-65.

\bibitem{} Newbery, D. and J. Stiglitz, (1984), \textquotedblleft Pareto
Inferior Trade,\textquotedblright\ Review of Economic Studies, Wiley
Blackwell, vol. 51(1): 1-12, January.

\bibitem{} Parinduri, R. (2011), \textquotedblleft Growth Volatility and
Trade: Evidence from the 1967-1975 Closure of the Suez
Canal,\textquotedblright\ manuscript University of Nottingham.

\bibitem{} Parro, F. (2013), \textquotedblleft Capital-Skill Complementarity
and the Skill Premium in a Quantitative Model of Trade,\textquotedblright\
American Economic Journal: Macroeconomics, American Economic Association,
vol. 5(2): 72-117, April.

\bibitem{} Raddatz, C. (2006), \textquotedblleft Liquidity needs and
vulnerability to financial underdevelopment,\textquotedblright\ Journal of
Financial Economics, vol. 80(3): 677-722, June.

\bibitem{} Rodrik, D., (1998), \textquotedblleft Why Do More Open Economies
Have Bigger Governments?,\textquotedblright\ Journal of Political Economy,
vol. 106(5): 997-1032, October.

\bibitem{} Simonovska, I. and M. E. Waugh (2011), \textquotedblleft The
Elasticity of Trade: Estimates \& Evidence,\textquotedblright\ NBER Working
Papers 16796, National Bureau of Economic Research.

\bibitem{} Stockman, A. (1988), \textquotedblleft Sectoral and National
Aggregate Disturbances to Industrial Output in Seven European
Countries,\textquotedblright\ Journal of Monetary Economics 21 (March):
387-409.

\bibitem{} Stockman, A. and L. Tesar (1995), \textquotedblleft Tastes and
Technology in a Two-Country Model of the Business Cycle: Explaining
International Comovements,\textquotedblright\ American Economic Review 85
(1): 168--185.

\bibitem{} Strotmann, H., J. D\"{o}pke and C. Buch (2006), \textquotedblleft
Does trade openness increase firm-level volatility?,\textquotedblright\
Discussion Paper Series 1: Economic Studies 2006,40, Deutsche Bundesbank,
Research Centre.

\bibitem{} Timmer, M., M. O'Mahony and B. van Ark (2008), The EU KLEMS
Growth and Productivity Accounts: An Overview, University of Groningen \&
University of Birmingham; downloadable at www.euklems.net

\bibitem{} Wacziarg, R. and J. S. Wallack (2004), \textquotedblleft Trade
liberalization and intersectoral labor movements,\textquotedblright\ Journal
of International Economics 64 (2004) 411-- 439.
\end{thebibliography}

\section{\textbf{Appendix:}}

The following Appendix provides details on the derivations of the model, the
data, and the quantitative approach.

\subsection{Derivation of GDP under free trade}

In the one-sector economy, under free trade, prices are equalized across
countries.
\begin{equation}
P_{t}=P_{nt}=\left( \xi B\right) ^{1/\beta }\left\{
\sum_{m=1}^{N}T_{m}\left( A_{mt}\right) ^{\theta }\left( w_{mt}\right)
^{-\beta \theta }\right\} ^{\frac{-1}{\beta \theta }}
\end{equation}%
Thus, from $d_{nmt}=\left( \xi B\right) ^{-\theta }T_{m}\left( A_{mt}\right)
^{\theta }\left( w_{mt}\right) ^{-\beta \theta }\left( P_{mt}\right) ^{\beta
\theta }$ we obtain:
\begin{equation}
d_{mnt}=T_{n}\left( A_{nt}\right) ^{\theta }\left( w_{nt}\right) ^{-\beta
\theta }\left\{ \sum_{m=1}^{N}T_{m}\left( A_{mt}\right) ^{\theta }\left(
w_{mt}\right) ^{-\beta \theta }\right\} ^{-1}
\end{equation}%
and from $w_{nt}L_{nt}=\sum\nolimits_{m=1}^{N}d_{mnt}w_{mt}L_{mt},$, we
have:
\begin{equation}
w_{nt}=\left( \frac{T_{n}\left( A_{nt}\right) ^{\theta }}{L_{nt}}\right) ^{%
\frac{1}{1+\beta \theta }}V_{t}
\end{equation}%
where $V_{t}\equiv \left[ \sum\nolimits_{m=1}^{N}\frac{w_{mt}L_{mt}}{%
\sum_{i=1}^{N}T_{i}\left( A_{it}\right) ^{\theta }\left( w_{it}\right)
^{-\beta \theta }}\right] ^{\frac{1}{1+\beta \theta }}$ is common to all
countries. Therefore, using the definition of $Z_{nt}$,
\begin{align*}
\frac{w_{nt}L_{nt}}{P_{nt}}& =L_{nt}\left( \frac{T_{n}\left( A_{nt}\right)
^{\theta }}{L_{nt}}\right) ^{\frac{1}{1+\beta \theta }}V_{t}\left( \xi
B\right) ^{1/\beta }\left\{ \sum_{i=1}^{N}T_{i}\left( A_{it}\right) ^{\theta
}\left( \left( \frac{T_{i}\left( A_{it}\right) ^{\theta }}{L_{it}}\right) ^{%
\frac{1}{1+\beta \theta }}V_{t}\right) ^{-\beta \theta }\right\} ^{\frac{1}{%
\beta \theta }} \\
& =\left( \xi B\right) ^{1/\beta }\left( T_{n}A_{nt}^{\theta }L_{nt}^{\beta
\theta }\right) ^{\frac{1}{1+\beta \theta }}\left[ \sum_{i=1}^{N}\left(
T_{i}\left( A_{it}\right) ^{\theta }L_{it}^{\beta \theta }\right) ^{\frac{1}{%
1+\beta \theta }}\right] ^{\frac{1}{\beta \theta }} \\
Y_{nt}& =\left( \xi B\right) ^{1/\beta }Z_{nt}^{\frac{1}{1+\beta \theta }%
}\left( \sum_{m=1}^{N}Z_{mt}^{\frac{1}{1+\beta \theta }}\right) ^{\frac{1}{%
\beta \theta }}
\end{align*}

\subsection{Derivation of diversification result}

We now prove the result in inequality (\ref{derivelater}). Start with the
original condition that shows that GDP under costless trade less is volatile
than under autarky.
\begin{equation*}
\frac{\left( \beta +\theta \gamma _{i}\right) ^{2}+\theta ^{2}\sum_{j\neq
i}^{N}\gamma _{j}^{2}}{\left( \beta +\theta \right) ^{2}}<1
\end{equation*}

The first line below expands the numerator and adds terms while the second
line collect terms. The last line adds the $\left( \theta \gamma
_{i}\right)^{2}$ term to the expression in square brackets (note the change
of the index under the sum). The inequality holds since $\gamma _{i}<1$ for
all $i$.
\begin{eqnarray*}
\frac{\beta ^{2}+\left( \theta \gamma _{i}\right) ^{2}+2\beta \theta
\gamma_{i}+\theta ^{2}-\theta ^{2}+2\beta \theta -2\beta \theta
+\theta^{2}\sum_{j\neq i}^{N}\gamma _{j}^{2}}{\left( \beta +\theta \right)
^{2}}&<&1 \\
\frac{\left( \beta +\theta \right) ^{2}+\left( \theta \gamma
_{i}\right)^{2}+2\beta \theta (\gamma _{i}-1)+\theta ^{2}\left[ \sum_{j\neq
i}^{N}\gamma _{j}^{2}-1\right] }{\left( \beta +\theta \right) ^{2}} &<&1 \\
2\beta \theta (\gamma _{i}-1)+\theta ^{2}\left[ \sum_{j=i}^{N}%
\gamma_{j}^{2}-1\right] &<&0
\end{eqnarray*}

\subsection{Data Sources}

We first describe the sample of countries and then the various sources of
data.

\subsubsection{Sample of Countries}

Our sample consists of 24 core countries, for which we were able to collect
all the information needed to carry out the quantitative analysis with no
need---or very limited need---of estimation. Other countries, for which data
are nearly complete and estimation of some sectors' output or value added
was needed, are grouped as \textquotedblleft Rest of the
World\textquotedblright\ (ROW); the sectoral trade data are available for
virtually all countries. Some countries were aggregated (for example Belgium
and Luxembourg, and, before making to ROW, Former USSR, Former Yugoslavia.).
In particular, the minimum condition to keep a country (or an aggregation of
countries) in the sample is the availability of complete series of sectoral
value added and the presence of trade data.\footnote{%
For a more disaggregated analysis of volatility, see di Giovanni, Levchenko
and Mejean (2014)'s analysis of French firms' data. See also di Giovanni and
Levchenko (2012).}

The core sample of countries include the United States, Mexico, Canada,
Australia, China, Japan, South Korea, India, Colombia, the United Kingdom, a
composite of France and its overseas departments, Germany, Italy, Spain,
Portugal, a composite of Belgium and Luxembourg, the Netherlands, Finland,
Sweden, Norway, Denmark, Greece, Austria and Ireland. While some important
countries appear only in our ROW group (most notably Brazil, Russia, Turkey,
Indonesia, Malaysia and oil exporters), the selection of core countries is
meaningful both in terms of geographic location (covering all continents)
and in terms of their share in global trade and GDP. The time period we
study covers years from 1972 to 2007.\ (1970--1971 are slightly problematic
for trade data, as there are many missing observations; hence the decision
to start in 1972. The end period is chosen in order to avoid confounding the
trade effects we are after with the financial crisis, which had other
underlying causes.)We focus on annual data.

The rest of the section describes our data sources and estimation methods.

\subsubsection{Sectoral Gross Output}

The data are disaggregated into 24 sectors: agriculture (including mining
and quarrying), 22 manufacturing sectors, and services, all available in US
dollars for the core countries and the Rest of the world (ROW). The 22
manufacturing sectors correspond to the industries numbered 15 to 37 in the
ISIC Rev. 3 classification (36 and 37 are bundled together).

The final dataset is obtained by combining different sources and some
estimation. Data on agriculture, aggregate manufacturing, and services for
core countries come mostly from the EU KLEMS database. There is no available
series for services output in China and India, so they are obtained as
residuals. Additional data come from the UN National Accounts.

Data on manufacturing subsectors come from UNIDO and EU KLEMS. For some
subsectors, EU KLEMS data are available only at a higher level of
aggregation (i.e. sector 15\&16 instead of the two separately); in those
cases, we use the country specific average shares from UNIDO for the years
in which they are available to impute values for each subsectors.

For the countries in the ROW, the output dataset is completed through
estimation, using sectoral value added, aggregate output, GDP and population
(the latter two from the Penn World Table 7.1) using Poisson regressions.
For every country for which sectoral value added and PWT data are available,
we estimate \ gross output using Possion regressions. Finally, for the few
countries for which we have value added data but no PWT data, we estimate
sectoral output by calculating for each year and sector the average value
added/output ratio,
\begin{equation*}
\bar{\beta}_{t}^{j}=\frac{1}{N}\sum_{i=1}^{N}\frac{VA_{i,t}^{j}}{%
Output_{i,t}^{j}}
\end{equation*}%
and then use it in
\begin{equation*}
\widehat{Output_{i,t}^{j}}=\frac{VA_{i,t}^{j}}{\bar{\beta}_{t}^{j}}
\end{equation*}%
Data collection notes on the core countries are as follows:

\begin{itemize}
\item USA: missing years 1970-76 generated using a growth rate of each
sector from EU KLEMS (March 2008 edition).

\item Canada: 1970-04 EU KLEMS (March 2008 edition), for 2005-06 sectoral
growth rates from the Canadian Statistical Office's National Economic
Accounts (table Provincial gross output at basic prices by industries).

\item China: data are from the Statistical yearbooks of China. Output in
agriculture is defined as gross output value of farming, forestry, animal
husbandry and fishery and is available for all years. Mining and
manufacturing is reported as a single unit labelled output in industry,
which apart from the extraction of natural resources and manufacture of
industrial products includes sectors not covered by other countries: water
and gas production, electricity generation and supply and repair of
industrial products (no adjustment was made). The primary concern was the
methodological change initiated around 1998, when China stopped reporting
\textit{total} industrial output and limited the coverage to industrial
output of firms with annual sales above 5m yuan (USD 625 000). The sectoral
coverage remained the same in both series. There were 5 years of overlapping
data of both series over which the share of the 5m+ firms on total output
decreased from 66 to 57 percent. The chosen approach to align both series
was to take the levels of output from the pre-1999 series (output of all
firms) and apply the growth rate of output of 5m+ firms in the post-1999
period. This procedure probably exaggerates the level of output in the last
seven years and leads to an enormous increase in the output/GDP in industry
ratio (from 3.5 in 1999 to 6.0 in 2006). Our conjecture is that the ratio
would be less steep if the denominator was value added in industry
(unavailable on a comparable basis) because the GDP figure includes net
taxes, which might take large negative values. Output in industry of all
firms reflects the 1995 adjustment with the latest economic census.

There is no available estimate for output in services, so we use the
predicted values from a Poisson regression on the other core countries, with
sectoral value added (see below for details on the source), output in
agriculture, output in manufacturing, GDP and population (the latter two
from the Penn World Table 7.1) and year dummies as regressors.

\item India: data are from the Statistical Office of India, National
Accounts Statistics. Years 1999-06 are reported on the SNA93 basis. Earlier
years were obtained using the growth rates of sectoral output as defined in
their `Back Series' database. The main issue with India was the large share
of `unregistered' manufacturing that is reported in the SNA93 series but
missing in the pre-1999 data. The `unregistered' manufacturing covers firms
employing less than 10 workers and is also referred to as the informal or
unorganized sector. We reconstructed the total manufacturing output using
the assumption that the share of registered manufacturing output in total
manufacturing output mirrors the share of value added of the registered
manufacturing sector in total value added in manufacturing (available from
the `Back Series' database).

As for China, output in services was estimated through a Poisson regression
method.

\item Mexico: data are from the System of National Accounts published by the
INEGI and from the UN National Accounts Database. 2003-06 Sistema de cuentas
nacionales, INEGI (NAICS), 1980-03 growth rate from the UN National Accounts
Data, 1978-79 growth rate from Sistema de cuentas nacionales, INEGI,
1970-1978 growth rate from System of National Accounts (1981), Volumen I
issued by the SPP.

\item Japan: data for 1973-06 are from EU KLEMS (November 2009 Edition), for
1970-72 the source is the OECD STAN database (growth rate).

\item Colombia and Norway: data are from the UN National Accounts Database.

\item Germany: the series is EU KLEMS' estimate for both parts of Germany.
\end{itemize}

\subsubsection{Sectoral Value Added}

The data on sectoral value added is obtained by combining data from the
World Bank, UN National Accounts, EU KLEMS and UNIDO. For the World Bank and
UN cases, the format of the data does not allow to have exactly the same
sectoral classification as the output data: namely, mining here is not
included in agriculture.

The World Bank and UN data are cleaned (we note a contradiction in the UN
data for Ethiopia and Former Ethiopia, which we correct to include in ROW
final sample; see the file for more details).

Data on manufacturing subsectors come from UNIDO and EU KLEMS. UNIDO. For
some subsectors, EU KLEMS data are available only at a higher level of
aggregation (i.e. sector 15\&16 instead of the two separately); in those
cases, we use the country specific average shares from UNIDO for the years
in which they are available to impute values for each subsectors; if no such
data are available in UNIDO, we use the average shares for the whole sample.
We use the UNIDO data as baseline and complete it with EU KLEMS when
necessary (in these cases the growth rates of the EU KLEMS series are used
to impute values; this is done because sometimes the magnitudes are quite
different in the two datasets). If an observation is missing in both
datasets, we impute it using the country specific average sectoral shares
for the years in which data are available.

\subsubsection{ Trade and dij's}

Bilateral import shares in gross output are obtained through several steps.
We use the SITC1 classification for all the sample. This is made in order to
ensure a consistent definition of the sectors throughout the whole time
period. In order to construct the agricultural sector we aggregate the
subsectors in the SITC1 classification corresponding to the BEC11 group. For
the manufacturing sectors, we use the correspondence tables available on the
UN website to identify the SITC1 groups corresponding to the ISIC 3 groups
used for output and value added. Re-exports and re-imports are not included
in the exports and imports figures. We use bilateral imports and exports at
the sectoral level from 1972 to 2007 from the UN COMTRADE database. This
dataset contains the value of all the transactions with international
partners reported by each country. Since every transaction is potentially
recorded twice (once reported by the exporter and once by the importer) we
use the values reported by the importer when possible and integrate with the
corresponding values reported by the exporter if only those are available.

As discussed in the paper, the $d_{nmt}^{j}$'s are computed as the ratio
between the value of exports from $m$ to $n$ in sector $j$ and total
spending by $n$ on sector $j$ at time $t$, where total spending is measured
as gross output plus imports minus exports of that sector. The share $%
d_{mmt}^{j}$ is obtained as a residual from the accounting restriction:
\begin{equation*}
d_{mmt}^{j}=1-\sum\limits_{n\neq m}^{N}d_{mnt}^{j}
\end{equation*}

We compute the surpluses as Total Exports - Total Imports, merge with the
output dataset and calculate the dij's and dii using the formulas in the
text.

\subsubsection{Prices}

The sectoral price indices come from the EU KLEMS database and data are
available for most of the core countries. We construct the sectoral
deflators using a chain weighted index. In particular, we compute for every
year a weighted average of the growth rate of the subsectoral price indexes,
where the weights are the output shares in that year; then, we apply this
growth rate to the previous year's sectoral price index (where the first
year's price index is a weighted average of the subsectors). We then rescale
so that the index is 100 in 1995 for all countries and sectors.

The aggregate price of GDP relative to that of the United States are
obtained from PWT 7.1, except for Former USSR, Former Czechoslovakia and
Former Yugoslavia, for which we use the PWT 5.6. For the ROW, we compute a
weighted average of the relative prices of GDP for all the countries for
which the PWT data are available (most of the ROW countries), where the
weights are each country's share of total output. Similarly, for
Belgium-Luxemobourg, we compute the weighed average of the two.

This information, as explained in the text, is used to back out the series
on sectoral productivities for all countries, which are used in the model
simulations. To compute volatility of GDP fluctuations in the data, we use
nominal value added (the aggregate for all sectors) in local currency units,
deflated by the countries' CPI. The data are provided by the World Bank's
World Development Indicators, in turn sourced by the Intrenational Monetary
Fund (IMF). For Germany we use the CPI index provided by the OECD, as the
IMF index is not consistent over time. For the United Kingdom we use the
Retail Price Index, as the CPI index is not available.

\subsubsection{Exchange Rates}

The exchange rates used for the conversion of output data come from the IMF.

\subsubsection{Alphas}

To calibrate the $\alpha^{j}$s we use sectoral value added data according to
the following procedure:

\begin{enumerate}
\item $s^j_{t} \doteq \frac{\sum_n w^j_{nt} L^j_{nt}}{\sum_k \sum_n w^k_{nt}
L^k_{nt}}$

\item $\alpha^j_t \doteq \frac{s^j_{t} / \beta^j}{\sum_k (s^k_{t} / \beta^k)}
$
\end{enumerate}

To allow for more flexibility and accomodate world-wide structural changes
over time we do the calibration every year and then use a smoothed trend
from the resulting time series. Then renormalize so that the sum of alphas
is 1 in all periods.

\subsection{Numerical Procedure for Model Equilibrium}

We use nested iterations to compute the model equilibrium.

\subsection{Inner Loop}
For a given pair of sectoral resource allocation $(L_{nt}^j)$ and sectoral wages $(w_{nt}^j)$ solve the system below for sectoral prices indexes $P_{nt}^j.$
\begin{align*}
P_{nt} &= \prod_{j = 1}^J {\alpha_t^j}^{- \alpha_t^j} {P_{nt}^j}^{\alpha_t^j} \\
%
P_{nt}^j &= \xi {\Phi_{nt}^j}^{-\frac{1}{\theta}}\\
%
\Phi_{nt}^j &= {B^j}^{-\theta} \sum_{i = 1}^N T_i^j {A_{it}^j}^{\theta} \left(\frac{{w_{it}^j}^{\beta^j} \prod_{k = 1}^{J}{P_{it}^k}^{\gamma^{kj}} }{\kappa_{nit}^j}\right)^{-\theta}
\end{align*}

Simplify $\Phi_{nt}^j:$
\begin{eqnarray*}
  \Phi_{nt}^j &=&  {B^j}^{-\theta} \sum_{i = 1}^N \underbrace{T_i^j {A_{it}^j}^{\theta}}_{\frac{Z_{it}^j}{{L_{it}}^{\beta^j\theta}}} \left(\frac{ {w_{it}^j}^{\beta^j} \prod_{k = 1}^{J}{P_{it}^k}^{\gamma^{kj}}}{\kappa_{nit}^j}\right)^{-\theta}\\
  %
  &=& {B^j}^{-\theta} \sum_{i = 1}^N Z_{it}^j {L_{it}}^{- \beta^j\theta} {w_{it}^j}^{-\beta^j\theta} {\kappa_{nit}^j}^{\theta} \prod_{k = 1}^{J}{P_{it}^k}^{-\theta\gamma^{kj}}\\
  %
  &=& {B^j}^{-\theta} \sum_{i = 1}^N \underbrace{Z_{it}^j {\left((L_{it}w_{it}^j)^{- \beta^j} \kappa_{nit}^j\right)}^{\theta}}_{D_{nit}^j} \prod_{k = 1}^{J}{P_{it}^k}^{-\theta\gamma^{kj}}\\
  %
  &=& {B^j}^{-\theta} \sum_{i = 1}^N D_{nit}^j \prod_{k = 1}^{J}{P_{it}^k}^{-\theta\gamma^{kj}}
\end{eqnarray*}
%
Note that we can compute the coefficients of the equation (the $D$ values) before starting the search for prices.
Now we can write the system of equations as
\begin{align*}
{P_{nt}^j}^{-\theta} &= \xi^{-\theta} {\Phi_{nt}^j}\\
%
{P_{nt}^j}^{-\theta} &= \xi^{-\theta} {{B^j}^{-\theta} \sum_{i = 1}^N D_{nit}^j \prod_{k = 1}^{J}{P_{it}^k}^{-\theta\gamma^{kj}}}
\end{align*}
or
\begin{equation}\label{inner:loop}
\mathcal{P}_{nt}^j = \left(\xi B^j\right)^{-\theta} \sum_{i = 1}^N D_{nit}^j \prod_{k = 1}^{J}{\mathcal{P}_{it}^k}^{\gamma^{kj}}
\end{equation}
where $\mathcal{P}_{nt}^j \equiv {P_{nt}^j}^{-\theta}$. We iterate \eqref{inner:loop} until convergence.

\subsection{Middle loop}
For a given resource allocation, $L_{nt}^j$, this loop searches for sectoral wages $w_{nt}^j$ that solve the system of equations below.
For notational simplicity we solve the system in terms of sectoral revenue and then calculate corresponding wages from $w_{nt}^j L_{nt}^j = \beta^j R_{nt}^j$.
\begin{align*}
R^j_{nt} &= \sum_{m=1}^N E^j_{mt} d^j_{mnt}\!\left(w_{nt}^j\right)  \\
%
E^j_{mt} &= \alpha^j_t P_{mt}C_{mt} + \sum_{k=1}^J \gamma^{jk}R^k_{mt} \\
%
P_{mt}C_{mt} &= \sum_{j=1}^J \beta^j R_{mt}^j - S_{mt} \\
\end{align*}
Substituting in, we get a system of linear equations in $R_{nt}^j$ for any given value of $d_{mnt}^j(w_{nt}^j)$:
\begin{equation}\label{middle:loop}
R^j_{nt} =
\sum_{m=1}^N
	d_{mnt}^j(w_{nt}^j)
	\left[
		\alpha^j_t \sum_{k=1}^J \beta^k R_{mt}^k
		- \alpha^j_tS_{mt}
		+ \sum_{k=1}^J \gamma^{jk}R^k_{mt}
	\right]
\end{equation}

Note that $d^j_{mnt}$ depends on $w_{nt}^j$ through
$$d_{mnt}^j = \frac{{B^j}^{-\theta} T_n^j {A_{nt}^j}^{\theta} \left(\frac{{w_{nt}^j}^{\beta^j} \prod_{k = 1}^{J}{P_{nt}^k}^{\gamma^{kj}} }{\kappa_{mnt}^j}\right)^{-\theta}}{{B^j}^{-\theta} \sum_{i = 1}^N T_i^j {A_{it}^j}^{\theta} \left(\frac{{w_{it}^j}^{\beta^j} \prod_{k = 1}^{J}{P_{it}^k}^{\gamma^{kj}} }{\kappa_{mit}^j}\right)^{-\theta}},$$
where prices were solved for in the inner loop. To facilitate computation we introduce $D$, the coefficients from the inner loop.
We can rewrite the definition of $d$ as
\begin{align*}
  d_{mnt}^j &= \frac{\overbrace{T_n^j {A_{nt}^j}^{\theta}}^{\frac{Z_{nt}^j}{{L_{nt}}^{\beta^j\theta}}} \left(\frac{{P_{nt}}^{1 - \beta^j} {w_{nt}^j}^{\beta^j}}{\kappa_{mnt}^j}\right)^{-\theta}}{\sum_{i = 1}^N \underbrace{T_i^j {A_{it}^j}^{\theta}}_{\frac{Z_{it}^j}{{L_{it}}^{\beta^j\theta}}} \left(\frac{{P_{it}}^{1 - \beta^j} {w_{it}^j}^{\beta^j}}{\kappa_{mit}^j}\right)^{-\theta}}\\
%
  &= \frac{Z_{nt}^j {L_{nt}}^{- \beta^j\theta} {w_{nt}^j}^{-\beta^j\theta} {\kappa_{mnt}^j}^{\theta}{P_{nt}}^{\theta(\beta^j - 1)}}{\sum_{i = 1}^N Z_{it}^j {L_{it}}^{- \beta^j\theta} {w_{it}^j}^{-\beta^j\theta} {\kappa_{mit}^j}^{\theta}{P_{it}}^{\theta(\beta^j - 1)}}\\
%
  &= \frac{\overbrace{Z_{nt}^j {L_{nt}}^{- \beta^j\theta} {w_{nt}^j}^{-\beta^j\theta} {\kappa_{mnt}^j}^{\theta}}^{D_{mnt}^j}{P_{nt}}^{\theta(\beta^j - 1)}}{\sum_{i = 1}^N \underbrace{Z_{it}^j {L_{it}}^{- \beta^j\theta} {w_{it}^j}^{-\beta^j\theta} {\kappa_{mit}^j}^{\theta}}_{D_{mit}^j}{P_{it}}^{\theta(\beta^j - 1)}}\\
%
  &= \frac{D_{mnt}^j {P_{nt}}^{\theta(\beta^j - 1)}}{\sum_{i = 1}^N D_{mit}^j{P_{it}}^{\theta(\beta^j - 1)}}
\end{align*}
Note that $d$ does not depend on the resource allocation.

We guess a wage to compute $d$, then solve the linear equations \eqref{middle:loop} for revenue. Our new wage can be computed from the revenue, and we iterate until convergence.

\subsection{Outer loop}
The goal of this loop is to find the sectoral resource allocations $L_{nt}^j$ that satisfy
$$\frac{L_{nt}^{j}}{L_{nt}} = E_{t - 1} \left( \frac{w_{nt}^j L_{nt}^j}{w_{nt} L_{nt}}\right).$$
This loop runs over iterations of $L_{nt}^j$ until it converges up to a predefined threshold.

To approximate the expectation we use a band pass filtered trend that allows for breaks in growth rates.

\begin{enumerate}
  \item We start from the initial value $(L_{nt}^j)^0 = \alpha^j L_{nt}$.
  \item In iteration $i$ for the actual $(L_{nt}^j)^i$ we get sectoral and aggregate wages, $(w_{nt}^j)^i$ and $(w_{nt})^i$, from the middle loop.
  \item We calculate the implied total value added and the sectoral value added shares as
    $$\left(\frac{w_{nt}^j L_{nt}^j}{w_{nt} L_{nt}}\right)^i = \frac{(w_{nt}^j)^i (L_{nt}^j)^i}{(w_{nt})^i L_{nt}}.$$
  \item
    \begin{enumerate}
      \item Decompose all $N \cdot J$ value added share series to trend and cycle components using a band pass filter with the same specification as in the shock decomposition.
        $$\log\left(\frac{w_{nt}^j L_{nt}^j}{w_{nt} L_{nt}}\right)^i = trend^j_{nt} + cycle_{nt}^j.$$
      \item Normalize the trend values so that in each period in each country the trend values add up 1:
        $$\widehat{\left(\frac{w_{nt}^j L_{nt}^j}{w_{nt} L_{nt}}\right)^i} = \frac{\exp(trend^j_{nt} + cycle_{nt}^j)}{\sum_k \exp(trend^k_{nt} + cycle_{nt}^k)}$$
      \item Replace the expectation with the adjusted trend value.
      $$E_{t - 1} \left( \frac{w_{nt}^j L_{nt}^j}{w_{nt} L_{nt}}\right) = \widehat{\left(\frac{w_{nt}^j L_{nt}^j}{w_{nt} L_{nt}}\right)^i}$$
    \end{enumerate}
  \item Update the resource allocations
    $$(L_{nt}^j)^{i + 1} = L_{nt} \widehat{\left(\frac{w_{nt}^j L_{nt}^j}{w_{nt} L_{nt}}\right)^i}$$
\end{enumerate}

\subsubsection{Counterfactual Equilibria}

We discuss next how we compute the equilibrium in the counterfactual
exercise and how we identify the two theoretical mechanisms.

\paragraph{Numerical Counterfactual Equilibria}

For each new value of (inverse) trading cost $\kappa $, and the estimated
sequence of sectoral productivities $\left\{ Z_{mt}^{j}\right\} $, we need
to solve for the sequence of equipped labour allocated to each sector $%
\left\{ L_{mt}^{j}\right\} $. The rational-expectations equilibrium is a
fixed point of a below mapping on the space of all possible sequences $%
\left\{ L_{mt}^{j}\right\} $. We proceed as follows.

\begin{enumerate}
\item We start from the initial value $(L_{nt}^j)^0 = \alpha^j L_{nt}$.

\item In iteration $i$ for the actual $(L_{nt}^{j})^{i}$ we get sectoral and
aggregate (equipped labour) wages, $(w_{nt}^{j})^{i}$ and $(w_{nt})^{i}$,
from the equilibrium equations.

\item We calculate the implied total value added and the sectoral value
added shares as
\begin{equation*}
\left(\frac{w_{nt}^j L_{nt}^j}{w_{nt} L_{nt}}\right)^i = \frac{(w_{nt}^j)^i
(L_{nt}^j)^i}{(w_{nt})^i L_{nt}}.
\end{equation*}

\item
\begin{enumerate}
\item Decompose all $N\cdot J$ value-added-share series into trend and cycle
components using an annual band-pass filter.
\begin{equation*}
\log \left( \frac{w_{nt}^{j}L_{nt}^{j}}{w_{nt}L_{nt}}\right)
^{i}=trend_{nt}^{j}+cycle_{nt}^{j}.
\end{equation*}

\item Normalize the trend values so that in each period and each country the
trend values add up to 1:
\begin{equation*}
\widehat{\left( \frac{w_{nt}^{j}L_{nt}^{j}}{w_{nt}L_{nt}}\right) ^{i}}=\frac{%
\exp (trend_{nt}^{j})}{\sum_{k}\exp (trend_{nt}^{k})}
\end{equation*}

\item Replace the expectation with the adjusted trend value.
\begin{equation*}
E_{t - 1} \left( \frac{w_{nt}^j L_{nt}^j}{w_{nt} L_{nt}}\right) = \widehat{%
\left(\frac{w_{nt}^j L_{nt}^j}{w_{nt} L_{nt}}\right)^i}
\end{equation*}
\end{enumerate}

\item Update the resource allocations
\begin{equation*}
(L_{nt}^j)^{i + 1} = L_{nt} \widehat{\left(\frac{w_{nt}^j L_{nt}^j}{w_{nt}
L_{nt}}\right)^i}
\end{equation*}

\item Repeat the procedure until convergence.
\end{enumerate}

\paragraph{Productivities in Counterfactual Scenario}

We are interested in decomposing the trade effect on volatility on the
contributions of the two mechanisms, specialization and diversification. To
achieve that, we need to identify the sources of shocks to productivity. We
resort to a factor model that decomposes productivity shocks into sector-
and country-specific components in a way described in Koren and Tenreyro
(2007). To separate per period shocks from trends we use a band pass filter
to detrend each $\left\{ \log {Z_{n,t}^{j}}\right\} _{t=1}^{T}$ series. Then
we calculate the time average of the shocks for each $(n,j)$ pair and
subtract it from the growth rate to get the object to be decomposed, $\tilde{%
Z}_{nt}^{j}$.
\begin{equation*}
\tilde{Z}_{nt}^{j}=\hat{Z}_{n,t}^{j}-(T-1)^{-1}\sum_{t=2}^{T}\hat{Z}%
_{n,t}^{j}
\end{equation*}
(Note that the bandpass filter already removes the mean, but we allow our
algorithm to use other filters for detrending.) Without loss of generality,
we decompose $\tilde{Z}_{nt}^{j}$ as:
\begin{equation*}
\tilde{Z}_{nt}^{j}=\lambda _{t}^{j}+\mu _{nt}+\epsilon _{nt}^{j},
\end{equation*}%
where ${\mu _{n,t}}$ is the country-specific factor, affecting all sectors
within the country; $\lambda _{t}^{j}$ is the global sectoral factor,
affecting sector $j$ in all countries;\ and the residual $\epsilon
_{n,t}^{j} $ is the idiosyncratic component, specific to the country and
sector. The three factors, $\lambda ,\mu $, and $\epsilon $ are estimated
as:
\begin{align*}
\hat{\lambda}_{t}^{j}& =N^{-1}\sum_{n=1}^{N}\tilde{Z}_{nt}^{j} \\
\hat{\mu}_{nt}& =J^{-1}\sum_{j=1}^{J}\left( \tilde{Z}_{nt}^{j}-\hat{\lambda}%
_{t}^{j}\right) \\
\hat{\epsilon}_{nt}^{j}& =\tilde{Z}_{nt}^{j}-\hat{\lambda}_{t}^{j}-\hat{\mu}%
_{nt}\text{,}
\end{align*}%
with the restriction $\sum_{n}{\mu _{n}}=0$ implying that the
country-specific effect is expressed relative to the world's aggregate. In
the counterfactual exercises, we can mute the sector- or country-specific
factors by setting the corresponding components equal to 0, in order to
identify the separate effects of the two trade channels affecting
volatility.\bigskip

\subsection{Real GDP Changes in Model and Data}

To compute volatility in the data, we measure real GDP as the nominal value
added deflated by the country's CPI index, which consists of a Laspayres
price index, as provided by the World Bank's World Development Indicators.
The model counterpart is value added ($w_{nt}L_{nt}$) deflated by the
optimal expenditure-based price index $P_{nt}$.

Burstein and Cravino (2015, Proposition 2) show that, up to a
first approximation, changes in the CPI index and the optimal price index
will coincide. Hence real GDP in the model and data will be comparable
objects.\footnote{In this regard, our mapping will not be susceptible to Kehoe and Ruhl
(2008)'s problem as our measure of real income is the same, to a first-order
approximation, in both model and data.}

\end{document}