Skip to main content
QUICK REVIEW

[Paper Review] ge_gravity2: a command for solving universal gravity models

Rodolfo G. Campos, Iliana Reggio|arXiv (Cornell University)|Apr 14, 2024
Economic theories and modelsEconomics, Econometrics and Finance3 citations
TL;DR

This paper introduces ge_gravity2, a Stata command that extends general equilibrium trade modeling by enabling counterfactual simulations in universal gravity models with positive aggregate supply elasticity—previously restricted to zero-elasticity models. It uses a globally convergent fixed-point algorithm to solve nonlinear systems of equations, allowing researchers to analyze welfare, trade flows, and output changes under shifts in trade costs, technology, or productivity, with applications to policy evaluation and historical trade regimes.

ABSTRACT

We describe an algorithm for computing counterfactual trade flows, prices, output, and welfare in a large class of general equilibrium trade models. We introduce a command called ge_gravity2 that allows users to perform these computations in Stata. This command extends the existing ge_gravity command by allowing users to compute the general equilibrium effects of changes in trade policy in positive supply elasticity models. It can be used to solve any model that falls into the class of universal gravity models as defined by Allen, Arkolakis, and Takahashi [Universal Gravity, Journal of Political Economy, 128(2), 2020, 393-433].

Motivation & Objective

  • To extend the capabilities of the ge_gravity command to models with positive aggregate supply elasticity, enabling broader application in trade policy analysis.
  • To provide a computationally efficient and globally convergent algorithm for solving nonlinear systems of equations in general equilibrium trade models.
  • To allow researchers to simulate the effects of changes in trade frictions, technology parameters, and productivity shocks across all countries in a unified framework.
  • To ensure backward compatibility with the original ge_gravity command while adding support for new economic parameters and outputs.
  • To facilitate empirical research and policy evaluation using the universal gravity framework across diverse trade and growth models.

Proposed method

  • The command implements a fixed-point algorithm inspired by Alvarez and Lucas (2007), solving the full nonlinear system of equations rather than relying on local approximations.
  • It operates within the universal gravity model framework, which requires six structural conditions: iceberg trade frictions, constant elasticity of substitution in demand and supply, market clearing, exogenous trade deficits, and a numeraire choice.
  • The algorithm computes comparative statics for changes in bilateral trade costs, exogenous trade costs, and production function parameters (e.g., productivity via the a_hat option).
  • The system of equations generalizes Allen et al. (2020) by allowing unbalanced trade and positive supply elasticity, enabling simulation of global welfare and output responses.
  • The command supports the use of the by prefix for country- or year-specific simulations, and stores multiple matrices (e.g., W_hat, W0, W1, W2) for post-estimation analysis.
  • Users can specify parameters such as the elasticity of substitution (theta), supply elasticity (psi), and custom productivity shocks (a_hat) to simulate real-world policy changes.

Experimental results

Research questions

  • RQ1How do changes in trade costs affect global trade flows, output, and welfare in models with positive supply elasticity?
  • RQ2What are the general equilibrium welfare implications of a trade agreement when supply responsiveness is non-zero?
  • RQ3How does a country’s productivity increase affect global trade patterns and welfare under the universal gravity framework?
  • RQ4To what extent do different assumptions about supply elasticity (e.g., 0, 1, 2) alter the estimated welfare impacts of trade policy changes?
  • RQ5Can the ge_gravity2 command accurately replicate results from the original ge_gravity command when supply elasticity is zero, ensuring backward compatibility?

Key findings

  • When supply elasticity is set to 1, Spain’s welfare loss from trade restrictions during the Franco era increases from -1.535% (psi=0) to -2.284% in 1980, indicating larger welfare costs under positive supply elasticity.
  • With a supply elasticity of 2, the estimated welfare loss for Spain in 1980 rises to -3.385 percentage points, showing that supply responsiveness significantly amplifies the negative impact of trade barriers.
  • A 10% increase in China’s productivity leads to a 5.575% increase in its international trade, a 11.439% rise in domestic output, and a 10.776% improvement in welfare, demonstrating global spillovers.
  • The command successfully replicates results from the original ge_gravity command when supply elasticity is zero, confirming backward compatibility and reliability.
  • The algorithm converges to the global solution of the nonlinear system almost instantaneously in most applications, ensuring computational efficiency.
  • The command enables detailed, country-specific simulations using the by prefix, as demonstrated in the analysis of Spain’s welfare costs across multiple years and elasticity assumptions.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.