Skip to main content

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.

Metadata

Release files for gegravity 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gegravity 0.3
File Size Uploaded
gegravity-0.3.tar.gz 54.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gegravity 0.3
File Interpreter ABI Platform
gegravity-0.3-py3-none-any.whl Python 3 none any Details

Total release size: 111.2 kB

Release files / gegravity-0.3.tar.gz

Download URL gegravity-0.3.tar.gz
Size 54.9 kB
Tags Source
SHA-256 checksum
How to use checksums
855ccac9a76b068263edffab465cd0d7802c7d26d647ab35ef285a2775236fa3
BLAKE2b-256 checksum
How to use checksums
6462a3d9593518cfc28f147be6ffe077b528633252e1ad047ba5bc54ebb27a59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Release files / gegravity-0.3-py3-none-any.whl

Download URL gegravity-0.3-py3-none-any.whl
Size 56.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78601f102ac2f6d39c2a236cddcfc7c39f6053f71b43f9f19e4732f077fb6bcb
BLAKE2b-256 checksum
How to use checksums
b6b17c4c7f119a2dd6ac56967a988a698b5759e65524656ad1242988feebc0e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page