Get the Exports for a variety of countries over time from the Global Macro Database (GMDB). Exports are the total amount of goods and services produced in a country that are sold to other countries.

The level is annual and expressed in millions of national currency, so levels are not comparable across countries with different currencies, but growth rates are.

Data comes from the Global Macro Database (GMDB), further information about the variable can be found within https://www.globalmacrodata.com/documentation.html

Also known as: exports, trade exports.

No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Exports for you. Just ask in plain English.

Calculate the Exports in Python

The Exports is available in the Economics module of the open-source Finance Toolkit. Install it with:

pip install financetoolkit -U

Then call get_exports as shown below.

from financetoolkit import Economics

economics = Economics(start_date='1980-01-01', end_date='1990-01-01')

economics.get_exports(countries=['Netherlands', 'Germany', 'China'])

Which returns:

  Netherlands Germany China
1980 89636.1 164376 46573.7
1981 103010 186137 61412.3
1982 106456 200976 59212.3
1983 109543 204049 57306
1984 123555 229107 69340.1
1985 131138 252794 75856.1
1986 114516 247153 90398.9
1987 112468 246623 151965
1988 122716 265208 218329
1989 138137 299732 203483
1990 144521 334043 256949

Parameters

get_exports accepts the following parameters:

  • countries (list[str] | str | None, optional): A list of countries or a single country to include in the results. Defaults to None.
  • rolling (int, optional): The rolling window size to use for smoothing the data (simple moving average). Defaults to None.
  • trailing (int, optional): The trailing window size to use for summing the data over trailing periods (e.g. a trailing-4-quarter sum). Defaults to None.
  • growth (bool, optional): Whether to return the growth data or the actual data. Defaults to False.
  • lag (int, optional): The number of periods to lag the growth data. Defaults to 1.
  • standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.
  • rounding (int | None, optional): The number of decimals to round the results to. Defaults to None.

The Economics module page introduces the module, and the sidebar lists all of its functions.

Share