Skip to main content

General equilibrium (GE) gravity modeling tools for international trade

Project description

gegravity: General Equilibrium Gravity Modeling in Python


gegravity is a Python package containing tools used to estimate general equilibrium (GE) structural gravity models and simulate counterfactual experiments. The package is based on the well established version of the gravity model described by Yotov, Piermartini, Monteiro, and Larch (2016) An Advanced Guide to Trade Policy Analysis: The Structural Gravity Model. It implements the structural GE gravity model in a general, robust, and easy to use manner in an effort to make GE gravity modeling more accessible for researchers and policy analysts.

The package provides several useful tools for structural gravity modeling.

  1. It computes theory consistent estimates of the structural multilateral resistance terms of Anderson and van Wincoop (2003) "Gravity with Gravitas" from standard econometric gravity results.

  2. It simulates GE effects from counterfactual experiments such as new trade agreements or changes to other trade costs. The model can be flexibly used to study aggregate or sector level trade as well as many different types of trade costs and policies.

  3. It conducts Monte Carlo simulations that provide a means to compute standard errors and other measures of statistical precision for the GE model results.

For more information about the GE gravity model, its implementation, and the various components of the package, see the companion paper "gegravity: General Equilibrium Gravity Modeling in Python" as well as the technical documentation.

Citation and license

The package is publicly available and free to use under the MIT license. Users are asked to please cite the following document,

Herman, Peter (2021) "gegravity: General Equilibrium Gravity Modeling in Python." USITC Economics Working Paper 2021-04-B.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gegravity-0.3.tar.gz (54.9 kB view details)

Uploaded Source

Built Distribution

gegravity-0.3-py3-none-any.whl (56.3 kB view details)

Uploaded Python 3

File details

Details for the file gegravity-0.3.tar.gz.

File metadata

  • Download URL: gegravity-0.3.tar.gz
  • Upload date:
  • Size: 54.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.9

File hashes

Hashes for gegravity-0.3.tar.gz
Algorithm Hash digest
SHA256 855ccac9a76b068263edffab465cd0d7802c7d26d647ab35ef285a2775236fa3
MD5 547dfa597054aee611c860c91eb0bf13
BLAKE2b-256 6462a3d9593518cfc28f147be6ffe077b528633252e1ad047ba5bc54ebb27a59

See more details on using hashes here.

File details

Details for the file gegravity-0.3-py3-none-any.whl.

File metadata

  • Download URL: gegravity-0.3-py3-none-any.whl
  • Upload date:
  • Size: 56.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.9

File hashes

Hashes for gegravity-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 78601f102ac2f6d39c2a236cddcfc7c39f6053f71b43f9f19e4732f077fb6bcb
MD5 7c94bca52029081f3095700836737c08
BLAKE2b-256 b6b17c4c7f119a2dd6ac56967a988a698b5759e65524656ad1242988feebc0e6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page